:root {
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:#071016;
  color:#e8f0f6;
  color-scheme:dark;
  --panel:#101c25;
  --panel2:#13232e;
  --border:#243743;
  --muted:#8da0ae;
  --blue:#35a4ff;
  --green:#29c779;
  --red:#e14c61
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  min-height:100vh;
  background:radial-gradient(circle at 50% -20%,#122735 0,#071016 42%);
  color:#e8f0f6
}

header {
  height:60px;
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:center;
  padding:0 18px;
  border-bottom:1px solid #20313c;
  position:sticky;
  top:0;
  background:#071016f2;
  backdrop-filter:blur(14px);
  z-index:20
}

header strong {
  font-size:17px
}

.ghost {
  border:0;
  background:transparent;
  color:#dce8f0;
  font-size:30px;
  padding:0
}

.hidden {
  visibility:hidden
}

.hidden-display {
  display:none!important
}

main {
  max-width:1180px;
  margin:auto;
  padding:24px
}

.card,.panel {
  background:linear-gradient(180deg,#111e27,#0f1a22);
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  box-shadow:0 12px 34px #0000001c;
  margin-bottom:14px
}

.project {
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  transition:.15s ease
}

.project:hover {
  border-color:#3d5b6d;
  /* Keep the card inside its carousel bounds so the top border stays visible. */
  transform:none
}

.project h3 {
  margin:0 0 6px
}

.muted {
  color:var(--muted);
  font-size:13px
}

.page-heading,.source-topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:4px 0 18px
}

.page-heading h2,.source-topbar h2 {
  margin:0;
  font-size:22px
}

.page-heading p,.source-topbar p {
  margin:5px 0 0;
  color:var(--muted);
  font-size:13px
}

.tabs {
  display:flex;
  background:#0e1a22;
  border:1px solid #1e303b;
  border-radius:11px;
  margin-bottom:20px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:3px;
  scrollbar-width:none;
  -ms-overflow-style:none;
  -webkit-overflow-scrolling:touch
}

.tabs::-webkit-scrollbar {
  display:none
}

.tabs button {
  flex:1 1 0;
  min-width:0;
  padding:11px;
  border:0;
  background:transparent;
  color:#a9b8c3;
  border-radius:8px
}

.tabs .active {
  color:#fff;
  background:#172a36;
  box-shadow:inset 0 -2px var(--blue)
}

button {
  background:#1689f8;
  color:white;
  border:0;
  border-radius:8px;
  padding:9px 13px;
  cursor:pointer;
  font-weight:600;
  transition:.15s ease
}

button:hover:not(:disabled) {
  filter:brightness(1.08)
}

button:disabled {
  opacity:.5;
  cursor:not-allowed
}

button.secondary {
  background:#263945;
  color:#e4edf3
}

.ship {
  background:var(--green);
  font-size:14px;
  padding:11px 16px;
  box-shadow:0 8px 20px #29c77920
}

.ship b {
  background:#ffffff25;
  border-radius:99px;
  padding:2px 7px;
  margin-left:5px
}

.source-action-button {
  width:104px;
  height:48px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center
}

.sourcegrid {
  display:grid;
  grid-template-columns:330px minmax(0,1fr);
  gap:14px;
  align-items:stretch
}

.file-panel,.editor-panel {
  margin:0;
  min-height:600px
}

.panel-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:11px;
  border-bottom:1px solid #20313b
}

.icon-button {
  background:#20323e;
  color:#dce8f0;
  padding:7px 10px;
  font-size:12px
}

.tree {
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:13px;
  max-height:550px;
  overflow:auto;
  padding:9px 0
}

.tree-dir-row,.tree-file {
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  background:transparent;
  color:#dfeaf0;
  border:0;
  border-radius:7px;
  padding:7px 8px;
  text-align:left;
  font-family:inherit;
  font-size:inherit;
  white-space:nowrap
}

.tree-dir-row {
  padding-left:calc(8px + var(--depth)*14px);
  font-weight:650
}

.tree-file {
  padding-left:calc(30px + var(--depth)*14px);
  font-weight:450
}

.tree-dir-row:hover,.tree-file:hover,.tree-dir-row.selected,.tree-file.selected {
  background:#19303e
}

.tree-dir-row.selected,.tree-file.selected {
  outline:1px solid #3b6b85
}

.tree-children {
  margin:0
}

.tree-children.collapsed {
  display:none
}

.tree-arrow {
  width:11px;
  color:#7f96a4
}

.folder-icon {
  color:#68b7e8;
  font-size:10px
}

.file-icon {
  color:#8196a3
}

.empty-editor {
  height:565px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#78909e
}

.empty-editor h3 {
  color:#c9d7df;
  margin:12px 0 4px
}

.empty-editor p {
  margin:0;
  max-width:320px
}

.empty-icon {
  width:54px;
  height:54px;
  border:1px solid #2a414f;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-size:24px;
  background:#0b161d
}

.editor-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px
}

.editor-head strong {
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:13px
}

.badge {
  color:#f3cf70;
  font-size:11px;
  margin-left:10px;
  text-transform:uppercase
}

textarea,input,select {
  width:100%;
  background:#071016;
  color:#e8f0f6;
  border:1px solid #314451;
  border-radius:8px;
  padding:11px;
  outline:none
}

textarea:focus,input:focus {
  border-color:#3f82a7;
  box-shadow:0 0 0 3px #3f82a718
}

textarea {
  min-height:470px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  resize:vertical
}

.sql {
  min-height:160px
}

.toolbar,.directory-buttons {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:11px 0
}

.status {
  color:#49d18b
}

.danger {
  background:#d9364e
}

.danger-soft {
  background:#71313d
}

.directory-card {
  display:flex;
  gap:16px;
  align-items:center;
  padding:20px;
  border:1px solid #29404d;
  background:#0b171e;
  border-radius:12px;
  margin-bottom:14px
}

.directory-icon {
  font-size:32px;
  color:#68b7e8
}

.directory-card h3 {
  margin:3px 0 4px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace
}

.directory-card p {
  margin:0;
  color:var(--muted);
  font-size:13px
}

.eyebrow {
  text-transform:uppercase;
  letter-spacing:.09em;
  color:#718997;
  font-size:10px;
  font-weight:700
}

.directory-help {
  line-height:1.55
}

.results {
  overflow:auto
}

table {
  width:100%;
  border-collapse:collapse;
  font-size:12px
}

th,td {
  padding:8px;
  border-bottom:1px solid #263743;
  text-align:left;
  white-space:nowrap
}

.row {
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center
}

.loading-screen {
  min-height:520px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
  color:#dbe8ef
}

.loading-screen span {
  font-size:12px;
  color:var(--muted)
}

.spinner {
  width:34px;
  height:34px;
  border:3px solid #1d3442;
  border-top-color:var(--blue);
  border-radius:50%;
  animation:spin .75s linear infinite
}

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

.toast-stack {
  position:fixed;
  top:76px;
  right:20px;
  z-index:1300;
  display:flex;
  flex-direction:column;
  gap:9px
}

.toast {
  min-width:260px;
  display:flex;
  gap:10px;
  align-items:center;
  padding:13px 15px;
  background:#10291f;
  border:1px solid #276b4a;
  border-radius:10px;
  box-shadow:0 14px 40px #0008;
  transform:translateX(120%);
  opacity:0;
  transition:.2s ease
}

.toast.show {
  transform:translateX(0);
  opacity:1
}

.toast span {
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--green);
  color:#07150e
}

.toast strong {
  font-size:13px
}

.toast.error {
  background:#30171c;
  border-color:#7d3440
}

.toast.error span {
  background:var(--red)
}

.ship-status {
  margin-top:14px;
  border:1px solid #315063;
  border-radius:11px;
  background:#0b171e;
  overflow:hidden
}

.ship-status.complete {
  border-color:#286b4a
}

.ship-status.failed {
  border-color:#803744
}

.ship-status button {
  width:100%;
  background:transparent;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  color:#dce8ef
}

.ship-status button span {
  display:flex;
  align-items:center;
  gap:9px
}

.status-dot {
  width:9px;
  height:9px;
  border-radius:50%;
  background:#f1c64d;
  box-shadow:0 0 0 4px #f1c64d1a
}

.complete .status-dot {
  background:var(--green)
}

.failed .status-dot {
  background:var(--red)
}

.ship-terminal {
  max-height:240px;
  overflow:auto;
  background:#050b0f;
  border-top:1px solid #1c2d37;
  padding:12px 14px;
  color:#a9d5b9;
  font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace
}

.ship-terminal.collapsed {
  display:none
}

@media(max-width:759px) {
  main {
    padding:14px
  }

  .sourcegrid {
    grid-template-columns:1fr
  }

  .file-panel,.editor-panel {
    min-height:auto
  }

  .tree {
    max-height:360px
  }

  .empty-editor {
    height:320px
  }

  .source-topbar {
    align-items:flex-start
  }

  .ship {
    position:sticky;
    top:72px;
    z-index:4
  }

  .toast-stack {
    left:14px;
    right:14px
  }

  .toast {
    min-width:0
  }

  .directory-buttons button {
    width:100%
  }
}

@media(min-width:760px) {
  main {
    padding:24px
  }
}

.view-loading {
  min-height:500px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
  color:#dbe8ef
}

.view-loading span {
  font-size:12px;
  color:var(--muted)
}

.source-actions {
  display:grid;
  grid-template-columns:104px 104px;
  gap:9px;
  align-items:center
}

.batch-replace-button {
  grid-column:1/-1;
  width:217px;
  height:42px
}

.source-warning {
  display:flex;
  gap:8px;
  align-items:baseline;
  flex-wrap:wrap;
  margin:-6px 0 14px;
  padding:11px 13px;
  border:1px solid #705d28;
  border-radius:9px;
  background:#2a2513;
  color:#f3d778
}

.source-warning span {
  font-size:12px;
  color:#cdbf8c
}

/* Prevent selected source files from widening the mobile document. */
.sourcegrid, .file-panel, .editor-panel, .editor-head, .editor-body, .editor-actions, .filetree, textarea  {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.file-panel, .editor-panel  {
  overflow: hidden;
}

textarea  {
  display: block;
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre;
}

@media (max-width: 720px)  {
  html, body  {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .sourcegrid  {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .ship  {
    position: static;
    top: auto;
  }
}

/* Branching and history controls */
.branchbar {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:14px;
  margin:0 0 16px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel)
}

.branch-picker {
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:220px
}

.branch-label-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px
}

.default-branch-toggle {
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  user-select:none
}

.default-branch-toggle input {
  width:15px;
  height:15px;
  margin:0;
  accent-color:var(--accent)
}

.default-branch-toggle span {
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  text-transform:none;
  letter-spacing:0
}

.default-branch-mobile {
  display:none
}

.default-branch-desktop {
  min-height:42px;
  padding:0 4px
}

.branch-picker label {
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em
}

.branch-picker select {
  min-height:42px;
  border:1px solid var(--line);
  border-radius:10px;
  background-color:var(--panel2);
  color:var(--text);
  padding:0 42px 0 12px;
  font:inherit;
  font-weight:700;
  appearance:none;
  -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 viewBox=%270 0 12 8%27%3E%3Cpath d=%27M1 1.5 6 6.5 11 1.5%27 fill=%27none%27 stroke=%27%23dce8f0%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:12px 8px
}

.branch-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end
}

.branch-actions button {
  min-height:42px
}

.source-warning.local {
  border-color:#d4a72c66
}

.history-panel {
  margin:0 0 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  overflow:hidden
}

.history-head,.commit-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px
}

.history-head {
  border-bottom:1px solid var(--line)
}

.history-head>div,.commit-row>div {
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0
}

.history-head span,.commit-row span {
  font-size:12px;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.commit-row+.commit-row {
  border-top:1px solid var(--line)
}

.commit-row strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.view-loading.compact {
  min-height:120px
}

@media(max-width:720px) {
  .default-branch-mobile {
    display:inline-flex
  }

  .default-branch-desktop {
    display:none
  }

  .branchbar {
    align-items:stretch;
    flex-direction:column
  }

  .branch-picker {
    min-width:0;
    width:100%
  }

  .branch-actions {
    display:grid;
    grid-template-columns:1fr 1fr
  }

  .branch-actions button {
    width:100%
  }

  .history-head,.commit-row {
    align-items:stretch;
    flex-direction:column
  }

  .commit-row button {
    width:100%
  }
}

/* Branch merge dialog */
.merge-modal-backdrop {
  position:fixed;
  inset:0;
  z-index:1000;
  background:rgba(0,0,0,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.merge-modal {
  width:min(520px,100%);
  background:#10212b;
  border:1px solid #294553;
  border-radius:18px;
  padding:22px;
  box-shadow:0 24px 70px rgba(0,0,0,.45);
}

.merge-modal-head h3 {
  margin:0 0 6px;
  font-size:22px
}

.merge-modal-head p {
  margin:0 0 18px;
  color:#93a9b8;
  line-height:1.4
}

.merge-search {
  width:100%;
  box-sizing:border-box;
  margin:0 0 12px;
  padding:12px 14px;
  border:1px solid #355564;
  border-radius:10px;
  background:#0a1820;
  color:#edf5f9;
  font:inherit;
  outline:none;
}

.merge-search:focus {
  border-color:#39aef2;
  box-shadow:0 0 0 2px rgba(57,174,242,.15)
}

.merge-results {
  display:grid;
  gap:8px
}

.merge-branch-option {
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  text-align:left;
  padding:11px 14px;
  border:1px solid #294553;
  border-radius:10px;
  background:#162b37;
  color:#edf5f9;
  font:inherit;
  font-weight:700;
}

.merge-branch-option:hover:not(:disabled) {
  border-color:#4a7082;
  background:#1b3442
}

.merge-branch-option.selected {
  border-color:#39aef2;
  box-shadow:0 0 0 1px #39aef2 inset
}

.merge-branch-option:disabled {
  opacity:.48;
  cursor:not-allowed
}

.branch-option-meta {
  font-size:12px;
  color:#91a8b6;
  font-weight:600
}

.merge-empty {
  padding:18px 10px;
  text-align:center;
  color:#91a8b6
}

.merge-modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:20px
}

.merge-modal-actions button {
  min-width:100px
}

@media(max-width:720px) {
  .merge-modal-backdrop {
    align-items:flex-end;
    padding:12px
  }

  .merge-modal {
    border-radius:18px;
    padding:18px
  }

  .merge-modal-actions {
    display:grid;
    grid-template-columns:1fr 1fr
  }

  .merge-modal-actions button {
    width:100%
  }
}

/* Mobile IDE authentication */
.auth-screen {
  min-height:calc(100vh - 48px);
  display:grid;
  place-items:center;
  padding:28px 16px
}

.auth-card {
  width:min(430px,100%);
  background:linear-gradient(180deg,#111e27,#0f1a22);
  border:1px solid var(--border);
  border-radius:18px;
  padding:28px;
  box-shadow:0 24px 70px #0007
}

.auth-brand {
  color:#6fc4ff;
  font-weight:800;
  letter-spacing:.04em;
  margin-bottom:18px
}

.auth-card h1 {
  margin:0 0 8px;
  font-size:28px
}

.auth-card>p {
  margin:0 0 22px;
  color:var(--muted);
  line-height:1.5
}

.auth-form {
  display:grid;
  gap:15px
}

.auth-form label {
  display:grid;
  gap:7px;
  color:#cbd8df;
  font-size:13px;
  font-weight:700
}

.auth-form input {
  min-height:46px;
  font-size:16px
}

.auth-form>button[type=submit] {
  min-height:46px;
  margin-top:2px
}

.auth-link {
  background:transparent;
  color:#8fcfff;
  padding:8px
}

.logout-button {
  background:#263945;
  color:#e4edf3;
  white-space:nowrap;
  padding:8px 12px
}

header:has(.logout-button) {
  grid-template-columns:44px 1fr auto
}

@media(max-width:720px) {
  .auth-card {
    padding:22px
  }

  .page-heading {
    align-items:flex-start;
    gap:16px
  }

  .page-heading #home-logout {
    flex:0 0 auto
  }
}

.password-requirements {
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
  background:#0a151c;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px
}

.password-meter {
  height:8px;
  background:#071117;
  border:1px solid var(--border);
  border-radius:999px;
  overflow:hidden
}

.password-meter>div {
  height:100%;
  width:0;
  background:#4fc77b;
  transition:width .18s ease
}

.password-progress {
  min-height:18px;
  font-size:12px;
  color:var(--muted);
  margin-top:-8px
}

.password-progress.valid {
  color:#5ee18c
}

.password-input-wrap {
  position:relative
}

.password-input-wrap input {
  padding-right:118px
}

.password-toggle {
  position:absolute;
  right:7px;
  top:50%;
  transform:translateY(-50%);
  background:transparent;
  color:#8fcfff;
  padding:7px 8px;
  font-size:12px;
  white-space:nowrap
}

.password-toggle:hover:not(:disabled) {
  background:#142630;
  filter:none
}

#refresh-source {
  position:relative
}

.refresh-update-dot {
  display:none;
  position:absolute;
  top:7px;
  right:7px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#f3cf70;
  box-shadow:0 0 0 2px #263945
}

.has-update .refresh-update-dot {
  display:block
}

.authorization-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end
}

.auth-cache-time {
  font-size:12px
}

@media(max-width:700px) {
  .authorization-actions {
    width:100%;
    justify-content:flex-start
  }
}

.project-list-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end
}

.project-cache-time {
  font-size:12px
}

@media(max-width:700px) {
  .project-list-actions {
    width:100%;
    justify-content:flex-start
  }
}

.project-list-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
  justify-content:flex-end
}

.project-list-actions .project-header-button {
  width:112px;
  height:44px;
  min-height:44px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap
}

@media(max-width:700px) {
  .project-list-actions {
    width:auto;
    flex-direction:row;
    align-items:center;
    justify-content:flex-end;
    gap:8px
  }

  .project-list-actions .project-header-button {
    width:104px;
    height:44px;
    min-height:44px;
    padding:0 10px
  }
}

/* Projects dashboard: keep the mobile heading readable and controls on-screen. */
@media(max-width:700px) {
  .page-heading:has(.project-list-actions) {
    flex-direction:column;
    align-items:stretch;
    gap:14px;
  }

  .page-heading:has(.project-list-actions)>div:first-child {
    width:100%;
  }

  .project-list-actions {
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:8px;
    justify-content:stretch;
  }

  .project-list-actions .project-cache-time {
    grid-column:1 / -1;
    width:100%;
  }

  .project-list-actions .project-header-button {
    width:100%;
    min-width:0;
    height:44px;
    min-height:44px;
    padding:0 10px;
  }
}

/* Immediate interaction feedback for all app buttons. */
button {
  transition:transform .08s ease,opacity .12s ease,filter .12s ease
}

button:active:not(:disabled) {
  transform:translateY(1px) scale(.98);
  filter:brightness(.9)
}

button.is-busy {
  opacity:.72;
  cursor:wait
}

.editor-panel.hidden-display {
  display:none!important
}

.query-loading {
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:12px;
  color:var(--muted)
}

.query-loading .spinner {
  width:22px;
  height:22px;
  flex:0 0 22px
}

.query-loading.hidden-display {
  display:none!important
}

.batch-result-overlay {
  position:fixed;
  inset:0;
  z-index:1000;
  background:rgba(0,0,0,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px
}

.batch-result-modal {
  width:min(620px,100%);
  max-height:min(680px,85vh);
  overflow:auto;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.45)
}

.batch-result-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:8px
}

.batch-result-header h3 {
  margin:0
}

.batch-result-modal p {
  color:var(--muted);
  margin:0 0 16px
}

.batch-result-section {
  margin-top:14px
}

.batch-result-list {
  margin-top:7px;
  border:1px solid var(--border);
  border-radius:9px;
  max-height:180px;
  overflow:auto
}

.batch-result-list div {
  padding:7px 9px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px;
  border-bottom:1px solid var(--border)
}

.batch-result-list div:last-child {
  border-bottom:0
}

.batch-result-empty {
  margin-top:6px;
  color:var(--muted);
  font-size:12px
}

.revert-button {
  grid-column:1/-1;
  width:217px;
  height:42px;
  background:#b83a3a;
  border-color:#b83a3a;
  color:#fff;
  opacity:.88
}

.revert-button:hover:not(:disabled) {
  opacity:1
}

.revert-button:disabled {
  opacity:.42
}

.revert-dialog-overlay {
  position:fixed;
  inset:0;
  z-index:1100;
  background:rgba(0,0,0,.66);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px
}

.revert-dialog-modal {
  width:min(560px,100%);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:20px;
  box-shadow:0 20px 60px rgba(0,0,0,.5)
}

.revert-dialog-modal h3 {
  margin:0 0 8px
}

.revert-dialog-modal>p {
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.5
}

.revert-commit {
  border:1px solid var(--border);
  border-radius:9px;
  padding:10px 12px;
  display:grid;
  gap:4px
}

.revert-commit span {
  font-size:11px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.05em
}

.revert-commit strong {
  font-size:13px
}

.revert-commit code {
  font-size:11px;
  color:var(--muted)
}

.revert-arrow {
  text-align:center;
  padding:5px;
  color:var(--muted)
}

.revert-local-warning {
  margin-top:14px;
  padding:10px 12px;
  border:1px solid #b83a3a;
  border-radius:9px;
  font-size:12px
}

.revert-dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin-top:18px
}

.revert-confirm {
  background:#b83a3a;
  border-color:#b83a3a;
  color:#fff
}

header.dashboard-header {
  grid-template-columns:44px 1fr auto;
  background:#102d4f;
  color:#fff;
  border-bottom-color:#173d68;
  backdrop-filter:none
}

.dashboard-header strong {
  color:#fff
}

.dashboard-header>span {
  display:flex;
  justify-content:flex-end
}

.dashboard-logout {
  height:40px;
  white-space:nowrap;
  background:#263f59!important;
  color:#fff!important
}

.dashboard-actions {
  margin:4px 0 24px
}

.dashboard-wide-button {
  width:100%;
  min-height:48px
}

.dashboard-project-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px
}

.dashboard-project-heading h2 {
  margin:0;
  font-size:22px
}

.dashboard-project-heading p {
  margin:5px 0 0;
  color:var(--muted);
  font-size:13px
}

.dashboard-refresh {
  margin-bottom:14px
}

.prompt-dialog-overlay {
  position:fixed;
  inset:0;
  z-index:1200;
  background:rgba(0,0,0,.66);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  overflow:auto
}

.prompt-dialog-modal {
  position:relative;
  width:min(620px,100%);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:22px;
  box-shadow:0 20px 60px rgba(0,0,0,.5)
}

.prompt-dialog-modal label {
  display:block;
  font-weight:700;
  margin:0 36px 10px 0
}

.prompt-dialog-modal textarea {
  display:block;
  width:100%;
  height:8em;
  min-height:8em;
  max-height:8em;
  resize:none;
  overflow-y:auto;
  box-sizing:border-box
}

.prompt-dialog-x {
  position:absolute;
  right:11px;
  top:9px;
  width:34px;
  height:34px;
  padding:0;
  border:0;
  background:transparent;
  color:#e8f0f6;
  font-size:26px;
  line-height:1
}

.prompt-dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin-top:14px
}

@media(max-width:640px) {
  .prompt-dialog-overlay {
    align-items:flex-start;
    padding-top:max(16px,env(safe-area-inset-top))
  }

  .prompt-dialog-modal {
    margin-bottom:calc(16px + env(safe-area-inset-bottom))
  }

  .dashboard-project-heading {
    align-items:flex-start;
    flex-direction:column;
    gap:5px
  }
}

/* Responsive Source heading/actions */
.source-topbar {
  display:block;
  margin-bottom:18px
}

.source-heading {
  display:flex;
  align-items:baseline;
  gap:14px;
  margin-bottom:14px
}

.source-heading h2,.source-heading p {
  margin:0
}

.source-heading p {
  color:var(--muted)
}

.source-actions {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  width:100%;
  align-items:stretch
}

.source-actions .source-action-button,.source-actions .batch-replace-button,.source-actions .revert-button {
  grid-column:auto;
  width:100%;
  height:46px;
  margin:0
}

@media(max-width:640px) {
  .source-heading {
    gap:9px;
    margin-bottom:12px;
    align-items:baseline
  }

  .source-heading h2 {
    font-size:18px;
    white-space:nowrap
  }

  .source-heading p {
    font-size:11px;
    line-height:1.2
  }

  .source-actions {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px
  }

  .source-actions .source-action-button,.source-actions .batch-replace-button,.source-actions .revert-button {
    width:100%;
    height:42px
  }
}

/* Authorization refresh cleanup */
@media(max-width:640px) {
  #refresh-auth,#refresh-authorization,.authorization-refresh,.auth-refresh {
    width:100%;
    display:block
  }
}

/* Authorization role membership */
.authorization-users {
  display:grid;
  gap:0
}

.authorization-user {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:12px 0;
  border-top:1px solid var(--border)
}

.authorization-user:first-child {
  border-top:0
}

.authorization-user-data {
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
  overflow-wrap:anywhere
}

.role-chips {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap
}

.role-chip,.role-add-chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap
}

.role-chip {
  background:#173c2a;
  border:1px solid #2d7750;
  color:#8ee3ad
}

.role-chip-remove {
  width:18px;
  height:18px;
  min-height:18px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:inherit;
  font-size:17px;
  line-height:16px
}

.role-chip-remove:hover:not(:disabled) {
  background:#ffffff18;
  filter:none
}

.role-add-chip {
  background:#142630;
  border:1px dashed #527183;
  color:#a9c6d6
}

.role-modal-backdrop {
  position:fixed;
  inset:0;
  z-index:1250;
  background:rgba(0,0,0,.66);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px
}

.role-modal {
  width:min(480px,100%);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:20px;
  box-shadow:0 20px 60px rgba(0,0,0,.5)
}

.role-modal h3 {
  margin:0 0 8px
}

.role-modal>p {
  margin:0 0 16px;
  color:var(--muted)
}

.role-options {
  display:grid;
  gap:8px;
  max-height:280px;
  overflow:auto
}

.role-option {
  text-align:left
}

.role-modal-actions {
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:18px
}

@media(max-width:700px) {
  .authorization-user {
    align-items:flex-start;
    flex-direction:column;
    gap:9px
  }

  .authorization-user-data {
    display:grid;
    gap:2px
  }

  .role-chips {
    justify-content:flex-start;
    width:100%
  }

  .role-modal-backdrop {
    align-items:flex-end;
    padding:12px
  }

  .role-modal-actions {
    display:grid;
    grid-template-columns:1fr 1fr
  }
}

/* SQL query-file execution */
.query-file-card {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:72px;
  padding:12px 14px;
  border:1px solid #29404d;
  border-radius:10px;
  background:#0b171e;
  margin:8px 0
}

.query-file-icon {
  display:grid;
  place-items:center;
  flex:0 0 44px;
  height:44px;
  border-radius:9px;
  background:#173447;
  color:#78c8f5;
  font:700 11px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.05em
}

.query-file-meta {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px
}

.query-file-meta strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px
}

.query-file-meta span {
  color:var(--muted);
  font-size:12px
}

.ship-progress {
  height:5px;
  margin:0 14px;
  overflow:hidden;
  border-radius:999px;
  background:#172a35
}

.ship-progress-bar {
  width:0;
  height:100%;
  border-radius:inherit;
  background:var(--green);
  transition:width .35s ease
}

.ship-progress-meta {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:7px 14px 11px;
  color:#8fa7b5;
  font-size:11px
}

.ship-status.complete .ship-progress-meta {
  color:#9bcbb0
}

.ship-status.failed .ship-progress-bar {
  background:var(--red)
}

/* Integrated AI prompt workflow */
.ai-prompt-panel{max-width:900px;margin:0 auto}.ai-provider-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}.ai-provider-row strong{display:block;font-size:18px;margin-top:4px}.ai-request-label{display:block;font-weight:700;margin-bottom:8px}.ai-request{width:100%;min-height:180px;resize:vertical;box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;overflow-x:hidden}.ai-context-note{margin:14px 0 0}.ai-workflow-overlay{position:fixed;inset:0;z-index:1400;background:rgba(0,0,0,.78);padding:3vh 3vw;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.ai-workflow-modal{position:relative;width:min(1100px,100%);height:min(90vh,900px);background:var(--panel);border:1px solid var(--border);border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.6);padding:24px;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden}.ai-workflow-head{padding-right:42px;margin-bottom:16px}.ai-workflow-head h2{margin:4px 0}.ai-workflow-head p{color:var(--muted);margin:6px 0 0}.ai-chat-log{flex:1;overflow:auto;border:1px solid var(--border);border-radius:12px;padding:16px;background:#09131a}.ai-chat-message{max-width:78%;margin:0 0 14px;padding:12px 14px;border-radius:12px;background:#172a36}.ai-chat-message.user{margin-left:auto;background:#123e63}.ai-chat-message strong{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;color:var(--muted)}.ai-chat-form{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:14px}.ai-chat-form textarea{min-height:72px;resize:none}.ai-review-modal{width:min(1200px,100%)}.ai-review-grid{flex:1;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:14px;padding-right:3px}.ai-review-section{border:1px solid var(--border);border-radius:12px;padding:14px;min-width:0}.ai-review-section h3{margin:0 0 10px;font-size:15px}.ai-review-section h3 span{color:var(--muted);font-weight:400}.ai-review-section details{border-top:1px solid var(--border);padding:9px 0}.ai-review-section details:first-of-type{border-top:0}.ai-review-section summary{cursor:pointer;font-weight:600}.ai-review-section pre{white-space:pre-wrap;word-break:break-word;max-height:300px;overflow:auto;background:#09131a;border-radius:8px;padding:10px;font-size:12px}.ai-step{padding:9px 0;border-top:1px solid var(--border)}.ai-step:first-of-type{border-top:0}.ai-review-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:16px}.ai-review-actions>div{display:flex;gap:9px}.ai-export-actions button:disabled{opacity:.45;border-color:var(--border)}
@media(max-width:720px){.ai-workflow-overlay{padding:0}.ai-workflow-modal{height:100dvh;width:100%;border-radius:0;padding:18px}.ai-review-grid{grid-template-columns:1fr}.ai-chat-message{max-width:90%}.ai-chat-form{grid-template-columns:1fr}.ai-review-actions{align-items:stretch;flex-direction:column}.ai-review-actions>div{width:100%}.ai-review-actions button{flex:1}.ai-provider-row{align-items:flex-start;flex-direction:column}}

/* Async AI operation progress */
.ai-operation-progress{margin-top:14px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:#0b171e}
.ai-operation-progress-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:8px;color:#a8bac5;font-size:12px}
.ai-operation-progress-head strong{color:#d9e5eb;font-variant-numeric:tabular-nums}
.ai-operation-progress-track{height:7px;overflow:hidden;border-radius:999px;background:#172a35}
.ai-operation-progress-bar{width:0;height:100%;border-radius:inherit;background:var(--green);transition:width .4s ease}
#ai-prompt-status .ai-operation-progress{margin-top:16px}
#ai-ship-progress{margin:14px 0 0}

/* Deployment status */
.deployment-list,.deployment-jobs{display:grid;gap:10px}.deployment-run{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;background:var(--panel);border:1px solid var(--border);padding:14px 16px}.deployment-run span:first-child{min-width:0}.deployment-run strong,.deployment-run small{display:block}.deployment-run small{color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.deploy-badge{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:999px;padding:4px 8px;font-size:11px;text-transform:capitalize;white-space:nowrap}.deploy-badge.success{color:#63d98a;border-color:#2d7044}.deploy-badge.failure,.deploy-badge.cancelled,.deploy-badge.timed_out{color:#ff7777;border-color:#7b3535}.deploy-badge.in_progress,.deploy-badge.queued,.deploy-badge.waiting,.deploy-badge.pending{color:#7fc2ff;border-color:#315e80}.deployment-detail-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px}.deployment-detail-head h3{margin:4px 0}.deployment-jobs{margin-top:10px}.deployment-jobs details summary{display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer}.deployment-steps{margin-top:12px;border-top:1px solid var(--border)}.deployment-steps>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--border)}.deployment-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:12px}@media(max-width:700px){.deployment-detail-head{align-items:flex-start}.deployment-run{align-items:flex-start}.deployment-actions{flex-direction:column}.deployment-actions button{width:100%}}

/* Deployment dialog + responsive deployment cards */
.deployment-list{min-width:0;width:100%}
.deployment-run{box-sizing:border-box;max-width:100%;min-width:0;overflow:hidden}
.deployment-run>span:first-child{min-width:0;max-width:calc(100% - 88px);overflow:hidden}
.deployment-title-line{display:flex!important;align-items:baseline;gap:9px;min-width:0}
.deployment-title-line strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.deployment-title-line small{flex:0 0 auto;margin:0!important;font-size:11px;color:var(--muted);white-space:nowrap}
.deployment-run-meta,.deployment-detail-meta{display:flex;align-items:center;gap:7px;min-width:0;flex:0 1 auto}
.deployment-detail-meta{margin:2px 0 7px}.deployment-detail-meta small{color:var(--muted);white-space:nowrap}
.deployment-actor-tag{display:inline-block;min-width:0;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid #9b7a24;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:700;line-height:1.25;color:#f0c85a;background:rgba(176,132,24,.12);vertical-align:middle}
.deployment-dialog-overlay{position:fixed;inset:0;z-index:1300;background:rgba(0,0,0,.82);display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto}
.deployment-dialog{position:relative;width:min(860px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#101c25;border:2px solid #3a5363;border-radius:14px;padding:20px;box-shadow:0 28px 90px rgba(0,0,0,.72),0 0 0 1px rgba(255,255,255,.04);color:#e8f0f6}
.deployment-dialog .prompt-dialog-x{top:7px;right:9px;z-index:2}
.deployment-dialog .deployment-detail-head{margin-top:24px}
.deployment-dialog>p.muted{color:#d7e3eb;font-weight:600}
.deployment-ai-loading{padding:32px 8px;color:#e8f0f6}.deployment-ai-loading h3{margin:0 0 18px;color:#f4f8fb}.deployment-ai-loading .ai-operation-progress-head{color:#d7e3eb}.deployment-ai-loading .ai-operation-progress-track{background:#071016;border:1px solid #314957}
.deployment-dialog .ai-review-section{margin-top:16px}
.deployment-run-optimistic{opacity:.9;cursor:default}
@media(max-width:700px){
  .deployment-dialog-overlay{padding:10px}.deployment-dialog{padding:15px;max-height:calc(100vh - 20px)}.deployment-dialog .prompt-dialog-x{top:5px;right:6px}.deployment-dialog .deployment-detail-head{margin-top:24px}
  .deployment-run{gap:8px;padding:12px}.deployment-run>span:first-child{max-width:calc(100% - 76px)}
  .deployment-title-line{display:flex!important;align-items:center;gap:7px}.deployment-title-line>strong{flex:1 1 auto}.deployment-run-meta{flex:0 1 auto;max-width:58%;gap:5px}.deployment-run-meta small{font-size:10px}.deployment-actor-tag{max-width:92px;padding:2px 6px}.deployment-detail-meta .deployment-actor-tag{max-width:140px}
  .deployment-run small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}


/* Public landing / login */
.landing-screen {
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:48px 28px;
  background:
    radial-gradient(circle at 16% 18%,rgba(52,144,220,.14),transparent 34%),
    radial-gradient(circle at 82% 76%,rgba(64,199,137,.08),transparent 30%),
    #07141c
}
.landing-shell {
  width:min(1120px,100%);
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(340px,430px);
  gap:72px;
  align-items:center
}
.landing-copy {
  max-width:650px
}
.landing-brand {
  display:flex;
  align-items:center;
  gap:11px;
  margin-bottom:42px;
  color:#dcebf4;
  font-weight:800;
  letter-spacing:.02em
}
.landing-mark {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:linear-gradient(145deg,#58bdff,#2d88df);
  color:#06121a;
  font-size:17px;
  box-shadow:0 8px 24px rgba(45,136,223,.22)
}
.landing-eyebrow {
  margin:0 0 14px;
  color:#6fc4ff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase
}
.landing-copy h1 {
  max-width:640px;
  margin:0;
  color:#edf6fb;
  font-size:clamp(38px,5vw,62px);
  line-height:1.02;
  letter-spacing:-.035em
}
.landing-lead {
  max-width:610px;
  margin:24px 0 30px;
  color:#a9bdc9;
  font-size:18px;
  line-height:1.65
}
.landing-points {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px
}
.landing-points>div {
  min-width:0;
  padding:16px;
  border:1px solid #203744;
  border-radius:14px;
  background:rgba(15,30,39,.66)
}
.landing-points strong,
.landing-points span {
  display:block
}
.landing-points strong {
  margin-bottom:7px;
  color:#e4eff5;
  font-size:13px
}
.landing-points span {
  color:#879eab;
  font-size:12px;
  line-height:1.5
}
.landing-note {
  margin:22px 0 0;
  color:#6f8795;
  font-size:13px;
  line-height:1.55
}
.landing-login {
  width:100%;
  box-shadow:0 30px 90px #0008
}
.landing-login .auth-brand {
  margin-bottom:12px;
  color:#6fc4ff;
  font-size:12px;
  letter-spacing:.1em;
  text-transform:uppercase
}
.landing-login h2 {
  margin:0 0 8px;
  font-size:28px
}
.landing-login>p {
  margin:0 0 22px;
  color:var(--muted);
  line-height:1.5
}
@media(max-width:880px) {
  .landing-screen {
    padding:30px 18px
  }
  .landing-shell {
    grid-template-columns:1fr;
    gap:34px;
    width:min(620px,100%)
  }
  .landing-copy {
    max-width:none
  }
  .landing-brand {
    margin-bottom:28px
  }
  .landing-copy h1 {
    font-size:clamp(34px,9vw,48px)
  }
  .landing-points {
    grid-template-columns:1fr
  }
  .landing-login {
    width:min(430px,100%);
    justify-self:center
  }
}
@media(max-width:520px) {
  .landing-screen {
    display:block;
    padding:12px 14px 28px
  }
  .landing-shell {
    display:block
  }
  .landing-brand {
    margin-bottom:14px
  }
  .landing-eyebrow {
    margin-bottom:10px
  }
  .landing-copy h1 {
    font-size:36px;
    line-height:.98
  }
  .landing-lead {
    margin:14px 0 16px;
    font-size:16px;
    line-height:1.5
  }
  .landing-points {
    display:flex;
    gap:9px;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:0;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -ms-overflow-style:none;
    -webkit-overflow-scrolling:touch
  }
  .landing-points::-webkit-scrollbar {
    display:none
  }
  .landing-points>div {
    flex:0 0 70%;
    padding:12px 14px;
    scroll-snap-align:start
  }
  .landing-points strong {
    margin-bottom:5px
  }
  .landing-points span {
    line-height:1.4
  }
  .landing-note {
    margin-bottom:28px
  }
  .landing-login {
    padding:22px
  }
}


/* Landing interest form */
.interest-panel{margin-top:18px;padding:14px 15px;border:1px solid #203744;border-radius:14px;background:rgba(15,30,39,.72)}
.interest-copy{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}
.interest-copy strong{color:#e4eff5;font-size:13px}
.interest-copy span{color:#7f96a4;font-size:12px}
.interest-form{display:grid;grid-template-columns:1fr 1fr 1.35fr auto;gap:8px}
.interest-form input{min-width:0;height:38px;padding:0 10px;border:1px solid #2b4555;border-radius:8px;background:#091820;color:#e7f1f6;font:inherit;font-size:12px}
.interest-form input::placeholder{color:#718995}
.interest-form button{min-height:38px;padding:0 14px;white-space:nowrap}
.interest-message{min-height:0;margin-top:0;font-size:12px;font-weight:700}
.interest-message:not(:empty){margin-top:9px}
.interest-message-success{color:#62d99b}
.interest-message-error{color:#ff8b93}

/* Keep the complete public landing experience in a typical desktop viewport. */
@media(min-width:881px) and (min-height:650px){
  .landing-screen{min-height:100vh;padding:22px 28px;overflow:hidden}
  .landing-shell{gap:58px}
  .landing-brand{margin-bottom:18px}
  .landing-copy h1{font-size:clamp(40px,4.2vw,54px);line-height:1.01}
  .landing-lead{margin:16px 0 18px;font-size:15px;line-height:1.5}
  .landing-points{gap:9px}
  .landing-points>div{padding:11px 12px}
  .landing-points strong{margin-bottom:4px}
  .landing-points span{font-size:11px;line-height:1.4}
  .landing-note{margin-top:12px}
  .landing-login{padding:24px}
  .landing-login>p{margin-bottom:16px}
  .landing-login .auth-form{gap:12px}
}
@media(max-width:880px){
  .interest-form{grid-template-columns:1fr 1fr}
  .interest-form input:nth-of-type(3){grid-column:1 / -1}
  .interest-form button{grid-column:1 / -1}
}
@media(max-width:520px){
  .interest-panel{margin-top:12px;padding:12px 15px}
  .interest-copy{display:block;margin-bottom:8px}
  .interest-copy span{display:block;margin-top:4px}
  .interest-form{grid-template-columns:1fr}
  .interest-form input:nth-of-type(3),.interest-form button{grid-column:auto}
}

/* Mobile-only login trigger/dialog.
   Desktop keeps the existing login form and does not show the top-right Log In button. */
.landing-brand-name{display:flex;align-items:center;gap:11px}
.mobile-login-open,.mobile-login-close{display:none}
.mobile-login-dialog{display:contents}
.mobile-login-backdrop{display:none}

@media(max-width:520px){
  .landing-brand{justify-content:space-between;gap:16px}
  .mobile-login-open{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 15px;border:1px solid #315e80;border-radius:9px;background:#102a3a;color:#dcebf4;font-weight:800;white-space:nowrap}
  .mobile-login-dialog{display:none;position:fixed;inset:0;z-index:10000;padding:18px;align-items:center;justify-content:center}
  .mobile-login-dialog.open{display:flex}
  .mobile-login-backdrop{display:block;position:absolute;inset:0;background:rgba(0,7,12,.78);backdrop-filter:blur(3px)}
  .mobile-login-dialog .landing-login{display:block;position:relative;z-index:1;width:min(430px,100%);max-height:calc(100dvh - 36px);overflow-y:auto;padding:22px;margin:0;justify-self:auto}
  .mobile-login-close{display:grid;place-items:center;position:absolute;top:12px;right:12px;width:34px;height:34px;padding:0;border:0;background:transparent;color:#9fb4c0;font-size:28px;line-height:1}
  .mobile-login-dialog .landing-login .auth-brand{padding-right:38px}
  body.mobile-login-modal-open{overflow:hidden}
  .mobile-login-dialog.keyboard-open{align-items:flex-start;padding:0 18px}
  .mobile-login-dialog.keyboard-open .landing-login{height:100%;max-height:100%;border-radius:0 0 14px 14px;overscroll-behavior:contain}
}


.ai-provider-controls{display:flex;align-items:end;gap:16px;margin-bottom:22px}.ai-provider-controls>label:first-child{display:grid;gap:7px;font-weight:700;min-width:280px}.ai-provider-controls select{min-width:280px}.ai-default-check{display:flex;align-items:center;gap:7px;padding-bottom:10px;font-weight:700}.ai-default-check input{width:auto;margin:0}@media(max-width:720px){.ai-provider-controls{align-items:stretch;flex-direction:column;gap:10px}.ai-provider-controls>label:first-child,.ai-provider-controls select{min-width:0;width:100%}.ai-default-check{padding-bottom:0}}
.ai-media-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0 8px}.ai-media-list{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.ai-media-chip{display:flex;align-items:center;gap:8px;max-width:100%;padding:7px 9px;border:1px solid var(--border);border-radius:9px;background:#0d1b24}.ai-media-chip span{max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-media-chip small{color:var(--muted);white-space:nowrap}.ai-media-chip button{border:0;background:transparent;padding:0 3px;font-size:20px;line-height:1;color:var(--muted)}.ai-media-chip button:hover{color:var(--text)}

/* Overhead and provider usage */
.overhead-grid{display:grid;gap:16px}.overhead-card{display:grid;gap:16px}.overhead-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.overhead-title h3{margin:4px 0 0}.usage-track{height:9px;border-radius:999px;background:var(--surface-3,#e5e7eb);overflow:hidden;min-width:180px}.usage-fill{height:100%;width:0;background:currentColor;border-radius:inherit}.usage-indeterminate{width:100%;opacity:.28}.overhead-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.overhead-stats div{display:grid;gap:3px}.overhead-stats span,.repo-usage span{color:var(--muted,#6b7280);font-size:.85rem}.repo-usage{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--border,#e5e7eb);padding-top:12px}.overhead-note{margin:0}.prompt-usage{min-width:220px;margin-left:auto}.usage-mini-head{display:flex;justify-content:space-between;gap:12px;font-size:.78rem;margin-bottom:6px}.ai-provider-row{flex-wrap:wrap}.ai-provider-row .prompt-usage{align-self:center}
@media(max-width:700px){.overhead-stats{grid-template-columns:1fr}.overhead-title{align-items:flex-start}.prompt-usage{order:3;width:100%;min-width:0;margin:8px 0 0}.ai-provider-row .prompt-usage{flex-basis:100%}.usage-track{min-width:0}}

.dashboard-secondary-action { margin-top:10px }
.project-create-modal h2 { margin:0 36px 4px 0 }
.project-pipeline-notice {
  margin:14px 0 0;
  padding:10px 12px;
  border:1px solid rgba(245, 190, 60, .45);
  border-radius:9px;
  background:rgba(245, 190, 60, .10);
  color:#e7c76a;
  font-size:.9rem;
  line-height:1.4;
}
.project-pipeline-notice strong { color:#f0d57b }
.create-project-mode { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0 }
.create-project-mode .create-project-mode-button.selected { border-color:var(--accent);background:var(--accent);color:#fff;box-shadow:0 0 0 1px var(--accent) }
/* The shared prompt-dialog label rule uses display:block and margins intended for
   prompt textareas. Restore form spacing for the project-creation dialog. */
.project-create-modal .auth-form { gap:18px }
.project-create-modal .auth-form label { display:grid;gap:8px;margin:0 }
.project-create-modal .auth-form select,.project-create-modal .auth-form input { width:100%;box-sizing:border-box }
/* Use a positioned chevron so the dropdown arrow has the same 11px inset from
   the right edge that the field value has from the left edge. */
.project-create-modal .auth-form select {
  -webkit-appearance:none;
  appearance:none;
  padding-right:36px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23e8f0f6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 11px center;
  background-size:12px 8px;
}
.integration-status { padding:10px 12px;border:1px solid var(--border);border-radius:9px;line-height:1.45 }
.repository-access-actions { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap }
.repository-access-actions .auth-link { margin:0;padding:0;background:none;border:0 }
@media(max-width:640px){
  .project-create-modal{padding:20px}
  .create-project-mode{grid-template-columns:1fr;margin:16px 0 18px}
  .project-create-modal .auth-form{gap:18px}
  .repository-access-actions{align-items:flex-start;flex-direction:column;gap:10px}
}

/* Prompt provider summary: keep connection state aligned with provider metadata. */
.ai-provider-row>.status{
  align-self:flex-start;
  font-size:10px;
  font-weight:700;
  line-height:1.2;
  margin-top:5px
}

@media(max-width:700px){
  .ai-provider-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start
  }

  .ai-provider-row>.status{
    grid-column:2;
    grid-row:1;
    justify-self:end;
    align-self:start;
    font-size:inherit;
    font-weight:inherit;
    line-height:1.2;
    margin-top:0
  }

  .ai-provider-row .prompt-usage{
    grid-column:1 / -1;
    grid-row:2;
    width:100%;
    margin-top:8px
  }
}

/* Self-service registration */
.mobile-auth-actions{display:flex;align-items:center;gap:8px}
.mobile-register-open{display:none}
.auth-inline-message{min-height:0;font-size:12px;font-weight:700;color:#62d99b}
.auth-inline-message.error{color:#ff8b93}
.register-link{margin-top:-5px}
@media(max-width:520px){
  .mobile-register-open{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 13px;border:1px solid #2b4555;border-radius:9px;background:transparent;color:#bcd0dc;font-weight:800;white-space:nowrap}
  .mobile-auth-actions{gap:7px}
  .mobile-login-dialog .register-link,.mobile-login-dialog .desktop-register-back{display:none}
}


/* Registration password strength and confirmation feedback. */
.registration-password-meter{height:7px;background:#071117;border:1px solid var(--border);border-radius:999px;overflow:hidden;margin-top:-7px}
.registration-password-meter>div{height:100%;width:0;transition:width .18s ease,background-color .18s ease}
.registration-password-meter>div.strength-1{background:#ff5d68}
.registration-password-meter>div.strength-2{background:#ff9f43}
.registration-password-meter>div.strength-3{background:#f0c94d}
.registration-password-meter>div.strength-4{background:#5ee18c}
.registration-password-feedback{min-height:16px;font-size:12px;font-weight:700;color:var(--muted);margin-top:-8px}
.registration-password-feedback.strength-1,.registration-password-feedback.invalid{color:#ff8b93}
.registration-password-feedback.strength-2{color:#ffb35c}
.registration-password-feedback.strength-3{color:#f0d76a}
.registration-password-feedback.strength-4,.registration-password-feedback.valid{color:#5ee18c}
.registration-password-requirements{font-size:10px;font-weight:500;color:var(--muted)}

/* Account settings */
.dashboard-account{height:40px;white-space:nowrap;background:#263f59!important;color:#fff!important}
.account-settings-modal{width:min(820px,100%);max-height:90vh;overflow:auto}
.account-settings-modal>h2{margin:0 36px 20px 0}
.account-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.account-section{border:1px solid var(--border);border-radius:12px;padding:16px;background:#0d1921}
.account-section h3{margin:0 0 14px}
.account-settings-modal .auth-form label{display:grid;gap:7px;margin:0}
.account-section .auth-form+.auth-form{margin-top:18px;padding-top:18px;border-top:1px solid var(--border)}
.account-section>button{width:100%}
.account-inline-form{margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}
.account-danger-zone{margin-top:18px;border:1px solid #873838;border-radius:12px;padding:16px;background:rgba(120,30,30,.12)}
.account-danger-zone h3{margin:0 0 8px;color:#ff8f8f}
.account-danger-zone p{color:#d7b6b6;line-height:1.5}
.account-danger-zone label{display:grid;gap:8px;font-size:13px;font-weight:700;margin:14px 0}
.account-danger-zone label>span{display:block;white-space:nowrap}
.account-danger-zone input{width:100%;box-sizing:border-box}
.account-danger-zone .danger{background:#b83a3a;border-color:#b83a3a;color:#fff}
@media(max-width:720px){.account-settings-modal{height:100dvh;max-height:none;width:100%;border-radius:0;padding:20px}.account-settings-grid{grid-template-columns:1fr}}

/* Account settings refinements */
.account-settings-modal{
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.account-settings-modal::-webkit-scrollbar{display:none}
@media(min-width:721px){
  .account-profile-section{display:flex;flex-direction:column}
  .account-profile-section #account-email-form{margin-top:auto}
}


/* Self-service LLM integration */
.llm-integration-modal h2{margin:0 36px 6px 0}
.llm-integration-modal>p{margin:0 0 18px}
.llm-provider-help{margin:-2px 0 16px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:rgba(255,255,255,.025);font-size:13px;line-height:1.5;color:var(--muted)}
.llm-provider-help a{display:inline-block;margin-left:4px}
.llm-test-row{display:flex;align-items:center;gap:12px;margin:2px 0 18px}
.llm-test-row .status{font-size:13px}
.llm-test-row .error{font-size:13px;color:var(--danger,#ff7b7b)}
@media(max-width:640px){.llm-test-row{align-items:flex-start;flex-direction:column}.llm-test-row button{width:100%}}

/* Account LLM integrations */
.account-llm-section{grid-column:1/-1}
.account-llm-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-top:1px solid var(--border)}
.account-llm-row:first-child{border-top:0;padding-top:0}
.account-llm-row:last-child{padding-bottom:0}
.account-llm-row>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.account-llm-row .muted{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-llm-delete{width:auto!important;flex:0 0 auto}
.account-llm-empty{margin:0}

/* Account LLM integration action */
.account-add-llm{width:100%;margin-top:12px}
.dashboard-add-project{margin-bottom:14px}

.dashboard-llm-section{margin-top:30px;padding-top:24px;border-top:1px solid var(--border)}
.dashboard-llm-actions{display:grid;gap:10px;margin-bottom:14px}
.dashboard-llm-list{display:grid;gap:12px}
.dashboard-llm-card{display:grid;gap:16px}
.dashboard-llm-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.dashboard-llm-card-head h3{margin:4px 0 2px}
.dashboard-llm-usage{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;border-top:1px solid var(--border);padding-top:14px}
.dashboard-llm-usage>div{display:grid;gap:3px}
.dashboard-llm-usage span{font-size:12px;color:var(--muted)}
.dashboard-llm-usage-note,.dashboard-llm-empty{margin:0}
@media(max-width:700px){.dashboard-llm-usage{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact dashboard section toolbars */
@media(min-width:641px){
  .dashboard-section-toolbar{align-items:center}
  .dashboard-section-title{min-width:0}
  .dashboard-section-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
  .dashboard-compact-button{width:auto;min-height:40px;margin:0!important;white-space:nowrap}
  .dashboard-section-actions .project-cache-time{white-space:nowrap}
  .dashboard-ai-toolbar .dashboard-llm-actions{display:flex;align-items:center;gap:10px;margin:0;flex:0 0 auto}
}
@media(max-width:640px){
  .dashboard-section-actions,.dashboard-llm-actions{display:grid;width:100%;gap:10px}
  .dashboard-section-actions .project-cache-time{order:-1}
  .dashboard-compact-button{width:100%;min-height:48px}
}


/* Dashboard project carousel: compact horizontal cards without a visible scrollbar. */
.dashboard-project-carousel{display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:1px}
.dashboard-project-carousel::-webkit-scrollbar{display:none}
.dashboard-project-carousel>.project{flex:0 0 calc((100% - 28px)/3);min-width:0;box-sizing:border-box}
@media(max-width:1000px) and (min-width:641px){.dashboard-project-carousel>.project{flex-basis:calc((100% - 14px)/2)}}
@media(max-width:640px){.dashboard-project-carousel{gap:12px}.dashboard-project-carousel>.project{flex-basis:78%;min-width:78%}}

/* Desktop dashboard toolbar alignment: keep both action pairs together on the same columns. */
@media(min-width:641px){
  .dashboard-section-toolbar{align-items:flex-start}
  .dashboard-section-title{min-height:45px}
  .dashboard-section-actions,
  .dashboard-ai-toolbar .dashboard-llm-actions{
    width:422px;
    flex:0 0 422px;
    display:grid;
    grid-template-columns:160px 252px;
    column-gap:10px;
    row-gap:1px;
    justify-content:end;
    align-items:start;
  }
  .dashboard-section-actions .dashboard-compact-button,
  .dashboard-ai-toolbar .dashboard-compact-button{
    min-height:32px;
    height:32px;
    width:max-content;
    justify-self:start;
  }
  .dashboard-section-actions .project-cache-time{
    grid-column:1/-1;
    justify-self:end;
    margin:0;
    line-height:12px;
    font-size:11px;
    white-space:nowrap;
  }
}

/* Desktop Projects: refresh beside heading; New Project is the first carousel card. */
.dashboard-project-title-row{display:flex;align-items:center;gap:16px}
.dashboard-project-title-row .dashboard-refresh{margin:0}
.dashboard-new-project-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;color:#e8f0f6;background:var(--panel);border:1px solid var(--border);cursor:pointer}
.dashboard-new-project-plus{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:9px;background:#168ff5;color:#fff;font-size:30px;font-weight:400;line-height:1}
.dashboard-new-project-label{font-weight:700}
@media(min-width:641px){
  .dashboard-project-heading.dashboard-section-toolbar{align-items:flex-start}
  .dashboard-project-heading .dashboard-section-title{min-height:45px}
  .dashboard-project-heading .dashboard-section-actions{display:flex;width:auto;flex:0 0 auto;align-self:flex-start;min-height:45px;align-items:flex-end}
  .dashboard-project-heading .dashboard-section-actions .dashboard-add-project{display:none}
  .dashboard-project-heading .dashboard-section-actions .project-cache-time{display:block;line-height:1;font-size:11px;white-space:nowrap;margin:0 0 1px}
  .dashboard-project-carousel>.dashboard-new-project-card{flex:0 0 112px;min-width:112px;min-height:100px;padding:12px}
}
@media(max-width:640px){
  .dashboard-project-title-row{width:100%;display:block}
  .dashboard-project-title-row .dashboard-refresh{display:none}
  .dashboard-new-project-card{display:none}
}

/* Projects toolbar refinement: cache follows Refresh; plus sits directly on New Project card. */
.dashboard-project-title-row .project-cache-time{margin:0;line-height:1;font-size:11px;white-space:nowrap;align-self:center}
.dashboard-new-project-plus{width:auto;height:auto;border-radius:0;background:transparent;color:#fff}
@media(min-width:641px){
  .dashboard-project-title-row{gap:16px}
  .dashboard-project-heading .dashboard-section-actions{display:none}
}
@media(max-width:640px){
  .dashboard-project-title-row .project-cache-time{display:none}
  .dashboard-project-heading .dashboard-section-actions{display:flex}
}

/* Mobile dashboard spacing + compact New Project card. */
@media(max-width:640px){
  .dashboard-project-heading.dashboard-section-toolbar{
    margin-bottom:0;
  }

  .dashboard-project-carousel{
    margin-top:16px;
  }

  .dashboard-project-heading .dashboard-section-actions{
    display:none;
  }

  .dashboard-project-carousel>.dashboard-new-project-card{
    display:flex;
    flex:0 0 112px;
    min-width:112px;
    min-height:100px;
    padding:12px;
  }

  .dashboard-ai-toolbar .dashboard-llm-actions{
    margin-top:16px;
  }
}


/* LLM integration form spacing and compact desktop integration carousel. */
.llm-integration-modal .auth-form>label,
.llm-integration-modal #llm-admin-key-field{gap:10px}
.dashboard-llm-pending-status{color:var(--muted)}
@media(min-width:701px){
  .dashboard-llm-list{display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:1px}
  .dashboard-llm-list::-webkit-scrollbar{display:none}
  .dashboard-llm-list>.dashboard-llm-card{flex:0 0 calc((100% - 14px)/2);min-width:0;box-sizing:border-box;scroll-snap-align:start;margin-bottom:14px;padding:14px}
  .dashboard-llm-card{gap:12px}
  .dashboard-llm-usage{gap:9px;padding-top:12px}
  .dashboard-llm-list>.panel:not(.dashboard-llm-card){flex:1 0 100%}
}

/* Refine spacing inside the Add LLM Integration dialog. */
.llm-integration-modal .auth-form > label,
.llm-integration-modal #llm-admin-key-field{
  display:grid;
  gap:9px;
  margin:0;
}
.llm-integration-modal .auth-form select{
  -webkit-appearance:none;
  appearance:none;
  box-sizing:border-box;
  padding-right:36px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23e8f0f6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 11px center;
  background-size:12px 8px;
}
.llm-integration-modal .password-toggle{
  right:3px;
}
.llm-integration-modal #llm-admin-key-field > small{
  margin-top:3px;
}

/* Desktop Projects refresh controls: compact refresh and shared bottom alignment. */
@media(min-width:641px){
  .dashboard-project-title-row{
    align-items:flex-end;
  }
  .dashboard-project-title-row .dashboard-refresh{
    min-height:22px;
    height:22px;
    padding:0 8px;
    font-size:11px;
    line-height:20px;
  }
  .dashboard-project-title-row .project-cache-time{
    align-self:center;
    line-height:1;
    margin:0;
  }
}

/* Project subscription billing */
.project-billing-pending{cursor:not-allowed!important;opacity:.68}
.project-billing-pending:hover{transform:none!important}
.billing-modal{max-width:720px}
.billing-total{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px;margin:18px 0;border:1px solid var(--border);border-radius:12px;background:var(--panel)}
.billing-total span{color:var(--muted)}
.billing-total strong{font-size:24px}
.billing-projects{display:grid;gap:10px}
.billing-project-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px;border:1px solid var(--border);border-radius:10px}
.billing-project-row>div:first-child{display:grid;gap:4px}
.billing-project-actions{display:flex;align-items:center;gap:12px;white-space:nowrap}
.payment-received-modal{max-width:480px}
@media(max-width:640px){.billing-project-row{align-items:flex-start;flex-direction:column}.billing-project-actions{width:100%;justify-content:space-between}.dashboard-section-actions{gap:8px}}

.account-billing-section{grid-column:1/-1}
.account-billing-total{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 0 14px;margin-bottom:4px;border-bottom:1px solid var(--border)}
.account-billing-total span{color:var(--muted)}
.account-billing-total strong{font-size:22px}
.account-billing-projects{display:grid}
.account-billing-project-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 0;border-top:1px solid var(--border)}
.account-billing-project-row:first-child{border-top:0}
.account-billing-project-row>div:first-child{display:grid;gap:4px;min-width:0}
.account-billing-project-actions{display:flex;align-items:center;gap:12px;white-space:nowrap}
@media(max-width:640px){.account-billing-project-row{align-items:flex-start;flex-direction:column}.account-billing-project-actions{width:100%;justify-content:space-between}.account-manage-billing{width:auto!important}}

/* Organization management */
.account-organizations-section{grid-column:1/-1}
#account-organizations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.account-org-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.75rem;text-align:left;padding:14px;border:1px solid var(--border);border-radius:10px;background:rgba(255,255,255,.025);min-width:0}.account-org-row>span:first-child{display:flex;flex-direction:column;gap:.15rem;min-width:0}.account-org-row small{font-weight:400;color:var(--muted,#667085)}.account-org-row>button{flex:0 0 auto}.account-org-leave{background:#b83a3a;border-color:#b83a3a;color:#fff}.account-org-leave:hover{background:#9f3030;border-color:#9f3030}
.account-llm-delete{background:#b83a3a!important;border-color:#b83a3a!important;color:#fff!important}.account-llm-delete:hover{background:#9f3030!important;border-color:#9f3030!important}
@media(max-width:640px){#account-organizations{display:block}.account-org-row{border:0;border-top:1px solid var(--border);border-radius:0;background:transparent;padding:12px 0;margin:0}.account-org-row:first-child{border-top:0;padding-top:0}.account-org-row:last-child{padding-bottom:0}}.organization-toolbar{display:flex;justify-content:flex-end;margin:.75rem 0}.organization-members{display:grid;gap:.5rem}.organization-member{display:flex;justify-content:space-between;align-items:center;border:1px solid rgba(128,128,128,.25);border-radius:10px;padding:.65rem .75rem}.organization-member>div{display:flex;align-items:center;gap:.5rem}.org-role,.invite-tag{border-radius:999px;padding:.18rem .5rem;font-size:.78rem;text-transform:capitalize}.org-role.admin{background:#dbeafe;color:#1e40af}.org-role.member{background:#f3f4f6;color:#374151}.organization-danger{display:flex;gap:.6rem;justify-content:flex-end;margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(128,128,128,.25)}.invite-tags{display:flex;gap:.4rem;flex-wrap:wrap;min-height:2rem;margin:.5rem 0}.invite-tag{display:inline-flex;align-items:center;gap:.35rem}.invite-tag.existing{background:#dcfce7;color:#166534}.invite-tag.new{background:#fef3c7;color:#92400e}.invite-tag button{border:0;background:transparent;color:inherit;padding:0;min-width:auto}.invite-review{display:grid;gap:.5rem}.invite-review>div{display:flex;justify-content:space-between;gap:1rem;border-bottom:1px solid rgba(128,128,128,.2);padding:.5rem 0}.invite-review span{color:var(--muted,#667085);text-transform:capitalize}@media(max-width:640px){.organization-danger{flex-direction:column}.invite-review>div{flex-direction:column;gap:.15rem}}

.dashboard-invitations{margin-bottom:30px;padding-bottom:24px;border-bottom:1px solid var(--border)}
.dashboard-invitation-list{display:grid;gap:12px}
.dashboard-invitation-card{display:flex;align-items:center;justify-content:space-between;gap:16px}
.dashboard-invitation-card>div:first-child{display:grid;gap:4px}
.dashboard-invitation-actions{display:flex;gap:10px;flex:0 0 auto}
@media(max-width:640px){.dashboard-invitation-card{align-items:stretch;flex-direction:column}.dashboard-invitation-actions{display:grid;grid-template-columns:1fr 1fr}.dashboard-invitation-actions button{width:100%}}

/* Keep organization form label/input spacing consistent with other forms. */
.organization-modal .auth-form label {
  display:grid;
  gap:7px;
  margin:0;
}
.organization-modal .auth-form input {
  width:100%;
  box-sizing:border-box;
}
\n\n/* Project cards: branch names are intentionally omitted from the dashboard. */
.dashboard-project-repository{margin:0}
@media(max-width:640px){
  .dashboard-project-carousel>.project{
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:8px;
  }
  .dashboard-project-carousel>.project>div:first-child{min-width:0}
  .dashboard-project-carousel>.project h3{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    text-overflow:ellipsis;
    line-height:1.25;
    min-height:2.5em;
    margin:0 0 7px;
  }
  .dashboard-project-carousel>.project .dashboard-project-repository{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .dashboard-project-carousel>.project>.status{margin-top:0}

  /* Align the LLM Integration eyebrow with the connection state. */
  .dashboard-llm-card-head>div>.eyebrow{
    display:block;
    line-height:1.2;
    transform:translateY(-2px);
  }
}

/* Integrated-provider select: inset the chevron to match the value padding. */
.ai-provider-controls select{
  -webkit-appearance:none;
  appearance:none;
  box-sizing:border-box;
  padding-right:36px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23e8f0f6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 11px center;
  background-size:12px 8px;
}

/* Project tabs share the available width evenly. */
.tabs button{white-space:nowrap;text-align:center}

/* Mobile dashboard: reduce project-card height without changing carousel width. */
@media(max-width:640px){
  .dashboard-project-carousel>.project{
    padding:11px 16px;
    gap:4px;
  }
  .dashboard-project-carousel>.project h3{
    margin:0 0 3px;
  }
  .dashboard-project-carousel>.project .dashboard-project-repository{
    margin:0;
    line-height:1.25;
  }
  .dashboard-project-carousel>.project>.status{
    margin-top:2px;
    line-height:1.25;
  }
}

.create-project-org-label {
  display:flex;
  align-items:center;
  gap:8px
}

.create-project-org-loading {
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:12px;
  font-weight:400
}

.create-project-org-loading .spinner {
  width:14px;
  height:14px;
  border-width:2px
}

/* CI pipeline onboarding */
.ci-pipeline-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ci-pipeline-card{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;min-height:82px;padding:13px 14px}
.ci-pipeline-card span{font-size:12px;line-height:1.35;opacity:.8}
.ci-pipeline-card.selected,.ci-followup-button.selected{border-color:var(--accent);background:var(--accent);color:#fff;box-shadow:0 0 0 1px var(--accent)}
.ci-pipeline-warning{padding:14px;border:1px solid #d5a100;border-radius:10px;background:rgba(213,161,0,.10)}
.ci-pipeline-warning p{margin:0 0 12px;line-height:1.45}
.ci-pipeline-followup{display:grid;grid-template-columns:minmax(90px,.35fr) 1fr;gap:8px}
.project-ci-pending{cursor:default!important}
.project-ci-pending-status{color:#d5a100!important}
@media(max-width:640px){.ci-pipeline-choice,.ci-pipeline-followup{grid-template-columns:1fr}}

/* Application administrator inquiries */
.dashboard-header>span{gap:10px}
.inquiries-section{padding:22px;max-width:1400px;margin:0 auto}
.inquiries-section>h2{font-size:18px;font-weight:600;margin:0 0 14px;color:#fff}
.inquiries-loading{display:flex;align-items:center;gap:10px;color:var(--muted)}
.inquiries-loading .spinner{width:18px;height:18px}
.inquiries-table-wrap{padding:0;overflow-x:auto}
.inquiries-table{width:100%;border-collapse:collapse;min-width:900px}
.inquiries-table th,.inquiries-table td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--border);vertical-align:top}
.inquiries-table th{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:600}
.inquiries-table tbody tr:last-child td{border-bottom:0}
.inquiry-subtext{display:block;margin-top:4px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.inquiry-pending{color:#d5a100;font-weight:600;white-space:nowrap}
.inquiries-empty{padding:18px;margin:0}
@media(max-width:700px){.inquiries-section{padding:16px}.dashboard-header>span{gap:7px}.dashboard-account{padding-left:11px;padding-right:11px}}

/* Inquiries layout refinements */
header.inquiries-header{grid-template-columns:44px minmax(0,1fr) auto}
.inquiries-header>span{display:flex;justify-content:flex-end;min-width:max-content}
.general-inquiries-heading{margin-top:28px!important}
.inquiries-mobile-list{display:none}
@media(max-width:700px){
  header.inquiries-header{padding:0 12px;grid-template-columns:32px minmax(0,1fr) auto}
  .inquiries-header .dashboard-account{padding-left:11px;padding-right:11px;max-width:100%}
  .inquiries-section{padding:16px}
  .inquiries-table{display:none}
  .inquiries-table-wrap{overflow:visible;width:100%}
  .inquiries-mobile-list{display:grid;gap:12px;width:100%}
  .inquiry-mobile-card{display:grid;grid-template-columns:1fr 1fr;gap:16px 14px;width:100%;min-height:190px;padding:18px;border:0;border-radius:12px;background:transparent}
  .inquiry-mobile-card>div{min-width:0;display:flex;flex-direction:column;gap:4px}
  .inquiry-mobile-card span{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:600}
  .inquiry-mobile-card strong,.inquiry-mobile-card small{font-size:12px;line-height:1.35;overflow-wrap:anywhere}
  .inquiry-mobile-card small{color:var(--muted)}
  .general-inquiry-card{min-height:150px}
}

/* Public legal links and policy pages */
.landing-legal-links{display:flex;align-items:center;gap:9px;margin-top:14px;font-size:12px;color:var(--muted)}
.landing-legal-links a,.registration-legal a,.account-legal-links a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.landing-legal-links a:hover,.registration-legal a:hover,.account-legal-links a:hover{color:#fff}
.registration-legal{margin:4px 0 0!important;font-size:11px!important;line-height:1.45!important;color:var(--muted)!important;text-align:center}
.account-legal-links{display:flex;gap:16px;flex-wrap:wrap}.account-legal-links a{color:#c7d5de}
.legal-page{min-height:100vh;background:var(--bg);color:var(--text);padding:36px 20px 64px}
.legal-shell{width:min(860px,100%);margin:0 auto}
.legal-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:24px;border-bottom:1px solid var(--border)}
.legal-brand{font-weight:700;font-size:18px;color:#fff;text-decoration:none}.legal-back{font-size:13px;color:var(--muted);text-decoration:none}.legal-back:hover{color:#fff}
.legal-content{padding-top:28px;line-height:1.65}.legal-content h1{font-size:34px;line-height:1.15;margin:0 0 8px}.legal-updated{margin:0 0 30px;color:var(--muted);font-size:13px}.legal-content h2{font-size:20px;margin:30px 0 8px}.legal-content h3{font-size:16px;margin:20px 0 6px}.legal-content p,.legal-content li{color:#c7d5de}.legal-content ul{padding-left:22px}.legal-content a{color:#9fd4ff}.legal-note{padding:14px 16px;border:1px solid var(--border);border-radius:10px;background:#0d1921}
@media(max-width:640px){.legal-page{padding:24px 16px 48px}.legal-content h1{font-size:29px}.landing-legal-links{justify-content:center}}

/* Project billing tiers, admin project actions, and selected admin navigation. */
.dashboard-project-actions{display:flex;gap:8px;margin-top:10px;position:relative;z-index:2}
.dashboard-project-actions button{padding:7px 10px;font-size:12px}
.project-billing-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.project-billing-option{display:grid;gap:4px;text-align:left;padding:12px}
.project-billing-option span{font-size:12px;opacity:.8}
.project-billing-option.selected{border-color:var(--accent);background:rgba(22,143,245,.16);box-shadow:0 0 0 1px var(--accent)}
.upgrade-tier-options{display:grid;gap:10px;margin-top:18px}
.admin-nav-selected{background:#102a42!important;border-color:#4b769c!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
@media(max-width:640px){.project-billing-choice{grid-template-columns:1fr}.dashboard-project-actions{flex-wrap:wrap}}

/* Compact desktop Add Project layout: fit the complete form when viewport height allows,
   while retaining hidden-scrollbar overflow for shorter screens. */
@media(min-width:641px){
  .project-create-modal{
    width:min(820px,calc(100vw - 40px));
    max-height:calc(100vh - 40px);
    overflow-y:auto;
    box-sizing:border-box;
    padding:18px 22px;
    scrollbar-width:none;
    -ms-overflow-style:none
  }
  .project-create-modal::-webkit-scrollbar{display:none;width:0;height:0}
  .project-create-modal .auth-form{gap:10px}
  .project-create-modal .auth-form label{gap:5px}
  .project-create-modal .integration-status{padding:8px 11px;line-height:1.3}
  .project-create-modal .create-project-mode{margin:10px 0}
  .project-create-modal .project-pipeline-notice{margin-top:8px;padding:8px 11px;line-height:1.3}
  .project-create-modal .repository-access-actions{min-height:20px}
  .project-create-modal .ci-pipeline-card{
    min-height:58px;
    padding:9px 12px;
    gap:2px;
    justify-content:center
  }
  .project-create-modal .ci-pipeline-card span{line-height:1.2}
  .project-create-modal .project-billing-option{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 12px
  }
  .project-create-modal .project-billing-option span{
    margin-left:2px;
    white-space:nowrap
  }
  .project-create-modal .prompt-dialog-actions{margin-top:8px}
}

/* Add Project desktop space optimization: inline heading/subtext and repository refresh. */
.create-project-heading{display:flex;align-items:baseline;gap:12px;min-width:0;padding-right:34px}
.create-project-heading h2{flex:0 0 auto}
.create-project-heading .muted{margin:0;min-width:0}
.repository-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}
.repository-label-row .auth-link{margin:0;padding:0;background:none;border:0;white-space:nowrap}
@media(min-width:641px){
  .project-create-modal .create-project-heading h2{font-size:1.45rem;margin:0}
  .project-create-modal .create-project-heading .muted{font-size:.88rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .project-create-modal .repository-access-actions:has(.hidden){display:none}
}
@media(max-width:640px){
  .create-project-heading{display:block;padding-right:34px}
  .create-project-heading .muted{margin-top:4px}
  .repository-label-row{align-items:baseline}
}

/* Add Project selection clarity and conditional repository controls. */
.create-project-section-title{font-weight:600;font-size:13px;line-height:1.2}
.repository-label-actions{display:flex;align-items:center;gap:14px;margin-left:auto}
.repository-label-actions .auth-link{font-size:13px;font-weight:600;line-height:1.2}
#create-project-dialog select:invalid,#create-project-dialog input:placeholder-shown{border-color:#536572}
#create-project-dialog select:not(:disabled):valid,#create-project-dialog input:not(:placeholder-shown){border-color:#6d8798;box-shadow:inset 0 0 0 1px rgba(109,135,152,.18)}
#create-project-dialog .create-project-complete{border-color:#426f8c;background:rgba(43,104,143,.12)}
#create-project-dialog .ci-pipeline-card:not(.selected),#create-project-dialog .project-billing-option:not(.selected){opacity:.78;border-color:#536572;background:#172731}
#create-project-dialog .ci-pipeline-card.selected,#create-project-dialog .project-billing-option.selected{opacity:1;border-color:var(--accent);background:rgba(22,143,245,.22);box-shadow:0 0 0 1px var(--accent)}
#create-project-no-repos{cursor:default}
@media(min-width:641px){
  .project-create-modal .create-project-section-title{margin-bottom:-4px}
  .project-create-modal .create-project-repository-section label{gap:5px}
}
@media(max-width:640px){
  .repository-label-actions{gap:9px;flex-wrap:wrap;justify-content:flex-end}
  .repository-label-actions .auth-link{font-size:12px}
}


/* Add Project selected-state and repository action alignment refinements. */
#create-project-dialog .create-project-mode-button:not(.selected){opacity:.78;border-color:#536572;background:#172731}
#create-project-dialog .create-project-mode-button.selected{opacity:1;border-color:var(--accent);background:var(--accent);color:#fff;box-shadow:0 0 0 1px var(--accent)}
.repository-label-row{justify-content:flex-start}
.repository-label-row .repository-manage-access{margin-left:10px!important;font-size:13px;font-weight:600;line-height:1.2}
.repository-label-row .repository-refresh{margin-left:auto!important;font-size:13px;font-weight:600;line-height:1.2}
@media(max-width:640px){
  .repository-label-row .repository-manage-access{margin-left:8px!important;font-size:12px}
  .repository-label-row .repository-refresh{font-size:12px}
}


/* Add Project compact organization/status row and CI selection refinements. */
.repository-label-row .repository-manage-access{margin-left:7px!important}
#create-project-dialog .ci-followup-button.selected{opacity:1!important;border-color:var(--accent)!important;background:var(--accent)!important;color:#fff!important;box-shadow:0 0 0 1px var(--accent)!important}
#create-project-dialog .ci-pipeline-warning p{font-size:.9rem;line-height:1.4}
@media(min-width:641px){
  .project-create-modal .create-project-org-row{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:10px;align-items:end}
  .project-create-modal .create-project-org-row>label{min-width:0;margin:0}
  .project-create-modal .create-project-org-row #create-github-status{min-width:0;font-size:12px;line-height:1.25;padding:7px 9px}
}
@media(max-width:640px){
  .repository-label-row .repository-manage-access{margin-left:5px!important}
  .create-project-org-row{display:grid;gap:10px}
}


/* Guided dashboard/source tutorials */
#tutorial-overlay{position:fixed;inset:0;z-index:10000;pointer-events:none}
.tutorial-focus{position:fixed;border:2px solid #fff;border-radius:10px;box-shadow:0 0 0 9999px rgba(5,15,27,.78),0 0 0 4px rgba(67,153,255,.38);z-index:10001;transition:left .16s ease,top .16s ease,width .16s ease,height .16s ease}
.tutorial-note{position:fixed;z-index:10002;pointer-events:auto;background:#fff;color:#13263b;border-radius:12px;padding:15px 46px 12px 16px;box-shadow:0 16px 45px rgba(0,0,0,.32);font-size:14px;line-height:1.45;min-width:220px}
.tutorial-copy{font-weight:600}
.tutorial-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}
.tutorial-controls button{min-width:42px;height:34px;padding:5px 11px}
.tutorial-close{position:absolute;right:9px;top:7px;border:0!important;background:transparent!important;color:#526477!important;font-size:22px;line-height:1;padding:3px 7px!important;min-width:0!important;height:auto!important}
.tutorial-done{display:none}
@media(max-width:700px){.tutorial-note{font-size:13px;min-width:190px;padding:13px 42px 10px 14px}}


/* Free-trial dashboard cards: compact project details with upgrade as the only admin action. */
.dashboard-free-trial-project{min-height:100px}
.dashboard-free-trial-copy{min-width:0;display:flex;flex-direction:column;justify-content:center}
.dashboard-free-trial-project .dashboard-project-repository{margin:0 0 5px}
.dashboard-free-trial-status{font-size:12px;line-height:1.25}
.dashboard-free-trial-actions{margin:0 0 0 16px;align-self:center;flex:0 0 auto}
@media(max-width:640px){
  .dashboard-project-carousel>.dashboard-free-trial-project{
    min-height:100px;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }
  .dashboard-project-carousel>.dashboard-free-trial-project h3{
    min-height:0;
    margin:0 0 3px;
    -webkit-line-clamp:1;
  }
  .dashboard-free-trial-actions{margin:0;flex-wrap:nowrap}
}


/* Keep dashboard/admin actions stable across dashboard, project, Requests and Inquiries views. */
header.project-header{grid-template-columns:44px minmax(0,1fr) auto}
.project-header>span,.inquiries-header>span,.dashboard-header>span{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:max-content}
.inquiries-header .dashboard-account,.project-header .dashboard-account{height:40px;flex:0 0 auto;padding-left:14px;padding-right:14px}
@media(max-width:700px){
  header.project-header{padding:0 12px;grid-template-columns:32px minmax(0,1fr) auto}
  .project-header>span,.inquiries-header>span,.dashboard-header>span{gap:7px}
  .project-header .dashboard-account,.inquiries-header .dashboard-account{padding-left:10px;padding-right:10px}
}


/* Dashboard project-card parity + mobile header/source layout. */
.dashboard-free-trial-project{display:block;min-height:0}
.dashboard-free-trial-copy{width:100%;min-width:0}
.dashboard-free-trial-project h3{margin:0 0 6px}
.dashboard-free-trial-repository-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.dashboard-free-trial-repository-row .dashboard-project-repository{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-free-trial-upgrade{flex:0 0 auto;padding:7px 10px;font-size:12px;position:relative;z-index:2}
.dashboard-free-trial-status{margin-top:6px}

@media(max-width:700px){
  header.dashboard-header{
    height:60px;
    padding:0 8px;
    grid-template-columns:minmax(74px,1fr) auto;
    column-gap:6px;
  }
  .dashboard-header #back{display:none}
  .dashboard-header strong{
    font-size:15px;
    padding-left:2px;
    min-width:0;
  }
  .dashboard-header>span{
    gap:5px;
    min-width:0;
  }
  .dashboard-header .dashboard-account{
    height:34px;
    min-height:34px;
    padding:0 7px;
    font-size:10px;
    white-space:nowrap;
  }

  header.project-header{
    height:auto;
    min-height:92px;
    padding:7px 10px;
    grid-template-columns:32px minmax(0,1fr);
    grid-template-rows:36px 38px;
    column-gap:7px;
    row-gap:4px;
  }
  .project-header #back{grid-column:1;grid-row:1;align-self:center}
  .project-header strong{
    grid-column:2;
    grid-row:1;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:14px;
  }
  .project-header>span{
    grid-column:1/-1;
    grid-row:2;
    width:100%;
    min-width:0;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:6px;
  }
  .project-header .dashboard-account{
    width:100%;
    height:34px;
    min-height:34px;
    padding:0 5px;
    font-size:10px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .tabs{margin-top:2px}
  .tabs button{flex:0 0 auto;min-width:84px;padding:9px 10px}

  .dashboard-project-carousel>.dashboard-free-trial-project{
    min-height:0;
    display:block;
    padding:11px 16px;
  }
  .dashboard-free-trial-project h3{
    min-height:0;
    margin:0 0 3px;
    -webkit-line-clamp:1;
  }
  .dashboard-free-trial-status{margin-top:3px;line-height:1.25}
  .dashboard-free-trial-upgrade{padding:6px 9px}
}

/* Keep free-trial project cards at the same visual height as standard project cards. */
.dashboard-project-carousel>.dashboard-free-trial-project{
  padding-top:9px;
  padding-bottom:9px;
}
.dashboard-free-trial-project h3{margin-bottom:2px}
.dashboard-free-trial-project .dashboard-project-repository{margin:0!important;line-height:1.2}
.dashboard-free-trial-status{margin-top:1px;line-height:1.15}
@media(max-width:640px){
  .dashboard-project-carousel>.dashboard-free-trial-project{
    padding-top:7px;
    padding-bottom:7px;
  }
  .dashboard-free-trial-project h3{margin-bottom:1px}
  .dashboard-free-trial-status{margin-top:1px;line-height:1.1}
}

/* Align the free-trial action with the trial-expiration status, matching normal card status placement. */
.dashboard-free-trial-bottom-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:5px;min-width:0}
.dashboard-free-trial-bottom-row .dashboard-free-trial-status{margin-top:0;min-width:0}
.dashboard-free-trial-bottom-row .dashboard-free-trial-upgrade{margin-left:auto}
@media(max-width:640px){
  .dashboard-free-trial-bottom-row{margin-top:4px}
}

/* Premium request note spacing and mobile field alignment */
#premium-request-dialog .auth-form label {
  display:grid;
  gap:9px;
  margin-right:0;
}

#premium-request-dialog #premium-request-note {
  width:100%;
  box-sizing:border-box;
}

@media(max-width:640px) {
  #premium-request-dialog .prompt-dialog-modal {
    box-sizing:border-box;
  }

  #premium-request-dialog .auth-form,
  #premium-request-dialog .auth-form label,
  #premium-request-dialog #premium-request-note {
    width:100%;
    min-width:0;
  }
}

/* Premium upgrade request note: mobile wrapping + touch scrolling without a visible scrollbar */
@media(max-width:640px){
  #premium-request-dialog #premium-request-note{
    display:block;
    width:100%;
    max-width:100%;
    min-height:96px;
    height:96px;
    box-sizing:border-box;
    resize:none;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    word-break:normal;
    overflow-x:hidden;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    -ms-overflow-style:none;
  }
  #premium-request-dialog #premium-request-note::-webkit-scrollbar{
    display:none;
    width:0;
    height:0;
  }
}

/* Mobile tutorials: use the viewport width efficiently while keeping the note clear of its highlighted control. */
@media(max-width:700px){
  .tutorial-note{box-sizing:border-box;min-width:0;width:calc(100vw - 28px);max-width:calc(100vw - 28px)}
}

/* Keep the Add Project form constrained to the mobile viewport after GitHub connects.
   Repository actions may become visible at that point, so allow that row and status
   content to wrap instead of widening the dialog. */
@media(max-width:640px){
  #create-project-dialog .project-create-modal,
  #create-project-dialog .auth-form,
  #create-project-dialog .create-project-org-row,
  #create-project-dialog .create-project-org-row>label,
  #create-project-dialog .create-project-repository-section,
  #create-project-dialog .create-project-repository-section>label,
  #create-project-dialog #create-github-status,
  #create-project-dialog #create-project-repo-select-wrap{
    min-width:0;
    max-width:100%;
    width:100%;
    box-sizing:border-box
  }
  #create-project-dialog #create-github-status{
    overflow-wrap:anywhere;
    word-break:normal
  }
  #create-project-dialog .repository-label-row{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-start;
    gap:6px 10px;
    min-width:0;
    max-width:100%
  }
  #create-project-dialog .repository-label-row>span:first-child{
    flex:0 0 100%
  }
  #create-project-dialog .repository-label-row .repository-manage-access{
    margin-left:0!important
  }
  #create-project-dialog .repository-label-row .repository-refresh{
    margin-left:0!important
  }
  #create-project-dialog select,
  #create-project-dialog input{
    min-width:0;
    max-width:100%
  }
}

/* Add Project refinements: consistent selected organization mode, three desktop billing tiers,
   and scrollbar-free touch scrolling on mobile. */
#create-project-dialog .create-project-mode-button.selected{
  opacity:1;
  border-color:var(--accent);
  background:rgba(22,143,245,.22);
  color:#fff;
  box-shadow:0 0 0 1px var(--accent)
}
@media(min-width:641px){
  #create-project-dialog .project-billing-choice{
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
}
@media(max-width:640px){
  html,body,*{
    scrollbar-width:none;
    -ms-overflow-style:none
  }
  *::-webkit-scrollbar{
    display:none;
    width:0;
    height:0
  }
}

/* Anthropic organization-scoped keys require a workspace selection. */
#llm-workspace-field.llm-workspace-required #llm-workspace-id,
#llm-workspace-id[aria-invalid="true"]{
  border-color:var(--danger,#ff7b7b);
  box-shadow:0 0 0 1px var(--danger,#ff7b7b);
}
.deploy-badge.pushed{color:#63d98a;border-color:#2d7044}
.deployment-run-source-only:disabled{opacity:1;cursor:default}

.source-root-tools{display:inline-flex;align-items:center;gap:6px}
.source-root-tools #add-root{font-size:20px;font-weight:600;min-width:32px}

/* Inline root file/folder upload */
.source-root-tools #add-root.selected,
.add-root-options button.selected{background:#2563eb;color:#fff;border-color:#3b82f6}
.add-root-panel{padding:10px 12px;border-bottom:1px solid var(--border,#2b3445)}
.add-root-options{display:flex;gap:8px}
.add-root-options button{flex:1;min-width:0}
.add-root-form{display:flex;gap:8px;margin-top:10px}
.add-root-form input{min-width:0;flex:1}
.add-root-form button{flex-shrink:0}
