:root {
  --ink: #193c37;
  --muted: #657e78;
  --mint: #147d68;
  --mint-light: #e9f4ee;
  --paper: #f7f8f2;
  --border: #dce5db;
  --coral: #db715c;
  --orange: #bf882f;
  --blue: #427f9b;
  --font: "PingFang SC", "Microsoft YaHei", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.6 var(--font);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
.shell {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 240px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 34px 24px;
  background: #173f35;
  color: #e5f2e8;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 42px;
}
.brand-symbol {
  font-size: 36px;
  color: #b9db91;
}
.brand small {
  display: block;
  letter-spacing: 2px;
  font-size: 9px;
  color: #aac8b8;
  margin-top: 4px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a1c0b0;
  margin-bottom: 14px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 5px 0;
  color: #bdd1c5;
  transition: 0.15s;
}
nav a.active {
  background: #315a48;
  color: #f4e9aa;
}
nav a:hover {
  background: #2b5043;
}
svg.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  vertical-align: middle;
}
.sidebar-note {
  margin-top: auto;
  border-top: 1px solid #3b5b4d;
  padding-top: 24px;
  color: #d7d5a4;
}
.sidebar-note p {
  font-size: 12px;
  color: #abc5b6;
}
.quiet {
  border: 0;
  background: none;
  color: #bfd0c5;
  text-align: left;
  padding: 9px 0;
}
.main-wrap {
  margin-left: 240px;
  width: calc(100% - 240px);
}
header {
  height: 74px;
  padding: 0 42px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff70;
  color: var(--muted);
}
header i {
  font-style: normal;
  margin: 0 15px;
  color: #b4c4b9;
}
.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4d9d74;
  margin-right: 8px;
}
main {
  padding: 34px 42px 60px;
  max-width: 1660px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 20px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.7px;
  line-height: 1.4;
  margin: 8px 0;
}
h2 {
  font-size: 23px;
  margin: 7px 0;
}
h3 {
  font-size: 18px;
}
.kicker {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--mint);
  font-weight: 600;
}
.subtle,
.page-heading p {
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 17px;
  font-weight: 500;
  min-height: 42px;
}
.button.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: white;
}
.button.warn {
  background: #fff4eb;
  color: #ac5634;
  border-color: #e6c6b5;
}
.button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.button.small {
  padding: 6px 11px;
  min-height: 32px;
  font-size: 12px;
}
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar input {
  flex: 1;
  min-width: 200px;
}
.toolbar select {
  min-width: 150px;
}
.toolbar .filter-note {
  color: var(--muted);
  font-size: 12px;
}
.table-wrap {
  border: 1px solid var(--border);
  background: white;
  border-radius: 14px;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 13px;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  background: #f0f4ed;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 16px 18px;
  border-bottom: 1px solid #edf1e9;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: #fcfdf8;
}
.table-title {
  font-size: 14px;
  font-weight: 600;
  white-space: normal;
  min-width: 180px;
  max-width: 300px;
}
.cell-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  white-space: normal;
  max-width: 290px;
}
.row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 360px;
}
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: #f1f2ec;
  color: var(--muted);
  font-size: 11px;
}
.tag.green {
  background: #e6f2e8;
  color: #397657;
}
.tag.orange {
  background: #fff0d8;
  color: #956727;
}
.tag.red {
  background: #fdece6;
  color: #b8624d;
}
.tag.blue {
  background: #e8f1f6;
  color: #4d8099;
}
.tag.purple {
  background: #f0eafa;
  color: #836ba0;
}
.pill-muted {
  color: var(--muted);
  font-size: 12px;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  color: var(--muted);
}
.empty {
  padding: 65px 20px;
  text-align: center;
  background: white;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
}
.empty svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 8px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.stat {
  padding: 24px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 12px;
  position: relative;
}
.stat svg {
  position: absolute;
  right: 20px;
  top: 22px;
  color: var(--mint);
  background: var(--mint-light);
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 12px;
}
.stat:nth-child(2) svg {
  color: var(--coral);
  background: #fceee8;
}
.stat:nth-child(3) svg {
  color: var(--blue);
  background: #e8f2f5;
}
.stat:nth-child(4) svg {
  color: var(--orange);
  background: #fbf3df;
}
.stat strong {
  font-family: Georgia, serif;
  font-size: 38px;
  font-weight: 400;
  display: block;
  margin: 10px 0 4px;
  line-height: 1;
}
.stat small {
  color: var(--muted);
}
.overview-bottom {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 22px;
}
.desk-card {
  padding: 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.desk-card.green {
  background: #e8f0dc;
}
.desk-card h3 {
  margin-bottom: 12px;
}
.desk-card p {
  color: var(--muted);
}
.step-flow {
  display: flex;
  gap: 10px;
  margin: 24px 0;
  align-items: center;
  flex-wrap: wrap;
}
.step-flow span {
  padding: 6px 12px;
  background: white;
  border-radius: 6px;
  font-size: 12px;
}
.desk-card .button {
  margin-top: 20px;
}
.signal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.signal:last-child {
  border: 0;
}
.signal strong {
  font-size: 22px;
  color: var(--coral);
}
input,
select,
textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #cfdccf;
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  outline: 2px solid #147d6819;
}
textarea {
  min-height: 95px;
  resize: vertical;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
label input,
label select,
label textarea {
  margin-top: 6px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-hint {
  background: #f0f4e7;
  border-left: 3px solid #a5bc72;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #577144;
  font-size: 12px;
}
.notice {
  background: #fff3df;
  color: #8a652e;
  padding: 14px 18px;
  border-radius: 9px;
  margin-bottom: 20px;
  font-size: 12px;
}
dialog {
  width: min(900px, 94vw);
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 25px 90px #112d352f;
  color: var(--ink);
}
dialog::backdrop {
  background: #183c354f;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.close {
  border: 0;
  background: #eff4ed;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 24px;
  color: var(--muted);
}
#editor-body {
  padding: 25px 28px;
  max-height: 65vh;
  overflow: auto;
}
#editor-error {
  padding: 0 28px;
}
.dialog-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: var(--paper);
}
.error-text {
  color: #b6543f;
  font-size: 12px;
  margin: 10px 0;
}
.day-editor {
  border: 1px solid var(--border);
  background: #f7f9f2;
  border-radius: 10px;
  padding: 18px;
  margin-top: 18px;
}
.day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.stop-editor {
  padding: 16px;
  background: white;
  border-radius: 8px;
  margin: 12px 0;
  border: 1px solid var(--border);
}
.stop-editor .form-grid {
  gap: 12px;
}
.stop-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.stop-number {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--mint);
}
.detail-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
}
.private-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
}
.private-item small {
  color: var(--muted);
}
.private-item strong {
  color: var(--coral);
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #173f35;
  color: white;
  box-shadow: 0 8px 30px #173f3530;
  padding: 13px 22px;
  border-radius: 9px;
  z-index: 20;
  max-width: 90vw;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  min-height: 100vh;
}
.login-story {
  background: #174f40;
  color: #f1f3db;
  padding: 48px 60px;
  position: relative;
  overflow: hidden;
}
.wordmark {
  font-size: 17px;
  letter-spacing: 4px;
}
.wordmark span {
  font-size: 13px;
  letter-spacing: 1px;
  margin-left: 18px;
  color: #b4d1a3;
}
.story-copy {
  position: relative;
  z-index: 2;
  margin-top: 100px;
}
.story-copy .kicker {
  color: #b9d6a0;
}
.story-copy h1 {
  font-family: "Songti SC", "STSong", serif;
  font-size: 46px;
  font-weight: 400;
  line-height: 1.45;
  margin: 25px 0;
}
.story-copy p {
  color: #b4d1bd;
  max-width: 330px;
}
.story-bottom {
  position: absolute;
  bottom: 38px;
  font-size: 11px;
  letter-spacing: 3px;
  color: #afd0b5;
}
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.login-form-wrap form {
  max-width: 370px;
  width: 100%;
}
.login-form-wrap h2 {
  font-size: 30px;
  margin: 10px 0;
}
.login-form-wrap label {
  margin-top: 24px;
}
.login-form-wrap input {
  height: 49px;
}
.login-form-wrap .button {
  width: 100%;
  margin-top: 24px;
  justify-content: space-between;
}
.login-help {
  font-size: 11px;
  margin-top: 24px;
  color: var(--muted);
}
.coastal-art {
  position: absolute;
  width: 450px;
  height: 290px;
  bottom: 60px;
  right: -35px;
  opacity: 0.9;
}
.sun {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #ebcb70;
  left: 250px;
  top: 20px;
}
.hill {
  position: absolute;
  width: 220px;
  height: 220px;
  transform: rotate(45deg);
  border-radius: 18px;
  background: #478c67;
  left: 70px;
  top: 110px;
}
.hill.two {
  width: 160px;
  height: 160px;
  left: 230px;
  top: 145px;
  background: #70a472;
}
.sea {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: #69b6a5;
  border-radius: 80% 0 0 0;
}
.sea:after {
  content: "";
  position: absolute;
  width: 280px;
  right: 20px;
  top: 45px;
  border-top: 2px dashed #c8e3ce;
}
.boat {
  position: absolute;
  width: 75px;
  height: 17px;
  background: #eeb39a;
  bottom: 45px;
  left: 190px;
  clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}
.sail {
  position: absolute;
  width: 65px;
  height: 78px;
  bottom: 66px;
  left: 196px;
  background: #fff4ce;
  clip-path: polygon(80% 0, 80% 100%, 0 100%);
}
.art-caption {
  position: absolute;
  bottom: 17px;
  left: 30px;
  font-size: 8px;
  letter-spacing: 2px;
  color: #244e40;
}
code {
  font-size: 11px;
}
@media (max-width: 1100px) {
  aside {
    width: 205px;
    padding: 25px 18px;
  }
  .main-wrap {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  main {
    padding: 25px;
  }
  header {
    padding: 0 25px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 18px;
  }
  .overview-bottom {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 40px;
  }
  .story-copy h1 {
    font-size: 36px;
  }
  .coastal-art {
    right: -120px;
  }
}
@media (max-width: 760px) {
  aside {
    position: static;
    width: 100%;
    padding: 18px;
    display: block;
  }
  .brand {
    margin: 0 0 15px;
    font-size: 19px;
  }
  .nav-label,
  .sidebar-note {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  nav a {
    white-space: nowrap;
    padding: 8px 12px;
  }
  nav svg {
    width: 18px;
  }
  .quiet {
    display: inline-block;
    margin-right: 20px;
  }
  .shell {
    display: block;
  }
  .main-wrap {
    margin: 0;
    width: 100%;
  }
  header {
    height: 54px;
    padding: 0 18px;
  }
  main {
    padding: 20px 16px;
  }
  .page-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat strong {
    font-size: 32px;
  }
  .stat svg {
    width: 34px;
    height: 34px;
    right: 12px;
    top: 15px;
    padding: 7px;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    display: none;
  }
  .login-form-wrap {
    min-height: 100vh;
    padding: 35px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .dialog-heading,
  #editor-body {
    padding: 20px;
  }
  .toolbar input {
    min-width: 120px;
  }
  td,
  th {
    padding: 12px;
  }
  .page-heading .button {
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
/* Keep the desktop filter controls on one line; let narrow screens wrap. */
.toolbar input {
  width: 220px;
}
.toolbar select {
  width: 180px;
  flex: 0 0 auto;
}
.setting-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: var(--ink);
  margin: 24px 0;
}
.setting-toggle input,
.log-toolbar input {
  width: 20px;
  height: 20px;
  accent-color: var(--mint);
  margin: 0;
}
#settings-form .button {
  margin-top: 24px;
}
.log-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}
.log-toolbar > span {
  font-size: 12px;
  color: var(--muted);
}
.log-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.log-output {
  height: 400px;
  max-height: 50vh;
  overflow-y: auto;
  background: #12382f;
  color: #e6eee3;
  padding: 20px;
  border-radius: 12px;
  font:
    12px/1.8 ui-monospace,
    SFMono-Regular,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.log-entry {
  margin-bottom: 10px;
}
.log-time {
  color: #8fae9b;
}
.log-entry.output {
  color: #c9dfb5;
}
.log-entry.tool {
  color: #9ed8e8;
}
.log-entry.warning {
  color: #eed09e;
}
.log-entry.error {
  color: #f5afa4;
}
.model-selection {
  margin-bottom: 24px;
}
.model-selection .form-grid {
  margin: 18px 0;
}
.guide-select,
#guide-select-all {
  width: 18px;
  height: 18px;
  accent-color: var(--mint);
}
