:root {
  --focus: #14694d;
  --cmd-bg: #ffffff;
  --cmd-text: #1b211d;
  --cmd-line: #d9ddd8;
  --cmd-focus: #e8f1ec;
  --cmd-radius: 10px;
}

body.design-context {
  overflow: hidden;
  background: #f1f3f0;
  color: #1b211d;
}
.ct-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  min-height: 100dvh;
}
.ct-side {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 12px;
  border-right: 1px solid #d4d9d3;
  background: #f8f9f7;
}
.ct-brand {
  display: flex;
  min-height: 52px;
  align-items: center;
  padding: 0 9px 10px;
  border-bottom: 1px solid #d8dcd7;
}
.ct-brand .brand-logo {
  width: 94px;
  filter: invert(1);
}
.ct-nav {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 8px 0;
}
.ct-group {
  margin: 0 0 8px;
}
.ct-group h2 {
  margin: 0;
  padding: 7px 9px 4px;
  color: #8b918b;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}
.ct-nav button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #626862;
  font-size: 11px;
  text-align: left;
}
.ct-nav button .icon {
  width: 15px;
  height: 15px;
}
.ct-nav button small {
  color: #a3a8a3;
  font:
    8.5px ui-monospace,
    monospace;
}
.ct-nav button.is-active {
  background: #e4eee8;
  color: #175a43;
  font-weight: 670;
}
.ct-profile {
  display: grid;
  grid-template-columns: 32px 1fr 28px;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px 4px 0;
  border-top: 1px solid #d8dcd7;
}
.ct-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #bfc7bf;
  border-radius: 8px;
  background: #e8f1ec;
  color: #185a43;
  font-size: 10px;
  font-weight: 750;
}
.ct-profile strong {
  display: block;
  font-size: 10px;
}
.ct-profile small {
  color: #939993;
  font-size: 8.5px;
}
.ct-profile button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #787e78;
}

.ct-app {
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr) 28px;
  min-width: 0;
  min-height: 0;
}
.ct-top {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(260px, 480px) auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid #d4d9d3;
  background: #fff;
}
.ct-title strong {
  display: block;
  font-size: 13.5px;
}
.ct-title span {
  display: block;
  margin-top: 2px;
  color: #8b918b;
  font-size: 9px;
}
.ct-search {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #d4d9d3;
  border-radius: 8px;
  background: #f8f9f7;
  color: #858b85;
}
.ct-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}
.ct-search kbd {
  padding: 2px 5px;
  border: 1px solid #d4d9d3;
  border-radius: 4px;
  font:
    8px ui-monospace,
    monospace;
}
.ct-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.ct-actions button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #d4d9d3;
  border-radius: 7px;
  background: #fff;
  font-size: 10px;
}
.ct-actions .primary {
  border-color: #176749;
  background: #176749;
  color: #fff;
  font-weight: 680;
}

.ct-work {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(400px, 1.18fr);
  min-width: 0;
  min-height: 0;
}
.ct-list-pane {
  display: grid;
  grid-template-rows: 48px 42px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #d4d9d3;
  background: #fff;
}
.ct-pane-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #dde1dc;
}
.ct-pane-head h1 {
  margin: 0;
  font-size: 13px;
}
.ct-pane-head .sample-tag {
  margin-left: auto;
  color: #747a74;
}
.ct-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  border-bottom: 1px solid #dde1dc;
  background: #f8f9f7;
}
.ct-filters button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #777d77;
  font-size: 9.5px;
}
.ct-filters button.is-active {
  border-color: #cbd1cb;
  background: #fff;
  color: #1b211d;
}
.ct-list {
  min-height: 0;
  overflow: auto;
}
.ct-list-header,
.ct-list-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 92px;
  align-items: center;
}
.ct-list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 32px;
  border-bottom: 1px solid #d4d9d3;
  background: #f0f2ef;
  color: #8a908a;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ct-list-header > *,
.ct-list-row > * {
  padding: 0 12px;
}
.ct-list-row {
  min-height: 58px;
  border-bottom: 1px solid #e3e6e2;
  background: #fff;
  font-size: 10px;
}
.ct-list-row:hover {
  background: #fafbf9;
}
.ct-list-row.is-selected {
  background: #eaf2ed;
  box-shadow: inset 3px 0 #176749;
}
.ct-list-row .id {
  color: #898f89;
  font:
    9px ui-monospace,
    monospace;
}
.ct-list-row strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-list-row small {
  display: block;
  margin-top: 4px;
  color: #909690;
  font-size: 8.5px;
}
.ct-status {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  gap: 5px;
  font-size: 9px;
}
.ct-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67967f;
  content: "";
}
.ct-list-row.is-error {
  background: #fff6f4;
}
.ct-list-row.is-error .ct-status {
  color: #9d4738;
}
.ct-list-row.is-error .ct-status::before {
  border-radius: 2px;
  background: #c85d49;
}
.ct-empty-row {
  padding: 18px 14px;
  border-bottom: 1px solid #e3e6e2;
  color: #777d77;
  font-size: 10px;
}
.ct-empty-row strong {
  display: block;
  color: #454b45;
  margin-bottom: 4px;
}

.ct-detail {
  display: grid;
  grid-template-rows: 80px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #f7f8f6;
}
.ct-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid #d4d9d3;
  background: #fff;
}
.ct-detail-head .ct-check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #bfc8c0;
  border-radius: 8px;
  color: #176749;
}
.ct-detail-head h2 {
  margin: 0;
  font-size: 15px;
}
.ct-detail-head p {
  margin: 3px 0 0;
  color: #8a908a;
  font-size: 9px;
}
.ct-detail-head .ct-detail-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.ct-detail-head button {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #d1d6d1;
  border-radius: 7px;
  background: #fff;
  font-size: 9.5px;
}
.ct-detail-head .save {
  border-color: #176749;
  background: #176749;
  color: #fff;
}
.ct-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  min-width: 0;
  min-height: 0;
}
.ct-description {
  min-width: 0;
  overflow: auto;
  padding: 24px;
  border-right: 1px solid #d4d9d3;
}
.ct-description h3 {
  margin: 0 0 8px;
  font-size: 11px;
}
.ct-description p {
  max-width: 62ch;
  margin: 0 0 18px;
  color: #626862;
  font-size: 11px;
  line-height: 1.55;
}
.ct-terminal-card {
  display: grid;
  grid-template-rows: 36px 190px;
  overflow: hidden;
  border: 1px solid #cfd5cf;
  border-radius: 10px;
  background: #161916;
}
.ct-terminal-card header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-bottom: 1px solid #343934;
  color: #bdc2bd;
  font-size: 9px;
}
.ct-terminal-card pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #dce1dc;
  font:
    10px/1.6 ui-monospace,
    monospace;
  white-space: pre-wrap;
}
.ct-terminal-card .prompt {
  color: #73bd95;
}
.ct-detail-side {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: #f0f2ef;
}
.ct-property {
  padding: 11px 0;
  border-bottom: 1px solid #d5dad5;
}
.ct-property label {
  display: block;
  color: #8b918b;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ct-property strong {
  display: block;
  margin-top: 5px;
  font-size: 10px;
}
.ct-property p {
  margin: 4px 0 0;
  color: #777d77;
  font-size: 9px;
  line-height: 1.4;
}
.ct-recovery {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e2b9b0;
  border-radius: 8px;
  background: #fff2ef;
}
.ct-recovery strong {
  color: #963f30;
}
.ct-recovery button {
  margin-top: 9px;
  min-height: 29px;
  padding: 0 8px;
  border: 1px solid #bb6a59;
  border-radius: 6px;
  background: #fff;
  color: #8c3b2d;
  font-size: 9px;
}

.ct-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  border-top: 1px solid #d4d9d3;
  color: #8c928c;
  font:
    9px ui-monospace,
    monospace;
  text-transform: uppercase;
}
.ct-foot .sample-tag {
  margin-left: auto;
}

@media (max-width: 1120px) {
  .ct-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .ct-work {
    grid-template-columns: minmax(320px, 0.85fr) minmax(360px, 1.15fr);
  }
  .ct-detail-body {
    grid-template-columns: 1fr;
  }
  .ct-detail-side {
    display: none;
  }
}

@media (max-width: 760px) {
  body.design-context {
    overflow: auto;
  }
  .ct-shell {
    display: block;
  }
  .ct-side {
    position: fixed;
    z-index: 50;
    inset: 0 56px 0 0;
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }
  .nav-open .ct-side {
    transform: translateX(0);
  }
  .ct-app {
    display: block;
  }
  .ct-top {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 56px;
    padding: 0 9px;
  }
  .ct-title {
    display: none;
  }
  .ct-search {
    min-width: 0;
  }
  .ct-search kbd {
    display: none;
  }
  .ct-actions button:not(.primary) {
    display: none;
  }
  .ct-actions .primary {
    width: 34px;
    padding: 0;
    justify-content: center;
  }
  .ct-actions .primary span {
    display: none;
  }
  .ct-work {
    display: block;
  }
  .ct-list-pane {
    min-height: 52vh;
    border-right: 0;
  }
  .ct-detail {
    min-height: 65vh;
    border-top: 1px solid #d4d9d3;
  }
  .ct-detail-head {
    padding: 0 12px;
  }
  .ct-detail-head .ct-detail-actions button:not(.save) {
    display: none;
  }
  .ct-description {
    padding: 18px 14px 32px;
    border-right: 0;
  }
  .ct-foot {
    min-height: 28px;
  }
}
