.green-dot {
  background: var(--teal);
}

.app-shell,
.sidebar,
.workspace,
.preview-panel {
  min-height: 0;
}

.app-shell {
  grid-template-columns: 248px minmax(360px, var(--workspace-width, 50%)) 8px minmax(360px, 1fr);
}

.workspace-divider {
  position: relative;
  z-index: 4;
  min-width: 8px;
  background: #0a111a;
  cursor: col-resize;
  touch-action: none;
  outline: 0;
}

.workspace-divider::before {
  content: '';
  position: absolute;
  inset: 0 3px;
  background: #26364a;
  transition: background .15s, box-shadow .15s;
}

.workspace-divider span {
  position: absolute;
  top: 50%;
  left: 1px;
  width: 6px;
  height: 34px;
  translate: 0 -50%;
  border: 1px solid #3b506b;
  border-radius: 5px;
  background: #142235;
}

.workspace-divider:hover::before,
.workspace-divider:focus-visible::before,
body.resizing-columns .workspace-divider::before {
  background: var(--blue);
  box-shadow: 0 0 12px #188cff66;
}

body.resizing-columns {
  cursor: col-resize;
  user-select: none;
}

body.resizing-columns iframe { pointer-events: none; }

.workspace,
.preview-panel {
  overflow: hidden;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.published-url-bar {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  border-bottom: 1px solid #1f493f;
  background: #0f2523;
  color: #8ca4b5;
  font-size: 10px;
}

.published-url-bar[hidden] { display: none; }
.published-url-bar > span { color: #65ddbd; font-weight: 750; white-space: nowrap; }
.published-url-bar i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px #37d3ae88; }
.published-url-bar a:first-of-type { overflow: hidden; color: #cde9e2; text-overflow: ellipsis; white-space: nowrap; }
.published-url-bar button,
.published-url-bar a:last-child { border: 1px solid #2a6759; border-radius: 7px; background: #143b34; color: #73e4c6; padding: 6px 9px; text-decoration: none; cursor: pointer; }
.published-url-bar button:hover,
.published-url-bar a:last-child:hover { border-color: var(--teal); color: white; }

.project-actions {
  position: relative;
}

.project-actions summary {
  list-style: none;
  border: 1px solid #31587b;
  border-radius: 8px;
  padding: 8px 11px;
  background: #142a3d;
  color: #b9d9f5;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.project-actions summary::-webkit-details-marker { display: none; }
.project-actions summary span { margin-left: 7px; color: #79b8e8; }

.project-actions[open] summary,
.project-actions summary:hover,
.project-actions summary:focus-visible {
  border-color: var(--blue);
  color: white;
  outline: 0;
}

.project-actions-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 190px;
  gap: 5px;
  border: 1px solid #2b3d54;
  border-radius: 11px;
  padding: 8px;
  background: #101a27;
  box-shadow: 0 18px 50px #000a;
}

.project-actions-menu > button,
.project-actions-menu > a {
  width: 100%;
  min-height: 35px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
}

.project-actions-menu .delete-project { margin-top: 3px; }

.composer textarea {
  min-height: 86px;
  border: 1px solid #29384c;
  border-radius: 9px;
  background: #030609;
  padding: 12px 13px;
  line-height: 1.5;
}

.composer textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #188cff22;
}

.composer textarea::placeholder { color: #718198; }

.sidebar footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
  gap: 9px;
}

.sidebar-processing {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 12px 6px 0;
  border-top: 1px solid var(--line);
  color: #77879b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-agent-status {
  margin-top: auto;
  padding: 8px 7px 2px;
  border: 0;
  border-radius: 0;
  color: #96a5b8;
  font-size: 10px;
}

.sidebar-processing select {
  width: 100%;
  border: 1px solid #2a384b;
  border-radius: 7px;
  outline: 0;
  background: #0b131f;
  color: #b9c8d9;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
}

.sidebar-processing select:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #188cff22;
}

.token-usage {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: #8bc9ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar footer button { justify-self: start; }
.sidebar footer > span:last-child { justify-self: end; }

.settings-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101a28;
}

.settings-card + .settings-card { margin-top: 20px; }

.settings-card > header,
.settings-card > footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.settings-card h3 { margin: 0 0 7px; font-size: 17px; }
.settings-card header p { margin: 0; color: var(--muted); line-height: 1.55; }
.settings-card > footer { justify-content: flex-end; margin-top: 20px; }

.settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.settings-fields label { display: grid; gap: 5px; color: #c4d0de; font-size: 12px; font-weight: 700; }
.settings-fields small { color: var(--muted); font-size: 10px; font-weight: 500; }
.settings-fields > label > input { width: 100%; margin-top: 5px; border: 1px solid #2a384b; border-radius: 8px; outline: 0; background: #0b131f; color: white; padding: 10px 11px; }
.settings-fields > label > input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #188cff22; }
.team-password-field { grid-column: 1 / -1; }
.money-input { display: flex; align-items: center; margin-top: 5px; border: 1px solid #2a384b; border-radius: 8px; background: #0b131f; }
.money-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #188cff22; }
.money-input b { padding-left: 11px; color: #7f91a9; }
.money-input input { width: 100%; border: 0; outline: 0; background: transparent; color: white; padding: 10px; }
.settings-spend { margin-top: 20px; padding: 12px 14px; border-radius: 8px; background: #0b131f; color: #8bc9ff; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.settings-status { min-height: 18px; margin: 12px 0 0; color: var(--teal); font-size: 11px; }
.team-member-list { display: grid; gap: 8px; margin-top: 8px; }
.team-member-list > p { margin: 0; padding: 14px; border: 1px dashed #2a384b; border-radius: 9px; color: var(--muted); text-align: center; }
.team-member-list > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 12px; border: 1px solid #243247; border-radius: 9px; background: #0b131f; }
.team-member-list span { display: grid; gap: 3px; }
.team-member-list strong { color: #dce7f5; font-size: 12px; }
.team-member-list small { color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.team-member-remove { padding: 7px 10px; }

@media (max-width: 720px) { .settings-fields { grid-template-columns: 1fr; } .team-password-field { grid-column: auto; } }

.preview-link {
  border: 1px solid #2a384b;
  border-radius: 8px;
  padding: 7px 10px;
  color: #b8c7d9;
  text-decoration: none;
}

.preview-link:hover,
.preview-link:focus-visible {
  border-color: #176fd1;
  color: white;
}

.domain-project {
  border: 1px solid #31587b;
  border-radius: 8px;
  padding: 7px 10px;
  background: #142a3d;
  color: #8bc9ff;
  cursor: pointer;
}

.domain-project:hover,
.domain-project:focus-visible {
  border-color: var(--blue);
  background: #183750;
  color: white;
}

.database-toggle {
  border: 1px solid #2a384b;
  border-radius: 8px;
  padding: 7px 10px;
  background: #172536;
  color: #b8c7d9;
  cursor: pointer;
}

.publish-project {
  border: 1px solid #25896f;
  border-radius: 8px;
  padding: 7px 11px;
  background: #153c34;
  color: #70e5c7;
  font-weight: 750;
  cursor: pointer;
}

.publish-project:hover,
.publish-project:focus-visible {
  border-color: var(--teal);
  background: #195043;
  color: white;
}

.publish-project:disabled {
  cursor: wait;
  opacity: .7;
}

.unpublish-project {
  border: 1px solid #775d34;
  border-radius: 8px;
  padding: 7px 11px;
  background: #302515;
  color: #efc573;
  font-weight: 750;
  cursor: pointer;
}

.unpublish-project:hover,
.unpublish-project:focus-visible {
  border-color: #d5a247;
  background: #453419;
  color: white;
}

.unpublish-project:disabled {
  cursor: wait;
  opacity: .7;
}

.undo-project {
  border: 1px solid #6d5b32;
  border-radius: 8px;
  padding: 7px 10px;
  background: #2b2415;
  color: #f1cd75;
  cursor: pointer;
}

.undo-project:hover,
.undo-project:focus-visible {
  border-color: #d4a743;
  background: #3a3019;
  color: white;
}

.undo-project:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.delete-project {
  border: 1px solid #69404a;
  border-radius: 8px;
  padding: 7px 10px;
  background: #2a1820;
  color: #ff9eac;
  cursor: pointer;
}

.delete-project:hover,
.delete-project:focus-visible {
  border-color: #e76178;
  background: #3a1c27;
  color: white;
}

.published-link {
  color: #70e5c7;
  font-size: 11px;
  text-decoration: none;
}

.database-toggle:hover,
.database-toggle:focus-visible {
  border-color: var(--teal);
  color: white;
}

.database-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 20;
  display: flex;
  width: min(520px, 100vw);
  flex-direction: column;
  border-left: 1px solid #2b3d53;
  background: #0d1622;
  box-shadow: -24px 0 70px #000a;
}

.database-drawer[hidden] {
  display: none;
}

.database-drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.database-drawer h2 {
  margin: 5px 0;
  font-size: 24px;
}

.database-drawer header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

#database-close {
  border: 0;
  background: transparent;
  color: #8797aa;
  font-size: 28px;
  cursor: pointer;
}

.database-tables {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.database-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #718096;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.database-section-heading button {
  border: 0;
  background: transparent;
  color: #66aef9;
  cursor: pointer;
}

.database-section-heading small {
  color: #657489;
  font-weight: 500;
  letter-spacing: 0;
}

.database-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.database-row-actions button:disabled {
  cursor: default;
  opacity: .45;
}

.database-table {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #28506a;
  border-radius: 9px;
  padding: 11px 12px;
  background: #10263a;
  color: #d8e5f3;
  text-align: left;
}

#database-table-list {
  display: grid;
  gap: 8px;
}

.database-table i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--teal);
}

.database-table strong {
  min-width: 28px;
  border-radius: 999px;
  padding: 3px 7px;
  background: #18354b;
  color: #8fcef6;
  font-size: 10px;
  text-align: center;
}

.database-rows {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 20px 24px 30px;
}

.database-grid-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101925;
}

.database-grid-wrap > p {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.database-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 10px;
}

.database-grid th,
.database-grid td {
  min-width: 130px;
  max-width: 260px;
  padding: 9px 11px;
  border-right: 1px solid #233044;
  border-bottom: 1px solid #233044;
  overflow: hidden;
  color: #b9c7d8;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.database-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #182536;
  color: #8fa1b8;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.database-grid tbody tr:nth-child(even) td {
  background: #0d1723;
}

.database-grid tbody tr:hover td {
  background: #15283a;
}

.database-grid th:last-child,
.database-grid td:last-child {
  border-right: 0;
}

.database-grid tbody tr:last-child td {
  border-bottom: 0;
}

.database-grid td:first-child,
.database-grid td:nth-child(2) {
  color: #7fa6c6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-left: 18px;
  padding-right: 18px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.workspace > .composer {
  padding-left: 14px;
  padding-right: 14px;
}

.standalone-view {
  min-height: 0;
  scrollbar-gutter: stable;
}

.frame-wrap,
.frame-wrap iframe {
  min-height: 0;
}

.chat-scroll::-webkit-scrollbar,
.standalone-view::-webkit-scrollbar,
.project-list::-webkit-scrollbar {
  width: 10px;
}

.chat-scroll::-webkit-scrollbar-thumb,
.standalone-view::-webkit-scrollbar-thumb,
.project-list::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 10px;
  background: #34445a;
  background-clip: padding-box;
}

.composer button:not(:disabled) {
  background: #176fd1;
  color: white;
  cursor: pointer;
}

.agent-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 660px;
  margin: 0 auto 10px;
  color: #b8c7d9;
  font-size: 11px;
  font-weight: 700;
}

.agent-progress[hidden] {
  display: none;
}

.agent-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid #2b455f;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: agent-spin .8s linear infinite;
}

@keyframes agent-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .agent-spinner { animation-duration: 1.8s; }
}

.conversation-message {
  padding-top: 18px;
  border-top: 1px solid #1d2939;
}

.conversation-message.successful-change {
  grid-template-columns: 26px 34px minmax(0, 1fr);
}

.message-undo {
  align-self: start;
  width: 24px;
  height: 24px;
  margin-top: 4px;
  border: 1px solid #6d5b32;
  border-radius: 7px;
  background: #2b2415;
  color: #f1cd75;
  cursor: pointer;
  line-height: 1;
}

.message-undo:hover,
.message-undo:focus-visible {
  border-color: #d4a743;
  background: #3a3019;
  color: white;
}

.message-undo:disabled {
  border-color: #2a3442;
  background: #151d28;
  color: #526174;
  cursor: not-allowed;
  opacity: .65;
}

.conversation-message.user .avatar {
  background: #26364d;
  color: #dce7f5;
  font-size: 9px;
}

.conversation-message p {
  margin-top: 7px;
  white-space: pre-wrap;
}

.view-panel[hidden],
.composer[hidden] {
  display: none;
}

.standalone-view {
  flex: 1;
  overflow: auto;
  padding: 42px clamp(24px, 5vw, 62px);
}

.view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto 24px;
}

.view-heading h2 {
  margin: 5px 0 7px;
  font-size: 26px;
}

.view-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.view-heading .eyebrow {
  color: var(--teal);
}

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

.view-badge,
.secondary-action {
  flex: 0 0 auto;
  border: 1px solid #2a3a50;
  border-radius: 8px;
  background: #172536;
  color: #aebdd0;
  padding: 7px 10px;
  font-size: 10px;
}

.secondary-action {
  cursor: pointer;
}

.data-card {
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #101925;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(170px, 1.6fr) 175px;
  gap: 16px;
  align-items: center;
  padding: 13px 15px;
  border-bottom: 1px solid #1d2939;
  color: #94a3b6;
  font-size: 11px;
}

.data-row:last-child {
  border-bottom: 0;
}

.data-row code {
  color: #d7e1ed;
}

.data-row strong {
  color: #7f91a8;
  font-size: 10px;
}

.data-row.data-head {
  color: #718096;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.data-row.protected strong {
  color: var(--teal);
}

.uploaded-file-name {
  min-width: 0;
  overflow: hidden;
  color: #d7e1ed;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploaded-file-name:hover,
.uploaded-file-name:focus-visible {
  color: var(--teal);
  text-decoration: underline;
}

.file-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.file-actions strong { color: var(--teal); }

.file-actions button {
  border: 0;
  background: transparent;
  color: #9f7280;
  padding: 2px;
  font-size: 9px;
  cursor: pointer;
}

.file-actions button:hover,
.file-actions button:focus-visible { color: #ff9eac; }

.file-actions .attach-file {
  color: #68cfff;
}

.file-actions .attach-file:hover,
.file-actions .attach-file:focus-visible { color: #a8e5ff; }

.file-actions .attach-file:disabled {
  color: #5b756f;
  cursor: default;
}

.file-actions .import-file {
  color: #43dfba;
}

.file-actions .import-file:hover,
.file-actions .import-file:focus-visible { color: #9af3dc; }

.file-actions .import-file:disabled {
  color: #5b756f;
  cursor: default;
}

#upload-files:disabled { cursor: wait; opacity: .6; }

.view-note {
  max-width: 760px;
  margin: 16px auto 0;
  color: #68788d;
  font-size: 11px;
}

.timeline {
  padding: 7px 18px;
}

.commit {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid #1d2939;
}

.commit:last-child {
  border-bottom: 0;
}

.commit i {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.commit strong,
.commit small {
  display: block;
}

.commit small {
  margin-top: 6px;
  color: #6f7e92;
}

.environment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: auto;
}

.environment {
  margin: 0;
  padding: 20px;
}

.environment > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aebdd0;
}

.environment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #536176;
}

.environment-dot.live {
  background: var(--teal);
  box-shadow: 0 0 0 4px #37d3ae18;
}

.environment h3 {
  margin: 20px 0 6px;
}

.environment p {
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.environment a {
  color: #61aaff;
  font-size: 11px;
  text-decoration: none;
}

.muted-environment {
  opacity: .66;
}

.log-list > div {
  display: grid;
  grid-template-columns: 70px 55px 1fr;
  gap: 14px;
  padding: 13px 15px;
  border-bottom: 1px solid #1d2939;
  font-size: 11px;
}

.log-list > div:last-child {
  border-bottom: 0;
}

.log-list time {
  color: #69788c;
}

.log-list span {
  color: #9aa8ba;
  font-size: 9px;
  font-weight: 800;
}

.log-list .log-ok {
  color: var(--teal);
}

.log-list p {
  margin: 0;
  color: #aebbd0;
}

.project-list {
  display: grid;
  gap: 7px;
  max-height: 270px;
  overflow: auto;
}

.project-list .project {
  cursor: pointer;
}

.project-list .project:not(.active) {
  border-color: transparent;
  background: transparent;
}

.project-list .project:not(.active):hover {
  background: #131f2e;
}

.live-text {
  color: var(--teal) !important;
}

.project-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #2a394e;
  border-radius: 16px;
  background: #111b28;
  color: var(--text);
  box-shadow: 0 30px 100px #000c;
}

.project-dialog::backdrop {
  background: #03070dcc;
  backdrop-filter: blur(4px);
}

.project-dialog form {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.project-dialog header,
.project-dialog footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-dialog header h2 {
  margin: 5px 0 0;
  font-size: 24px;
}

.project-dialog label {
  display: grid;
  gap: 7px;
  color: #b9c5d4;
  font-size: 12px;
}

.project-dialog .storage-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  border: 1px solid #2a394e;
  border-radius: 9px;
  background: #0b121d;
  padding: 11px 12px;
}

.project-dialog .storage-option > span:first-child {
  color: var(--teal);
  font-weight: 800;
}

.project-dialog .storage-option input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  border: 0;
  background: transparent;
  padding: 0;
  accent-color: var(--teal);
}

.project-dialog .storage-option span,
.project-dialog .storage-option strong,
.project-dialog .storage-option small { display: block; }

.project-dialog .storage-option strong { color: #d8e2ee; font-size: 11px; }
.project-dialog .storage-option small { margin-top: 4px; color: #77879a; line-height: 1.4; }

.project-dialog input,
.project-dialog textarea,
.project-dialog select {
  width: 100%;
  border: 1px solid #2a394e;
  border-radius: 9px;
  outline: 0;
  background: #0b121d;
  color: white;
  padding: 11px 12px;
}

.project-dialog textarea {
  min-height: 90px;
  resize: vertical;
}

.project-dialog input:focus,
.project-dialog textarea:focus,
.project-dialog select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #188cff22;
}

.project-dialog footer {
  justify-content: flex-end;
}

.project-dialog footer button {
  min-width: 110px;
}

.dialog-close {
  border: 0;
  background: transparent;
  color: #7e8da1;
  font-size: 24px;
  cursor: pointer;
}

.domain-status {
  border: 1px solid #293a50;
  border-radius: 10px;
  padding: 14px;
  background: #0c1622;
  color: #91a3b8;
  font-size: 12px;
  line-height: 1.55;
}

.domain-status strong { color: #dce8f7; }
.domain-status p { margin: 6px 0 0; }
.domain-status ol { margin: 10px 0 0; padding-left: 19px; }
.domain-status li + li { margin-top: 5px; }
.domain-dialog-actions span { flex: 1; }
.domain-check {
  min-height: 18px;
  margin: -7px 0 -5px;
  color: #8296ad;
  font-size: 11px;
  line-height: 1.5;
}
.domain-check.working { color: #8bc9ff; }
.domain-check.success { color: #71dfc0; }
.domain-check.warning { color: #e4bd78; }

.domain-project-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.domain-dns-instructions {
  border: 1px solid #31587b;
  border-radius: 12px;
  padding: 14px;
  background: #0d1b29;
}

.domain-dns-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 11px;
}

.domain-dns-heading strong { color: #e1edf9; }
.domain-dns-heading p { margin: 4px 0 0; color: #8296ad; font-size: 11px; }
.domain-dns-heading > span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #123d38;
  color: #71dfc0;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.domain-dns-records { display: grid; gap: 9px; }
.dns-record {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
  border: 1px solid #263b52;
  border-radius: 9px;
  padding: 10px;
  background: #09131e;
}

.dns-record > div:first-child { align-self: center; }
.dns-record > div:first-child strong {
  display: inline-block;
  border-radius: 5px;
  padding: 3px 6px;
  background: #183b57;
  color: #9bd3ff;
  font-size: 10px;
}
.dns-record > div:first-child p { margin: 5px 0 0; color: #788ba2; font-size: 10px; line-height: 1.35; }
.dns-copy-field > span { display: block; margin-bottom: 5px; color: #71849b; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.dns-copy-field > div { display: flex; min-width: 0; border: 1px solid #2a4058; border-radius: 7px; overflow: hidden; }
.dns-copy-field code { min-width: 0; flex: 1; overflow: hidden; padding: 8px; color: #d7e8f8; text-overflow: ellipsis; white-space: nowrap; }
.dns-copy {
  border: 0;
  border-left: 1px solid #2a4058;
  background: #17283a;
  color: #8bc9ff;
  padding: 0 8px;
  cursor: pointer;
}
.dns-copy:hover, .dns-copy:focus-visible { background: #203851; color: white; outline: 0; }
.dns-address-unavailable { margin: 0; color: #a99472; font-size: 11px; line-height: 1.5; }

@media (max-width: 620px) {
  .dns-record { grid-template-columns: 1fr; }
}

.delete-warning {
  margin: 0;
  border: 1px solid #633743;
  border-radius: 10px;
  padding: 13px 14px;
  background: #291720;
  color: #e9aab5;
  line-height: 1.6;
}

.undo-warning {
  margin: 0;
  border: 1px solid #5f522f;
  border-radius: 10px;
  padding: 13px 14px;
  background: #282216;
  color: #e8d19a;
  line-height: 1.6;
}

.undo-note {
  margin: -7px 0 0;
  color: #8fa0b4;
  font-size: 12px;
  line-height: 1.5;
}

.undo-action {
  border: 1px solid #d0a23e;
  border-radius: 9px;
  background: #9b741f;
  color: white;
  padding: 11px 14px;
  font-weight: 750;
  cursor: pointer;
}

.undo-action:hover,
.undo-action:focus-visible { background: #b1872a; }

.undo-action:disabled {
  cursor: wait;
  opacity: .65;
}

.danger-action {
  border: 1px solid #d5546c;
  border-radius: 9px;
  background: #a72f47;
  color: white;
  padding: 11px 14px;
  font-weight: 750;
  cursor: pointer;
}

.danger-action:hover,
.danger-action:focus-visible {
  background: #c13a54;
}

.danger-action:disabled {
  cursor: wait;
  opacity: .65;
}

.mode-bar {
  gap: 10px;
}

.agent-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 12px 10px;
}

.agent-attachments[hidden] { display: none; }

.attachment-chip {
  display: inline-flex;
  min-width: 0;
  max-width: 220px;
  align-items: center;
  gap: 7px;
  border: 1px solid #315370;
  border-radius: 8px;
  background: #102438;
  color: #d7e7f5;
  padding: 6px 7px 6px 9px;
  font-size: 10px;
}

.attachment-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #23415b;
  color: #a9bfd2;
  padding: 0;
  line-height: 18px;
  cursor: pointer;
}

.attachment-chip button:hover,
.attachment-chip button:focus-visible {
  background: #365d7c;
  color: white;
}

.agent-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-upload {
  position: relative;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border: 1px solid #3b4a5e;
  border-radius: 7px;
  background: #182331;
  color: #b8c6d6;
  padding: 0;
  font-size: 0;
  font-weight: 500;
  cursor: pointer;
}

.agent-upload::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.agent-upload::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.agent-upload:hover,
.agent-upload:focus-visible {
  border-color: var(--teal);
  background: #17362f;
  color: #80efd0;
  outline: 0;
}

.mode-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #344154;
  border-radius: 8px;
  background: #090f18;
  box-shadow: inset 0 1px 4px #0009;
}

.performance-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #77879b;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.performance-picker select {
  border: 1px solid #2a384b;
  border-radius: 7px;
  outline: 0;
  background: #0b131f;
  color: #b9c8d9;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
}

.performance-picker select:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #188cff22;
}

.mode-switch button {
  min-width: 58px;
  padding: 6px 10px;
  border: 1px solid #3c3c3c;
  border-radius: 5px;
  background: linear-gradient(#292929, #202020);
  color: #858585;
  font-weight: 800;
  opacity: .56;
  box-shadow: inset 0 1px 2px #0008;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, opacity .15s;
}

.mode-switch button.active {
  border-color: #23845e;
  background: linear-gradient(#176346, #114a36);
  color: #eafff5;
  opacity: 1;
  text-shadow: 0 1px 1px #031a11;
  box-shadow: inset 0 2px 5px #031b12cc, inset 0 0 0 1px #4bd59a2b, 0 0 8px #24a87324;
}

.composer .mode-switch button:not(.active) {
  border-color: #3c3c3c;
  background: linear-gradient(#292929, #202020);
  color: #858585;
}

.mode-switch button:not(.active):hover,
.mode-switch button:not(.active):focus-visible {
  border-color: #555;
  background: linear-gradient(#303030, #252525);
  color: #aaa;
  opacity: .78;
}

.proposal-card {
  max-width: 660px;
  margin: 18px auto;
  padding: 18px;
  border: 1px solid #2b5471;
  border-radius: 12px;
  background: #102235;
  box-shadow: 0 12px 35px #0003;
}

.proposal-card > div:first-child strong {
  color: var(--teal);
}

.proposal-card p {
  margin: 7px 0 0;
  color: #afbdcd;
  line-height: 1.55;
}

.proposal-card ul {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  padding: 0;
  list-style: none;
}

.proposal-card li {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) 1.4fr;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #0b1725;
  color: #8191a5;
  font-size: 10px;
}

.proposal-card li code {
  color: #dbe6f3;
}

.proposal-card > div:last-child {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.proposal-card button {
  min-width: 110px;
}

.plan-preview {
  align-self: stretch;
  width: min(860px, 100%);
  height: 100%;
  margin: 0 auto;
  overflow: auto;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid #2b5471;
  border-radius: 12px;
  background: linear-gradient(145deg, #102235, #0d1928);
  color: #dce7f5;
  box-shadow: 0 20px 60px #0005;
}

.plan-preview h2 {
  margin: 9px 0 12px;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -.025em;
}

.plan-preview header > p:last-child {
  max-width: 720px;
  margin: 0;
  color: #afbdcd;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.plan-preview section { margin-top: 34px; }
.plan-preview h3 { margin: 0 0 12px; color: #7f91a9; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.plan-preview ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.plan-preview li { padding: 15px 17px; border: 1px solid #223a51; border-radius: 9px; background: #091522; }
.plan-preview li code { color: #5de4c3; font-size: 13px; }
.plan-preview li p { margin: 7px 0 0; color: #93a4b8; line-height: 1.5; }
.plan-preview footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid #25384c; }
.plan-preview footer button { min-width: 130px; }

.submissions-section {
  max-width: 760px;
  margin: 32px auto 0;
}

.submissions-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.submissions-section h3 {
  margin: 5px 0 0;
}

.submissions-list {
  margin: 0;
}

.submissions-list > p {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.submissions-list article {
  padding: 16px;
  border-bottom: 1px solid #1d2939;
}

.submissions-list article:last-child {
  border-bottom: 0;
}

.submissions-list article > small {
  display: block;
  margin-top: 5px;
  color: #627287;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.submissions-list dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 7px 14px;
  margin: 12px 0 0;
  font-size: 11px;
}

.submissions-list dt {
  color: #718096;
}

.submissions-list dd {
  margin: 0;
  color: #c2cedd;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .status,
  .preview-link {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .data-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .data-row.data-head {
    display: none;
  }

  .file-heading-actions { align-items: flex-end; flex-direction: column; }

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

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 210px 1fr; }
  .workspace-divider { display: none; }
}

/* Keep both working columns visible, including during authentication startup. */
.app-shell {
  --sidebar-width: 248px;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--workspace-width, 1fr)) 8px minmax(0, 1fr);
}
.app-shell .sidebar { display: flex; position: relative; min-width: 0; }
.app-shell .preview-panel { display: flex; }
.app-shell .workspace-divider { display: block; }
.sidebar .brand { padding-right: 28px; }
.sidebar-toggle {
  position: absolute; top: 18px; right: 10px; width: 28px; height: 30px;
  display: grid; place-items: center; padding: 0; border: 1px solid #34475f;
  border-radius: 7px; background: #172536; color: #dce7f5; font-size: 24px; cursor: pointer;
}
.sidebar-toggle:hover, .sidebar-toggle:focus-visible { background: #28415c; outline: 2px solid #37d3ae; }
.app-shell.sidebar-collapsed { --sidebar-width: 44px; }
.sidebar-collapsed .sidebar { padding: 0; }
.sidebar-collapsed .sidebar > :not(.sidebar-toggle) { display: none; }
.sidebar-collapsed .sidebar-toggle { right: 8px; }
@media (max-width: 1100px) { .app-shell { --sidebar-width: 210px; } }
@media (max-width: 720px) {
  .app-shell { --sidebar-width: 170px; }
  .topbar, .preview-head { padding: 0 8px; }
  .preview-url { display: none; }
}
