:root {
  color: #20242a;
  background: #f5f6f8;
  font-family:
    Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 14% 0%, rgba(47, 143, 108, 0.12), transparent 30%),
    linear-gradient(180deg, #fbfbf8 0%, #f3f5f6 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.loginShell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.loginPanel,
.topbar,
.sidebar,
.workspace {
  border: 1px solid #e2e6e3;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(23, 33, 41, 0.07);
}

.loginPanel {
  display: grid;
  width: min(100%, 420px);
  gap: 16px;
  padding: 26px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #2f8f6c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.muted {
  color: #6d747c;
  line-height: 1.6;
}

.appLayout {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  padding: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.topbarActions {
  display: flex;
  gap: 10px;
}

.mainGrid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.projectButton {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 72px;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: transparent;
  text-align: left;
}

.projectButton strong {
  font-size: 15px;
}

.projectButton span {
  overflow: hidden;
  color: #6d747c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projectButton.active {
  background: #e8f4ef;
  color: #173f30;
}

.workspace {
  min-height: 680px;
  padding: 18px;
}

.projectHeader {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e8ebe8;
  padding-bottom: 16px;
}

.projectMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #f1f3f2;
  color: #596169;
  font-size: 12px;
  font-weight: 800;
}

.pill.good {
  background: #e8f4ef;
  color: #237455;
}

.sectionGrid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.configSection {
  border: 1px solid #e3e7e4;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.fieldGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  color: #353b42;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #d9dfdb;
  border-radius: 8px;
  background: #fbfcfb;
  color: #20242a;
  font-weight: 700;
}

.field input {
  min-height: 40px;
  padding: 0 10px;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  padding: 10px;
}

.field.boolean {
  min-height: 40px;
  grid-template-columns: 18px 1fr;
  align-items: center;
  border: 1px solid #e0e6e2;
  border-radius: 8px;
  padding: 0 10px;
  background: #fbfcfb;
}

.field.boolean input {
  min-height: 16px;
}

.readonlyBox {
  border-radius: 8px;
  padding: 11px;
  background: #f5f6f8;
  color: #5f6770;
  font-weight: 700;
}

.formFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  border-top: 1px solid #e8ebe8;
  padding-top: 16px;
}

.primaryButton,
.ghostButton {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
  text-decoration: none;
}

.primaryButton {
  border: 0;
  background: #237455;
  color: #fff;
}

.primaryButton:disabled {
  background: #aeb7b2;
  cursor: not-allowed;
}

.ghostButton {
  border: 1px solid #d9dfdb;
  background: #fff;
  color: #20242a;
}

.notice {
  margin: 0;
  margin-top: 14px;
  border: 1px solid rgba(35, 116, 85, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  background: #eef8f3;
  color: #237455;
  font-weight: 800;
}

.notice.error {
  border: 1px solid rgba(185, 74, 63, 0.22);
  background: #fff2ef;
  color: #a33d32;
}

.field.wide {
  grid-column: 1 / -1;
}

.linkButton {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .appLayout {
    padding: 8px;
  }

  .topbar,
  .projectHeader,
  .formFooter {
    display: grid;
  }

  .mainGrid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-auto-flow: column;
    grid-auto-columns: 220px;
    overflow-x: auto;
  }

  .fieldGrid {
    grid-template-columns: 1fr;
  }
}
