:root {
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color:#253031;
  background:#f4f6f5;
  font-synthesis:none;
  --muted:#687775;
  --line:#dce4e1;
  --accent:#137968;
  --soft:#e8f3ed;
  --danger:#b73535
}

* {
  box-sizing:border-box
}

body {
  margin:0
}

button,input,select,textarea {
  font:inherit
}

button {
  cursor:pointer;
  background:white;
  border:1px solid #cbd6d1;
  border-radius:7px;
  padding:9px 14px;
  color:inherit;
  line-height:1.35
}

button:hover {
  background:#edf3ef;
  border-color:#a9bdb4
}

button:disabled {
  cursor:default;
  opacity:.5
}

button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #b3ddd0;
  outline-offset:2px
}

button.primary {
  background:var(--accent);
  border-color:var(--accent);
  color:white
}

button.primary:hover {
  background:#0c6556
}

button.danger {
  color:var(--danger);
  border-color:#e5bcbc
}

button.text-button {
  background:transparent;
  border-color:transparent;
  color:var(--accent);
  padding:7px 6px
}

input,select,textarea {
  border:1px solid #ccd8d1;
  border-radius:7px;
  background:white;
  padding:10px 11px;
  width:100%;
  color:inherit
}

textarea {
  resize:vertical;
  line-height:1.6;
  tab-size:2
}

textarea.code-editor,.mono,.code-view {
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace
}

label {
  display:block;
  font-size:13px;
  font-weight:600;
  margin:17px 0 7px
}

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

h1 {
  font-size:25px;
  letter-spacing:-.6px;
  margin-bottom:8px;
  font-weight:650
}

h2 {
  font-size:16px;
  margin-bottom:0;
  font-weight:650
}

h3 {
  font-size:14px;
  margin-bottom:10px
}

p {
  line-height:1.6
}

.muted {
  color:var(--muted)
}

.small {
  font-size:12px
}

.help {
  font-size:12px;
  color:var(--muted);
  margin:8px 0 0;
  line-height:1.65
}

.error {
  color:var(--danger);
  font-size:13px;
  margin:12px 0 0;
  white-space:pre-wrap
}

.full {
  width:100%
}

[hidden] {
  display:none!important
}

.brand-mark {
  width:35px;
  height:35px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#1c3e35;
  color:white;
  font-size:17px;
  font-weight:700
}

.login-view {
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:radial-gradient(ellipse at 20% 10%,#deeee6 0,transparent 60%),#f4f6f5
}

.login-card {
  width:min(440px,100%);
  padding:36px;
  background:white;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 12px 60px #17392d0c
}

.login-card .brand-mark {
  margin-bottom:24px
}

.login-card h1 {
  font-size:24px
}

.login-card .primary {
  margin-top:23px
}

.workspace {
  display:flex;
  min-height:100vh
}

.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:190px;
  padding:29px 18px 20px;
  background:#fdfefd;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column
}

.brand {
  display:flex;
  gap:10px;
  align-items:center;
  font-size:14px;
  font-weight:650;
  white-space:nowrap
}

.brand small {
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:400;
  margin-top:3px
}

.sidebar nav {
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:42px
}

.nav-button {
  border:0;
  text-align:left;
  background:transparent;
  padding:12px 17px;
  font-size:14px
}

.nav-button.active {
  color:#126450;
  background:var(--soft);
  font-weight:650
}

.sidebar-bottom {
  margin-top:auto;
  display:grid;
  gap:10px;
  justify-items:start
}

.connection {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px
}

.connection:before {
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#4e9d78
}

.connection.offline:before {
  background:#b73535
}

main {
  margin-left:190px;
  min-width:0;
  width:calc(100% - 190px);
  padding:32px 35px 50px;
  max-width:1820px
}

.page-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px
}

.page-header p {
  font-size:13px;
  margin:0
}

.page-header #retention {
  font-size:12px;
  padding-top:7px;
  white-space:nowrap
}

.panel {
  background:white;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden
}

.panel-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:17px 19px;
  border-bottom:1px solid #e8eeeb
}

.toolbar {
  display:flex;
  gap:9px;
  margin-bottom:17px;
  align-items:center
}

.toolbar input {
  flex:1
}

.toolbar select {
  width:130px
}

.toolbar button {
  white-space:nowrap
}

.task-layout {
  display:grid;
  grid-template-columns:minmax(240px,320px) minmax(0,1fr);
  gap:20px;
  align-items:start
}

.task-list {
  max-height:calc(100vh - 245px);
  min-height:200px;
  overflow-y:auto
}

.task-row,.skill-row {
  border:0;
  border-radius:0;
  border-bottom:1px solid #edf1ee;
  width:100%;
  text-align:left;
  padding:16px 18px;
  background:transparent
}

.task-row:last-child,.skill-row:last-child {
  border-bottom:0
}

.task-row.selected,.skill-row.selected {
  background:#edf6f0;
  box-shadow:inset 3px 0 0 var(--accent)
}

.row-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:9px
}

.row-title {
  font-size:13px;
  font-weight:600
}

.task-id {
  font-size:11px;
  color:var(--muted);
  overflow-wrap:anywhere;
  line-height:1.6
}

.row-bottom {
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:11px;
  color:var(--muted);
  margin-top:7px
}

.status {
  font-size:11px;
  line-height:1.5;
  padding:3px 7px;
  border-radius:5px;
  background:#eef0ef;
  color:#63716b;
  white-space:nowrap
}

.status.running,.status.queued,.status.cancelling {
  background:#e8f1fb;
  color:#286bb0
}

.status.succeeded {
  background:#e5f3e9;
  color:#28814b
}

.status.failed,.status.timeout {
  background:#fbeceb;
  color:#ad4741
}

.task-detail {
  display:grid;
  gap:16px;
  min-width:0
}

.empty {
  color:var(--muted);
  font-size:13px;
  text-align:center;
  padding:28px 18px;
  margin:0;
  line-height:1.8
}

.large-empty {
  min-height:300px;
  display:grid;
  place-items:center
}

.detail-title {
  padding:20px 21px 15px
}

.detail-title h2 {
  margin:11px 0 7px
}

.detail-title .actions {
  margin-top:15px
}

.metrics {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-top:1px solid #edf1ee
}

.metric {
  padding:15px 19px;
  min-width:0;
  border-right:1px solid #edf1ee
}

.metric:last-child {
  border:0
}

.metric span {
  font-size:11px;
  color:var(--muted);
  display:block;
  margin-bottom:6px
}

.metric strong {
  font-size:16px;
  font-weight:600;
  overflow-wrap:anywhere
}

.detail-message {
  padding:12px 20px;
  background:#fafcfb;
  border-top:1px solid #edf1ee;
  font-size:12px;
  color:var(--muted);
  white-space:pre-wrap;
  overflow-wrap:anywhere
}

.actions {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap
}

.timeline {
  padding:8px 18px
}

.job-row {
  padding:14px 2px;
  border-bottom:1px solid #edf1ee
}

.job-row:last-child {
  border:0
}

.job-meta {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:11px;
  margin:8px 0 10px
}

.job-row .actions button {
  padding:6px 10px;
  font-size:12px
}

.code-view {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:12px;
  line-height:1.8;
  margin:0;
  padding:20px;
  background:#fbfcfb;
  color:#35433e;
  max-height:620px;
  overflow:auto
}

.skills-layout {
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:20px
}

.skill-row strong {
  font-size:13px;
  display:block;
  margin-bottom:7px;
  overflow-wrap:anywhere
}

.skill-row span {
  font-size:11px;
  color:var(--muted)
}

.skill-meta {
  padding:18px 20px;
  display:grid;
  gap:9px;
  font-size:12px;
  overflow-wrap:anywhere
}

.skill-meta p {
  margin:0
}

.skill-meta .actions {
  margin-top:6px
}

.skill-meta .label {
  display:inline-block;
  color:var(--muted);
  min-width:65px
}

.experiment-layout {
  display:grid;
  grid-template-columns:minmax(290px,.9fr) minmax(350px,1.2fr);
  gap:20px;
  align-items:start
}

.experiment-editors {
  display:grid;
  gap:16px
}

.form-panel {
  padding:20px
}

.form-panel .panel-heading {
  padding:0 0 15px;
  margin-bottom:14px
}

.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px
}

.form-grid label {
  margin-top:16px
}

.code-editor {
  font-size:12px
}

.checkbox-label {
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:400
}

.checkbox-label input {
  width:16px;
  height:16px
}

.run-bar {
  position:sticky;
  bottom:0;
  z-index:1;
  margin:18px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:14px 18px;
  background:#ffffffee;
  border:1px solid var(--line);
  border-radius:10px;
  backdrop-filter:blur(10px);
  box-shadow:0 8px 28px #1a3a2410
}

.run-bar p {
  margin:0
}

.run-bar .actions {
  flex-wrap:nowrap
}

.run-bar button {
  white-space:nowrap
}

.notice {
  background:#e9f3ef;
  border:1px solid #cbded4;
  color:#2c6550;
  border-radius:8px;
  padding:12px 16px;
  margin-bottom:18px;
  font-size:13px;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}

.notice.error-notice {
  background:#fff0ec;
  border-color:#eed0c6;
  color:#9e493a
}

.file-grid {
  padding:14px 18px;
  display:flex;
  gap:8px;
  flex-wrap:wrap
}

.file-grid button {
  font-size:12px;
  padding:7px 10px
}

.output-list {
  padding:0 20px
}

.output-item {
  border-bottom:1px solid #e8eeeb;
  padding:17px 0
}

.output-item:last-child {
  border:0
}

.output-item h3 {
  margin-bottom:7px
}

.output-item pre {
  font-family:inherit;
  white-space:pre-wrap;
  font-size:12px;
  line-height:1.8;
  margin:0;
  max-height:200px;
  overflow:auto;
  color:#4d6057;
  overflow-wrap:anywhere
}

.output-tabs {
  display:flex;
  gap:5px;
  padding:12px 18px 0
}

.output-tabs button {
  font-size:12px;
  padding:7px 12px
}

.output-tabs button.selected {
  background:var(--soft);
  border-color:#b6d3c2;
  color:var(--accent)
}

.preview-stage {
  padding:18px;
  border-bottom:1px solid #e5ece7
}

#preview-panel {
  margin-top:18px;
  scroll-margin-top:80px
}

.preview-stage summary {
  font-weight:650;
  cursor:pointer
}

.preview-stage:last-child {
  border-bottom:0
}

.preview-stage h3 {
  margin:0 0 10px
}

.preview-stage .code-view {
  border:1px solid var(--line);
  border-radius:7px;
  max-height:500px
}

.preview-stage .help {
  margin-bottom:10px
}

dialog {
  border:1px solid var(--line);
  border-radius:12px;
  width:min(1000px,calc(100vw - 40px));
  max-height:90vh;
  padding:0;
  box-shadow:0 24px 90px #19322830
}

dialog::backdrop {
  background:#20382f66;
  backdrop-filter:blur(2px)
}

dialog[open] {
  display:flex;
  flex-direction:column
}

.dialog-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  padding:18px 20px;
  border-bottom:1px solid var(--line);
  flex-shrink:0
}

.dialog-heading p {
  margin:7px 0 0;
  overflow-wrap:anywhere
}

.dialog-heading h2 {
  overflow-wrap:anywhere
}

.dialog-heading > button {
  flex-shrink:0;
  white-space:nowrap
}

.dialog-actions {
  display:flex;
  flex-wrap:wrap;
  flex-shrink:0;
  gap:10px;
  justify-content:flex-end;
  padding:13px 20px;
  border-top:1px solid var(--line)
}

#file-back {
  margin-right:auto
}

.file-status {
  flex-shrink:0;
  margin:0;
  padding:11px 20px;
  background:var(--soft);
  border-bottom:1px solid var(--line);
  font-size:12px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}

.file-status:empty {
  display:none
}

.file-status.error {
  color:var(--danger);
  background:#fff0ec
}

.job-file-actions {
  max-height:150px;
  overflow:auto;
  flex-shrink:0
}

dialog .code-view {
  max-height:65vh;
  min-height:60px;
  flex:1;
  overflow:auto
}

.inline-input {
  width:90px!important;
  padding:7px 9px;
  font-size:12px
}

.detail-source {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap
}

.detail-source label {
  margin:0;
  color:var(--muted);
  font-size:12px;
  font-weight:400
}

.warning-list {
  padding:13px 20px;
  background:#fffaf0;
  font-size:12px;
  color:#8b6930;
  line-height:1.7;
  margin:0;
  list-style-position:inside
}

.busy {
  pointer-events:none;
  opacity:.6
}

@media(min-width:1500px) {
  main {
    padding-left:45px;
    padding-right:45px
  }
  .task-layout {
    grid-template-columns:350px minmax(0,1fr)
  }
}
@media(max-width:1150px) {
  main {
    padding:26px 22px
  }
  .sidebar {
    width:160px;
    padding-left:13px;
    padding-right:13px
  }
  main {
    margin-left:160px;
    width:calc(100% - 160px)
  }
  .task-layout {
    grid-template-columns:230px minmax(0,1fr)
  }
  .metrics {
    grid-template-columns:1fr 1fr
  }
  .metric:nth-child(2) {
    border-right:0
  }
  .metric:nth-child(-n+2) {
    border-bottom:1px solid #edf1ee
  }
  .experiment-layout {
    grid-template-columns:1fr
  }
  .skills-layout {
    grid-template-columns:220px minmax(0,1fr)
  }
}

@media(max-width:780px) {
  .sidebar {
    position:static;
    width:100%;
    padding:14px 18px;
    flex-direction:row;
    align-items:center;
    gap:20px;
    border-right:0;
    border-bottom:1px solid var(--line)
  }
  .sidebar nav {
    margin:0;
    flex-direction:row;
    gap:3px
  }
  .nav-button {
    padding:9px 13px
  }
  .sidebar-bottom {
    margin:0 0 0 auto;
    gap:0
  }
  .sidebar-bottom #server-version,.sidebar-bottom .connection {
    display:none
  }
  .brand small {
    display:none
  }
  .brand-mark {
    width:29px;
    height:29px;
    font-size:14px
  }
  .workspace {
    display:block
  }
  main {
    margin:0;
    width:100%;
    padding:24px 16px
  }
  .page-header {
    display:block
  }
  .page-header #retention {
    padding-top:8px
  }
  .toolbar {
    flex-wrap:wrap
  }
  .toolbar input {
    flex-basis:100%
  }
  .toolbar select {
    flex:1;
    width:auto
  }
  .task-layout,.skills-layout {
    grid-template-columns:1fr
  }
  .task-list {
    max-height:260px
  }
  .task-detail {
    scroll-margin-top:80px
  }
  .skills-layout #skill-list {
    display:grid;
    grid-template-columns:1fr 1fr
  }
  .skill-row {
    border-right:1px solid #edf1ee
  }
  .run-bar {
    position:static;
    display:block
  }
  .run-bar .actions {
    margin-top:12px;
    justify-content:flex-end
  }
  .brand {
    font-size:12px;
    gap:6px
  }
  .sidebar {
    gap:10px
  }
  .sidebar-bottom .text-button {
    font-size:12px
  }
  .panel-heading {
    padding:15px
  }
  .page-header h1 {
    font-size:23px
  }
}

@media(prefers-reduced-motion:no-preference) {
  button {
    transition:background .12s,border-color .12s
  }
  .page {
    animation:enter .15s ease-out
  }
  @keyframes enter {
    from {
      opacity:.65;
      transform:translateY(3px)
    }
    to {
      opacity:1;
      transform:none
    }
  }
}
