:root {
  font-family:
    Inter,
    Segoe UI,
    system-ui,
    sans-serif;
  color: #253c34;
  background: #f6f8f5;
  font-synthesis: none;
  --green: #27634a;
  --line: #e0e7df;
  --muted: #748278;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: var(--green);
}
[hidden] {
  display: none !important;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 24px;
  letter-spacing: -0.8px;
  color: inherit;
  text-decoration: none;
}
.brand:first-letter {
  color: #b8d4a8;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: #788b7e;
}
h1 {
  font-weight: 500;
  letter-spacing: -1.5px;
  font-size: 38px;
  line-height: 1.15;
  margin: 14px 0;
}
h2 {
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.5px;
}
p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
small {
  color: #a6b3a8;
}
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-intro {
  background: #172e25;
  color: #f3f6ef;
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image: radial-gradient(
    ellipse at 90% 100%,
    #36513b 0,
    transparent 60%
  );
}
.auth-intro h1 {
  font-size: 64px;
  letter-spacing: -3px;
}
.auth-intro p {
  color: #b1beb4;
  font-size: 16px;
}
.auth-intro .eyebrow {
  color: #b8cdaf;
}
.principles {
  display: flex;
  gap: 18px;
  margin-top: 40px;
  font-size: 11px;
  color: #c2d3bb;
  flex-wrap: wrap;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px;
}
.auth-card {
  width: 100%;
  max-width: 360px;
}
.auth-card h2 {
  font-size: 32px;
  margin-bottom: 4px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 18px 0 8px;
}
input,
textarea,
select {
  border: 1px solid #d9e1d7;
  border-radius: 7px;
  background: #fff;
  color: #253c34;
  padding: 12px;
  width: 100%;
  margin-top: 7px;
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #76a687;
  border-color: transparent;
}
.primary {
  background: #2c634b;
  color: white;
  border-radius: 7px;
  padding: 12px 18px;
  display: inline-flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-weight: 550;
  font-size: 13px;
}
.auth-card .primary {
  width: 100%;
  margin-top: 18px;
}
.text-button {
  font-size: 12px;
  color: var(--green);
  padding: 10px 0;
}
.auth-card .text-button {
  margin-top: 18px;
}
.error {
  color: #a54435;
  font-size: 12px;
}
.secret {
  display: block;
  word-break: break-all;
  background: #e8eee4;
  padding: 16px;
  border-radius: 6px;
  font-size: 13px;
}
.workspace {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 246px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 30px 22px 16px;
  background: #edf1e9;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}
.sidebar .brand {
  font-size: 22px;
  margin-bottom: 44px;
}
.workspace-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #82917e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.pill {
  font-size: 8px;
  background: #dfe8d8;
  border: 1px solid #d0ddc8;
  padding: 3px 6px;
  border-radius: 4px;
  color: #667b5d;
}
.outline {
  border: 1px solid #ccd9c7;
  border-radius: 7px;
  padding: 11px 15px;
  font-size: 12px;
  text-align: center;
  background: #f7f9f4;
}
.project-list {
  margin-top: 22px;
  overflow: auto;
}
.project-item {
  width: 100%;
  text-align: left;
  padding: 13px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin: 3px 0;
  display: flex;
  gap: 9px;
}
.project-item.active {
  background: #dfe8d9;
  color: #2c5942;
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
}
.nav-button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  font-size: 12px;
  padding: 12px 3px;
  color: #6c7b69;
}
.account {
  border-top: 1px solid #d9e1d4;
  padding-top: 18px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}
.account #account-email {
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar {
  display: grid;
  place-items: center;
  background: #dce7d4;
  border: 1px solid #cddac4;
  border-radius: 50%;
  height: 30px;
  width: 30px;
  flex-shrink: 0;
  font-size: 12px;
}
.icon-button {
  margin-left: auto;
  font-size: 20px;
}
.main {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.breadcrumb {
  color: #929d93;
}
.connection {
  font-size: 11px;
  color: #6b856a;
}
.connection:before {
  content: "●";
  font-size: 8px;
  margin-right: 7px;
}
.coding-view,
.page {
  padding: 40px;
  max-width: 1600px;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.page-heading h1 {
  font-size: 34px;
}
.page-heading p {
  margin-top: 10px;
  font-size: 13px;
}
.machine-badge {
  font-size: 9px;
  color: #788a70;
  white-space: nowrap;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 5px;
  letter-spacing: 1px;
}
.readiness {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 30px;
}
.readiness span {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 10px;
  background: #fff;
}
.readiness .missing {
  background: #fbf5e9;
  color: #8b7246;
  border-color: #e9dcc5;
}
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
}
.conversation,
.activity {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.section-heading {
  padding: 17px 22px;
  border-bottom: 1px solid #edf0e9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.section-heading h2 {
  font-size: 13px;
  letter-spacing: 0;
  margin: 0;
}
.section-heading .text-button {
  padding: 0;
  font-size: 11px;
}
.subtle {
  font-size: 9px;
  color: #929f90;
  font-weight: 500;
}
.messages {
  min-height: 330px;
  max-height: 55vh;
  overflow: auto;
  padding: 24px;
}
.empty {
  text-align: center;
  max-width: 360px;
  margin: 48px auto;
}
.empty-mark {
  font-size: 35px;
  color: #758a6d;
  background: #eff3ea;
  border-radius: 14px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: auto;
}
.empty h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.4px;
  margin-top: 23px;
}
.empty p {
  font-size: 12px;
}
.composer {
  margin: 0 18px 18px;
  border: 1px solid #d5dfd0;
  border-radius: 8px;
  box-shadow: 0 3px 8px #193b2310;
}
.composer textarea {
  border: 0;
  background: transparent;
  resize: vertical;
  font-size: 13px;
  padding: 16px;
  margin: 0;
  min-height: 94px;
}
.composer textarea:focus {
  outline: none;
}
.composer:focus-within {
  outline: 2px solid #9fb49a;
}
.composer-footer {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #edf0e9;
  gap: 8px;
}
.composer-footer select {
  width: auto;
  max-width: 180px;
  font-size: 11px;
  padding: 6px;
  margin: 0;
  border: 0;
  background: #f1f5ed;
}
.composer-footer > span {
  font-size: 9px;
  color: #919c8f;
  margin-left: auto;
}
.composer-footer .primary {
  font-size: 11px;
  padding: 9px 12px;
  white-space: nowrap;
}
.activity {
  align-self: start;
  min-height: 420px;
}
.job-item {
  padding: 16px 20px;
  border-bottom: 1px solid #edf0e9;
  width: 100%;
  text-align: left;
}
.job-item.active {
  background: #f3f7ef;
}
.job-item strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-item small {
  display: block;
  font-size: 10px;
  margin-top: 7px;
}
.state {
  display: inline-block;
  font-size: 9px;
  border-radius: 4px;
  padding: 3px 6px;
  background: #eef3e8;
  color: #637d51;
  margin-top: 8px;
}
.state.failed,
.state.interrupted {
  background: #fbede7;
  color: #aa6450;
}
.state.running {
  background: #e5f1eb;
  color: #34775a;
}
.activity-note {
  padding: 26px 22px;
}
.activity-note > span {
  font-size: 24px;
  color: #79956f;
}
.activity-note h3 {
  font-size: 13px;
  font-weight: 500;
}
.activity-note p {
  font-size: 11px;
}
.message {
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #e9eee5;
  border-radius: 8px;
  background: #fbfcf9;
}
.message.user {
  background: #edf4e8;
}
.message .role {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6f8766;
  font-weight: 700;
  margin-bottom: 9px;
}
.message pre {
  font:
    12px/1.7 ui-monospace,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.message.tool {
  background: #f4f5f2;
}
.job-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 24px;
  margin: 20px 0;
}
.card pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}
.card h2 {
  font-size: 18px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.approval-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.approval-actions input {
  width: 150px;
  margin: 0;
}
.approval-actions button {
  white-space: nowrap;
}
dialog {
  max-width: 500px;
  width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 20px 100px #10201833;
}
dialog::backdrop {
  background: #10201866;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
#toast {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 100;
  background: #263e2e;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 6px 25px #0002;
  font-size: 13px;
  max-width: 420px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1100px) {
  .coding-view,
  .page {
    padding: 28px;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .activity {
    min-height: 0;
  }
  .activity-note {
    display: none;
  }
  .sidebar {
    width: 210px;
  }
  .auth-intro {
    padding: 36px;
  }
  .auth-intro h1 {
    font-size: 50px;
  }
}
@media (max-width: 700px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-intro {
    min-height: 210px;
    padding: 24px;
  }
  .auth-intro h1 {
    font-size: 35px;
    margin: 14px 0;
  }
  .auth-intro .brand {
    margin-bottom: 30px;
  }
  .auth-intro p,
  .auth-intro small,
  .principles {
    display: none;
  }
  .auth-panel {
    padding: 30px 24px;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    margin-bottom: 18px;
  }
  .workspace-label,
  .sidebar-bottom .account .avatar,
  .sidebar-bottom .account #account-email {
    display: none;
  }
  .sidebar-bottom .account {
    display: flex;
    padding: 0;
    margin: 0;
    border: 0;
  }
  .sidebar-bottom {
    display: flex;
    padding-top: 10px;
    gap: 10px;
  }
  .nav-button {
    font-size: 10px;
    padding: 7px 0;
    min-height: 44px;
  }
  .project-list {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    max-width: 100%;
    overflow: auto;
  }
  .project-item {
    white-space: nowrap;
    width: auto;
  }
  .topbar {
    height: 54px;
    padding: 0 20px;
  }
  .coding-view,
  .page {
    padding: 24px 16px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .machine-badge {
    display: none;
  }
  .readiness {
    gap: 6px;
    margin-bottom: 20px;
  }
  .readiness span {
    font-size: 9px;
  }
  .messages {
    padding: 14px;
    min-height: 280px;
  }
  .composer {
    margin: 0 10px 10px;
  }
  .composer-footer > span {
    display: none;
  }
  .composer-footer .primary {
    margin-left: auto;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .approval-actions {
    flex-wrap: wrap;
  }
}

.activity-detail {
  padding: 10px 14px;
}
.activity-detail summary {
  cursor: pointer;
  color: var(--muted, #52675e);
  font-size: 13px;
}
.activity-detail pre {
  max-height: 320px;
  overflow: auto;
  margin-top: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.task-screenshot {
  display: block;
  max-width: min(360px, 100%);
  max-height: 240px;
  object-fit: contain;
  margin: 10px 0;
  border-radius: 8px;
}
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 14px;
}
.attachment-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d4dfd2;
  border-radius: 8px;
  max-width: 100%;
}
.attachment-card img {
  width: 64px;
  height: 48px;
  object-fit: contain;
}
.attachment-card span {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.composer-footer {
  flex-wrap: wrap;
  gap: 8px;
}
