:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #202924;
  background: #f5f7f6;
  font-synthesis: none;
  --green: #287457;
  --muted: #7b8680;
  --border: #e5eae7;
  --shadow: 0 3px 12px #253d3003;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8bd7b0;
  outline-offset: 3px;
}
a {
  color: var(--green);
  text-decoration: none;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce3df;
  border-radius: 9px;
  background: white;
  color: #202924;
  padding: 12px 13px;
  outline: none;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #519b79;
  box-shadow: 0 0 0 3px #28745712;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
input::placeholder,
textarea::placeholder {
  color: #a3aca6;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 23px 0 0;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 9px;
}
label small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin-bottom: 10px;
  font-weight: 650;
}
h2 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 0;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.8;
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
  margin-bottom: 0;
}
.fine {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  color: #818f86;
  margin-bottom: 16px;
}
.primary {
  background: var(--green);
  color: white;
  padding: 12px 20px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  transition: background 0.15s;
}
.primary:hover {
  background: #205e46;
}
.secondary {
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 7px;
  background: white;
}
.full {
  width: 100%;
  margin-top: 26px;
  justify-content: space-between;
}
.text-button {
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
  padding: 8px 0;
}
.text-button:hover {
  text-decoration: underline;
}
.icon-button {
  height: 32px;
  width: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 19px;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  background: #152b23;
  color: #c2cec6;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 34px 18px 22px;
  z-index: 5;
}
.brand {
  color: white;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 13px 38px;
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 650;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 35px;
  font-weight: 700;
  letter-spacing: -4px;
  padding-right: 3px;
}
.brand-mark.small {
  width: 36px;
  height: 38px;
  font-size: 29px;
  border-radius: 9px;
  background: #c8e9ba;
  color: #1a3928;
}
.brand-sub {
  display: block;
  font-size: 8px;
  letter-spacing: 3.5px;
  color: #98ad9e;
  margin-top: 2px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: #82988b;
  padding-left: 15px;
  margin: 0 0 12px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  padding: 13px 14px;
  border-radius: 8px;
  gap: 12px;
  font-size: 13px;
  margin: 4px 0;
}
.nav-item:hover {
  background: #ffffff08;
  color: white;
}
.nav-item.selected {
  background: #ffffff0e;
  color: #e0f2d6;
}
.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 20px;
  line-height: 20px;
  color: #91a99b;
}
.selected .nav-icon {
  color: #c6e4b6;
}
.nav-count {
  margin-left: auto;
  background: #ffffff12;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 65px;
}
.architecture {
  font-size: 11px;
  padding: 16px 14px;
  border: 1px solid #ffffff0f;
  border-radius: 10px;
  margin: 0 4px 24px;
  color: #c6d4c9;
}
.architecture p {
  font-size: 10px;
  color: #82998c;
  margin: 8px 0 0 14px;
  line-height: 1.9;
}
.live-dot {
  height: 5px;
  width: 5px;
  display: inline-block;
  border-radius: 50%;
  background: #99cc8f;
  margin-right: 4px;
}
.muted-nav {
  color: #8d9e93;
}
.workspace {
  margin-left: 224px;
  width: calc(100% - 224px);
  min-width: 0;
}
.topbar {
  height: 76px;
  background: #ffffffcc;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}
.breadcrumb {
  font-size: 12px;
  color: #9aa39d;
  display: flex;
  gap: 15px;
}
.breadcrumb strong {
  font-weight: 500;
  color: #526258;
}
.top-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.sync-state {
  font-size: 11px;
  color: #91a096;
}
.avatar {
  background: #eef2ef;
  color: #5b6d61;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 38px 40px 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 30px;
}
.page-heading .muted {
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.stat > span {
  font-size: 12px;
  color: #75847a;
}
.stat strong {
  display: block;
  font-size: 35px;
  font-weight: 550;
  letter-spacing: -1.5px;
  margin: 15px 0 10px;
}
.stat small {
  font-size: 10px;
  color: #9aa69e;
}
.accent-stat {
  background: #edf4ee;
  border-color: #d8e7db;
}
.accent-stat strong {
  color: var(--green);
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-title {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.quick-start .eyebrow {
  margin-bottom: 14px;
}
.quick-start h2 {
  font-size: 22px;
  margin-bottom: 10px;
}
.quick-start .muted {
  font-size: 12px;
}
.steps {
  margin-top: 22px;
}
.steps > div {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid #f0f3f1;
}
.steps b {
  font-size: 11px;
  color: #8e9e92;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.steps span {
  font-size: 12px;
}
.steps small {
  display: block;
  font-size: 10px;
  color: #8e9a92;
  margin-top: 4px;
}
.steps button {
  margin-left: auto;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 500;
  padding: 5px 8px;
  white-space: nowrap;
  line-height: 1.2;
}
.green {
  background: #edf5ee;
  color: #328359;
}
.neutral {
  background: #f0f3f1;
  color: #7a887f;
}
.amber {
  background: #fff3dc;
  color: #a57419;
}
.red {
  background: #fff0ed;
  color: #ba5640;
}
.blue {
  background: #eaf2fc;
  color: #427bb4;
}
.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f3f1;
  font-size: 12px;
}
.connection-row b {
  font-weight: 500;
  color: #718076;
  max-width: 60%;
  overflow-wrap: anywhere;
}
.info-note {
  font-size: 11px;
  color: #829087;
  background: #f7f9f7;
  padding: 13px 15px;
  line-height: 1.8;
  border-radius: 8px;
  margin-top: 20px;
}
.model-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  border: 1px solid var(--border);
  padding: 15px;
  border-radius: 9px;
}
.model-icon {
  background: #ecf2e9;
  color: #5a8a56;
  border-radius: 9px;
  padding: 10px;
  font-size: 22px;
}
.model-card b {
  font-size: 12px;
  font-weight: 600;
}
.model-card small {
  display: block;
  font-size: 10px;
  color: #8e9a91;
  margin-top: 4px;
}
.model-card .badge {
  margin-left: auto;
}
.empty {
  padding: 54px 20px;
  text-align: center;
  color: #8e9c93;
  font-size: 13px;
}
.empty strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #64756a;
  margin-bottom: 10px;
}
.empty p {
  font-size: 12px;
  margin: 6px 0 0;
}
.compact {
  padding: 35px 12px;
}
.count-pill {
  display: inline-block;
  background: #eff3f0;
  padding: 3px 7px;
  font-size: 10px;
  color: #86978c;
  border-radius: 4px;
  margin-left: 7px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  text-align: left;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th {
  color: #89968e;
  background: #fafbfa;
  font-size: 10px;
  font-weight: 500;
  padding: 12px 13px;
  border-block: 1px solid #eff2f0;
}
td {
  padding: 17px 13px;
  border-bottom: 1px solid #edf1ee;
  line-height: 1.5;
}
td small {
  display: block;
  color: #9ba49e;
  font-size: 10px;
  margin-top: 4px;
}
td .text-button + button {
  margin-left: 13px;
}
.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
}
.email {
  font-weight: 550;
  color: #43564a;
}
.form-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}
.form-grid > .panel {
  padding: 30px;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  gap: 10px;
  color: #6f7d74;
}
.checkbox input {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 4px;
  accent-color: var(--green);
}
.form-error {
  color: #ba5640;
  font-size: 12px;
  margin: 12px 0 0;
  white-space: pre-wrap;
}
.form-error:empty {
  display: none;
}
.generate-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 24px;
  align-items: stretch;
}
.generate-grid label:first-child {
  margin-top: 0;
}
.parameter-strip {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}
.parameter-strip span {
  font-size: 10px;
  color: #76877b;
  border: 1px solid #e6ece7;
  border-radius: 5px;
  padding: 5px 7px;
}
.result-panel {
  min-height: 550px;
  display: flex;
  flex-direction: column;
}
.result-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at center, #f5f8f4, white 75%);
  padding: 45px 20px;
  color: #8b988f;
}
.result-placeholder h3 {
  font-weight: 500;
  font-size: 14px;
  color: #667c6c;
  margin-bottom: 7px;
}
.result-placeholder p {
  font-size: 12px;
}
.placeholder-symbol {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  border: 1px solid #e4ebe3;
  background: #f1f6ee;
  font-size: 40px;
  color: #8eb087;
  margin-bottom: 26px;
}
.result-image {
  display: block;
  max-height: 500px;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 10px;
  object-fit: contain;
}
.result-info {
  font-size: 12px;
  color: #7b887f;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.search-label {
  margin: 0;
}
.search-label input,
.search-label select {
  margin: 0;
  max-width: 230px;
  font-size: 12px;
  padding: 9px 11px;
}
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.settings-note ol {
  padding: 0 0 0 22px;
  margin: 26px 0 0;
  color: #4d6657;
}
.settings-note li {
  padding: 0 0 17px 8px;
  font-size: 12px;
}
.settings-note p {
  font-size: 12px;
  color: #89978d;
  margin: 8px 0 0;
}
.event-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.event-list li {
  border-left: 1px solid #d9e6dc;
  padding: 0 0 18px 16px;
  font-size: 12px;
  line-height: 1.7;
  position: relative;
  color: #64776b;
}
.event-list li:before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  background: #85ab92;
  border-radius: 50%;
  left: -3px;
  top: 6px;
}
.event-list time {
  display: block;
  color: #98a39c;
  font-size: 10px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: #f6f8f6;
  padding: 18px;
  border-radius: 9px;
  margin: 20px 0;
}
.detail-grid dt {
  color: #91a095;
  font-size: 11px;
}
.detail-grid dd {
  margin: 7px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.notice {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 22px;
  font-size: 12px;
  line-height: 1.7;
}
.notice.error {
  background: #fff1ed;
  color: #b95842;
  border: 1px solid #f3d9d1;
}
footer {
  margin-top: 42px;
  padding: 23px 0;
  border-top: 1px solid var(--border);
  color: #9eaaa2;
  font-size: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 20% 20%, #e5efe3, transparent 60%), #f5f7f4;
}
.auth-card {
  width: min(430px, calc(100% - 36px));
  background: white;
  padding: 38px;
  border: 1px solid #e2e9e1;
  border-radius: 20px;
  box-shadow: 0 20px 65px #233b2810;
}
.auth-card .brand-mark {
  margin-bottom: 30px;
}
.auth-card h1 {
  font-size: 28px;
}
.auth-card .muted {
  font-size: 13px;
}
.auth-card .fine {
  margin: 20px 0 0;
  font-size: 10px;
}
.auth-card .eyebrow {
  font-size: 10px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 15px;
  width: min(620px, calc(100% - 32px));
  padding: 27px;
  color: #2b3c30;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 30px 100px #0002;
}
dialog::backdrop {
  background: #112d2466;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #234732;
  color: #e9f5e8;
  box-shadow: 0 4px 30px #0002;
  padding: 13px 23px;
  border-radius: 10px;
  font-size: 12px;
  max-width: 90vw;
  line-height: 1.6;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1600px) {
  main {
    padding-top: 50px;
  }
  .stats {
    gap: 24px;
  }
  .stat {
    padding: 26px;
  }
  .overview-grid {
    gap: 28px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 190px;
    padding-inline: 12px;
  }
  .workspace {
    margin-left: 190px;
    width: calc(100% - 190px);
  }
  main {
    padding: 28px 24px 0;
  }
  .topbar {
    padding: 0 24px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 18px;
  }
  .stat small {
    line-height: 1.8;
    display: block;
  }
  .overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .panel {
    padding: 20px;
  }
  .generate-grid {
    grid-template-columns: 330px 1fr;
    gap: 16px;
  }
  .form-grid {
    gap: 16px;
  }
  .form-grid > .panel {
    padding: 22px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 72px;
    padding: 25px 10px 16px;
  }
  .brand {
    padding: 0 8px 25px;
  }
  .brand > span:last-child,
  .nav-label,
  .nav-count,
  .architecture {
    display: none;
  }
  .nav-item {
    font-size: 0;
    justify-content: center;
    padding: 12px 0;
    gap: 0;
  }
  .nav-icon {
    font-size: 23px;
  }
  .workspace {
    margin-left: 72px;
    width: calc(100% - 72px);
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .overview-grid,
  .form-grid,
  .generate-grid {
    grid-template-columns: 1fr;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading > .badge {
    display: none;
  }
  .topbar {
    height: 60px;
  }
  .sync-state {
    display: none;
  }
  .result-panel {
    min-height: 400px;
  }
  .sidebar-bottom {
    padding-top: 25px;
  }
}
@media (max-width: 500px) {
  main {
    padding: 23px 14px 0;
  }
  .topbar {
    padding: 0 16px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading .muted {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 30px;
  }
  .stat small {
    font-size: 9px;
  }
  .panel {
    padding: 17px;
  }
  .breadcrumb {
    gap: 9px;
  }
  .top-actions {
    gap: 10px;
  }
  .avatar {
    display: none;
  }
  footer span {
    display: none;
  }
  .input-row {
    gap: 10px;
  }
  .form-grid > .panel {
    padding: 20px;
  }
  .panel-title {
    flex-wrap: wrap;
  }
}

.model-parameters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:12px 0; }
.parameter-field { min-width:0; }
.parameter-field label { margin:0; }
.parameter-pair { display:flex; align-items:center; gap:8px; }
.parameter-pair input { min-width:0; }
.parameter-pair .checkbox { flex-shrink:0; }
.parameter-help { font-size:12px; color:var(--muted, #68747c); margin:6px 0 12px; overflow-wrap:anywhere; }
.parameter-help summary { cursor:pointer; }
.parameter-help pre { white-space:pre-wrap; overflow-wrap:anywhere; }
#model-inputs textarea { margin-top:8px; }
@media(max-width:600px) { .model-parameters { grid-template-columns:minmax(0,1fr); } }
