:root {
  --bg: #09111a;
  --bg-elevated: #0f1926;
  --bg-soft: #121f2f;
  --panel: rgba(16, 25, 38, 0.7);
  --panel-strong: rgba(13, 21, 33, 0.88);
  --panel-light: rgba(255, 255, 255, 0.06);
  --panel-border: rgba(171, 196, 255, 0.14);
  --ink: #edf4ff;
  --muted: #92a5bf;
  --muted-strong: #b7c5d8;
  --brand: #4fe0ce;
  --brand-strong: #1fb8a8;
  --brand-deep: #0f7c74;
  --warn: #ffc96a;
  --danger: #ff7b86;
  --danger-strong: #d94b5b;
  --ok: #73e7a3;
  --line: rgba(171, 196, 255, 0.12);
  --shadow: 0 18px 50px rgba(3, 10, 20, 0.35);
  --shadow-soft: 0 10px 26px rgba(4, 8, 16, 0.22);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(79, 224, 206, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 14%, rgba(116, 140, 255, 0.16), transparent 24rem),
    radial-gradient(circle at 50% 100%, rgba(34, 78, 118, 0.22), transparent 36rem),
    linear-gradient(180deg, #0a121d 0%, #0d1622 45%, #08111b 100%);
  position: relative;
  overflow-x: hidden;
}

.app-backdrop {
  position: fixed;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.4;
  z-index: 0;
}

.app-backdrop-a {
  width: 24rem;
  height: 24rem;
  top: 4.5rem;
  left: -7rem;
  background: rgba(79, 224, 206, 0.28);
}

.app-backdrop-b {
  width: 20rem;
  height: 20rem;
  top: 12rem;
  right: -5rem;
  background: rgba(117, 142, 255, 0.22);
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

pre,
code,
table {
  font-family: "IBM Plex Mono", "SFMono-Regular", "Menlo", monospace;
}

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

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 15, 26, 0.72);
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input::placeholder,
textarea::placeholder {
  color: rgba(146, 165, 191, 0.8);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(79, 224, 206, 0.65);
  box-shadow: 0 0 0 4px rgba(79, 224, 206, 0.12);
  background: rgba(10, 20, 31, 0.92);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.78rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #041018;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 20px rgba(31, 184, 168, 0.18);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), opacity var(--transition);
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(31, 184, 168, 0.22);
}

button:disabled,
.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button.secondary,
button.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-color: rgba(171, 196, 255, 0.12);
  box-shadow: none;
}

.button.secondary:hover,
button.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(79, 224, 206, 0.25);
}

button.danger,
.button.danger {
  background: linear-gradient(135deg, var(--danger), var(--danger-strong));
  color: #fff4f6;
  box-shadow: 0 10px 22px rgba(255, 123, 134, 0.2);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(171, 196, 255, 0.08);
  background: rgba(7, 13, 22, 0.72);
  backdrop-filter: blur(18px);
}

.topbar-brand {
  display: grid;
  gap: 0.18rem;
}

.brand {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.topbar-tagline {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.nav a {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border: 1px solid transparent;
}

.nav a:hover,
.nav a.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(171, 196, 255, 0.1);
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
}

.topbar-user-role {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  background: rgba(79, 224, 206, 0.16);
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar-user-name,
.topbar-user-logout {
  color: var(--muted-strong);
}

.topbar-user-logout {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.page {
  position: relative;
  z-index: 1;
  width: min(1500px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 2rem;
}

.panel,
.hero,
.workspace-command,
.branch-card,
.release-card,
.activity-item,
.log-index-item,
.project-tile {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.panel,
.hero {
  border-radius: var(--radius-xl);
}

.panel {
  padding: 1.25rem;
}

.subpanel {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.danger-zone {
  border-color: rgba(255, 123, 134, 0.18);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -3rem -6rem auto;
  width: 16rem;
  height: 16rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(79, 224, 206, 0.18), transparent 72%);
  pointer-events: none;
}

.hero h1,
.hero h2 {
  margin: 0.18rem 0;
  line-height: 1.05;
}

.hero-dashboard h1 {
  max-width: 14ch;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(9rem, 1fr));
  gap: 0.8rem;
}

.hero-meta div {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(171, 196, 255, 0.1);
}

.hero-meta strong {
  font-size: 1.28rem;
}

.hero-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.flash {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.flash-ok {
  background: rgba(115, 231, 163, 0.12);
  border-color: rgba(115, 231, 163, 0.22);
}

.flash-error {
  background: rgba(255, 123, 134, 0.1);
  border-color: rgba(255, 123, 134, 0.22);
}

.grid {
  display: grid;
  gap: 1.15rem;
}

.grid.two {
  grid-template-columns: minmax(0, 1.5fr) minmax(22rem, 1fr);
}

.stack {
  display: grid;
  gap: 1.15rem;
}

.panel-head,
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
}

.panel-head h2,
.panel h2,
.panel h3 {
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid label {
  display: grid;
  gap: 0.42rem;
}

.form-grid label span,
.search-input span,
.sidebar-filter span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.check input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.button-row,
.instance-actions,
.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.button-row form,
.instance-actions form,
.workspace-actions form {
  margin: 0;
}

.instance-actions.compact .button,
.instance-actions.compact button {
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.84rem;
}

.action-stack {
  display: grid;
  gap: 0.6rem;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.inline-form input,
.inline-form select {
  width: auto;
  min-width: 10rem;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.85rem;
}

.keyval {
  display: grid;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(171, 196, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.keyval strong {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.keyval span {
  word-break: break-word;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill-ok {
  background: rgba(115, 231, 163, 0.12);
  color: var(--ok);
}

.pill-error {
  background: rgba(255, 123, 134, 0.12);
  color: var(--danger);
}

.status-card {
  display: grid;
  gap: 0.32rem;
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.status-card code {
  word-break: break-all;
}

.status-ok {
  border-color: rgba(115, 231, 163, 0.18);
  background: rgba(115, 231, 163, 0.1);
}

.status-error {
  border-color: rgba(255, 123, 134, 0.2);
  background: rgba(255, 123, 134, 0.1);
}

.meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
}

.meta-list dt {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th,
td {
  padding: 0.72rem 0.58rem;
  border-bottom: 1px solid rgba(171, 196, 255, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.log-box,
.inline-code-block,
.workspace-command code {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(5, 11, 19, 0.84);
  border: 1px solid rgba(171, 196, 255, 0.08);
  color: #dbeeff;
  overflow: auto;
  word-break: break-word;
}

.log-box pre,
pre.log-box {
  margin: 0 0 0.8rem;
  white-space: pre-wrap;
}

.narrow {
  max-width: 36rem;
  margin: 6rem auto 0;
}

.login-body .page {
  padding-top: 4rem;
}

.login-body .panel.narrow {
  padding: 1.8rem;
}

.dashboard-shell {
  display: grid;
  gap: 1.2rem;
}

.search-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 30rem);
  gap: 1rem;
  align-items: end;
}

.search-input {
  display: grid;
  gap: 0.4rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
}

.project-tile {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 24px;
  min-height: 19rem;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.project-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 224, 206, 0.22);
}

.project-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.8rem;
}

.project-tile-header h2 {
  margin: 0.1rem 0 0;
  font-size: 1.45rem;
}

.project-link {
  color: #ffffff;
}

.project-stage-list {
  display: grid;
  gap: 0.65rem;
}

.project-stage-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(171, 196, 255, 0.08);
  transition: background var(--transition), border-color var(--transition);
}

.project-stage-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(79, 224, 206, 0.18);
}

.project-stage-row-production {
  box-shadow: inset 3px 0 0 rgba(115, 231, 163, 0.92);
}

.project-stage-row-staging {
  box-shadow: inset 3px 0 0 rgba(255, 201, 106, 0.92);
}

.project-stage-row-development,
.project-stage-row-review {
  box-shadow: inset 3px 0 0 rgba(79, 224, 206, 0.92);
}

.project-stage-main,
.project-stage-meta {
  display: grid;
  gap: 0.2rem;
}

.project-stage-main span,
.project-stage-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.project-stage-meta {
  justify-items: end;
}

.project-tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  margin-top: auto;
}

.project-tile-create {
  place-items: center;
  text-align: center;
  border-style: dashed;
  border-color: rgba(79, 224, 206, 0.28);
  background:
    linear-gradient(180deg, rgba(79, 224, 206, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.project-tile-create-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(79, 224, 206, 0.12);
  color: var(--brand);
  font-size: 2.4rem;
  line-height: 1;
}

.dashboard-columns {
  align-items: start;
}

.workspace-body .page {
  width: min(1700px, 100vw);
  max-width: none;
  padding: 0;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 18.5rem minmax(0, 1fr);
  min-height: calc(100vh - 81px);
  background: rgba(6, 12, 20, 0.22);
}

.workspace-sidebar {
  position: sticky;
  top: 81px;
  align-self: start;
  min-height: calc(100vh - 81px);
  padding: 1.25rem 1rem 1.4rem;
  background: rgba(8, 14, 23, 0.88);
  border-right: 1px solid rgba(171, 196, 255, 0.08);
  backdrop-filter: blur(22px);
}

.workspace-sidebar .muted,
.workspace-empty {
  color: rgba(183, 197, 216, 0.68);
}

.workspace-sidebar-head {
  margin-bottom: 1rem;
}

.workspace-sidebar-head h1 {
  margin: 0.18rem 0;
  font-size: 1.75rem;
}

.workspace-eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar-filter {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.workspace-sidebar-group + .workspace-sidebar-group {
  margin-top: 1rem;
}

.workspace-sidebar-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.workspace-sidebar-group-head h2 {
  margin: 0;
  font-size: 0.98rem;
}

.workspace-sidebar-group-head a {
  color: var(--brand);
  font-size: 1.2rem;
  font-weight: 700;
}

.workspace-branch-link {
  display: grid;
  gap: 0.18rem;
  padding: 0.78rem 0.85rem;
  margin-bottom: 0.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(171, 196, 255, 0.06);
  color: #f6fbff;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.workspace-branch-link:hover,
.workspace-branch-link.is-active {
  background: rgba(79, 224, 206, 0.12);
  border-color: rgba(79, 224, 206, 0.18);
  transform: translateX(2px);
}

.workspace-branch-link-ok {
  box-shadow: inset 3px 0 0 rgba(115, 231, 163, 0.92);
}

.workspace-branch-link-warn {
  box-shadow: inset 3px 0 0 rgba(255, 201, 106, 0.95);
}

.workspace-branch-link-error {
  box-shadow: inset 3px 0 0 rgba(255, 123, 134, 0.92);
}

.workspace-branch-name {
  font-weight: 700;
}

.workspace-branch-meta {
  font-size: 0.84rem;
  color: rgba(183, 197, 216, 0.76);
}

.workspace-sidebar-actions {
  margin-top: 1.4rem;
}

.workspace-main {
  padding: 1.4rem;
}

.workspace-hero,
.workspace-toolbar,
.workspace-tabs,
.branch-board,
.workspace-grid {
  margin-bottom: 1.2rem;
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.workspace-hero h2 {
  margin: 0.14rem 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
}

.workspace-toolbar {
  display: grid;
  gap: 1rem;
}

.workspace-command {
  display: grid;
  gap: 0.42rem;
  padding: 1rem 1.05rem;
  border-radius: 22px;
}

.workspace-command span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.workspace-tab {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(171, 196, 255, 0.08);
  color: var(--muted-strong);
  font-weight: 700;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.workspace-tab.is-active,
.workspace-tab:hover {
  color: #061018;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: transparent;
}

.workspace-grid {
  align-items: start;
}

.branch-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
}

.branch-column {
  display: grid;
  gap: 0.85rem;
}

.branch-card,
.release-card,
.activity-item,
.log-index-item {
  padding: 1rem;
  border-radius: 22px;
}

.branch-card {
  display: grid;
  gap: 0.6rem;
  transition: transform var(--transition), border-color var(--transition);
}

.branch-card:hover {
  transform: translateY(-2px);
}

.branch-card-ok {
  border-color: rgba(115, 231, 163, 0.18);
}

.branch-card-warn {
  border-color: rgba(255, 201, 106, 0.2);
}

.branch-card-error {
  border-color: rgba(255, 123, 134, 0.2);
}

.branch-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
}

.branch-card-link {
  color: #ffffff;
}

.activity-list,
.log-index {
  display: grid;
  gap: 0.8rem;
}

.activity-item,
.log-index-item {
  color: var(--ink);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.activity-item:hover,
.log-index-item:hover,
.log-index-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(79, 224, 206, 0.16);
  transform: translateY(-1px);
}

.release-card + .release-card,
.activity-item + .activity-item {
  margin-top: 0.85rem;
}

.release-card-ok {
  box-shadow: inset 3px 0 0 rgba(115, 231, 163, 0.92), var(--shadow-soft);
}

.release-card-warn {
  box-shadow: inset 3px 0 0 rgba(255, 201, 106, 0.92), var(--shadow-soft);
}

.release-card-error {
  box-shadow: inset 3px 0 0 rgba(255, 123, 134, 0.92), var(--shadow-soft);
}

.release-log-path + .release-log-path {
  margin-top: 0.45rem;
}

@media (max-width: 1200px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .nav {
    justify-content: flex-start;
  }

  .topbar-user {
    justify-self: start;
  }

  .hero,
  .workspace-hero,
  .search-strip,
  .grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .page {
    width: min(100vw, calc(100vw - 1rem));
    padding-top: 1rem;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
    min-height: auto;
  }

  .workspace-main {
    padding: 1rem;
  }

  .workspace-actions,
  .workspace-actions .button,
  .workspace-actions form,
  .workspace-actions form button,
  .instance-actions,
  .instance-actions .button,
  .instance-actions form,
  .instance-actions form button {
    width: 100%;
  }

  .project-tile-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .project-stage-row {
    flex-direction: column;
  }

  .project-stage-meta {
    justify-items: start;
  }

  .inline-form {
    align-items: stretch;
  }

  .inline-form input,
  .inline-form select,
  .inline-form button {
    width: 100%;
  }
}

/* Guided workflows use the existing visual system with compact navigation. */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #59d8c7; outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 100; }
.skip-link:focus { top: 1rem; background: #101824; padding: 1rem; }
.nav-tools { position: relative; }
.nav-tools > summary { cursor: pointer; padding: .6rem .9rem; color: #ccd5e2; }
.nav-tools-menu { position: absolute; z-index: 20; min-width: 12rem; background: #101824; border: 1px solid #526173; border-radius: .6rem; padding: .5rem; }
.nav-tools-menu a { display: block; }
.advanced-settings { grid-column: 1 / -1; border: 1px solid #526173; border-radius: .6rem; padding: 1rem; }
.advanced-settings > summary { cursor: pointer; font-weight: 600; color: #e7eef7; }
.advanced-settings[open] > summary { margin-bottom: 1rem; }
.workflow-note { grid-column: 1 / -1; border-left: 3px solid #59d8c7; padding: .8rem 1rem; background: rgba(89,216,199,.06); }
.form-grid > p { grid-column: 1 / -1; }
label small { font-size: .85rem; color: #adb9cb; line-height: 1.5; }
.hero-dashboard h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); max-width: none; }
@media (max-width: 760px) {
  .topbar { gap: .7rem; padding: 1rem; }
  .nav { gap: .2rem; }
  .nav a { padding: .5rem; }
  .hero-dashboard { padding: 1.2rem; }
  .nav-tools-menu { right: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-actions { flex-wrap: wrap; }
}

.instance-controls { margin-top: .5rem; }
.instance-controls summary { cursor: pointer; color: #c6d3e4; padding: .5rem; }
.instance-controls form { display: inline-block; margin: .5rem .25rem; }
@media (max-width: 760px) {
  .topbar, .workspace-sidebar { position: static; }
}

.setup-panel { max-width: 960px; margin-inline: auto; }
.guided-environment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.guided-environment-form [data-source-option], .guided-environment-form .check { grid-column: 1 / -1; }
.guided-environment-form label.check { display: flex; align-items: center; gap: .7rem; }
.guided-environment-form label.check input { width: 1.2rem; height: 1.2rem; flex-shrink: 0; margin: 0; }
@media (max-width: 760px) { .guided-environment-form { grid-template-columns: minmax(0, 1fr); } }

/* Field help remains usable with touch, keyboard, and narrow screens. */
.help-field-container { position: relative; min-width: 0; }
.help-field-container > label { width: 100%; }
.help-field-container > label > span { padding-right: 2rem; }
.field-help { position: absolute; top: 0; right: 0; z-index: 2; }
.field-help-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-height: 28px; padding: 0; border-radius: 50%; background: var(--panel, #fff); color: #245a73; border: 1px solid #8faebc; font-weight: 700; cursor: pointer; }
.field-help-text { display: block; position: absolute; top: 32px; right: 0; width: min(300px, 75vw); padding: 12px; border: 1px solid #8faebc; border-radius: 10px; background: #fff; color: #233b49; box-shadow: 0 8px 24px #16384a26; font-size: 14px; line-height: 1.5; font-weight: 400; }
.faq-list details { border-bottom: 1px solid #d8e3e8; padding: 16px 0; }
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list p { max-width: 75ch; line-height: 1.6; }

/* Keep long release artifacts inside their own workspace column. */
.workspace-main,
.workspace-grid > *,
.workspace-grid .panel,
.workspace-grid .stack,
.release-card { min-width: 0; }
.release-log-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.release-log-path { min-width: 0; }
.release-log-path code { display: block; white-space: normal; overflow-wrap: anywhere; }
.release-card p, .release-card .panel-head { overflow-wrap: anywhere; }
.release-card .panel-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.workspace-grid .activity-item { overflow-wrap: anywhere; }

.log-viewer { min-width: 0; }
.log-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 1rem; align-items: end; }
.log-controls label { display: grid; gap: .4rem; }
.log-controls .check { display: flex; align-items: center; padding-bottom: .6rem; }
.log-controls .check input { width: auto; }
.log-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.log-viewport { height: 55vh; min-height: 240px; max-height: 700px; overflow: auto; border: 1px solid #314056; border-radius: 12px; background: #070e18; }
.log-viewport pre { margin: 0; padding: .8rem 0; font-size: 13px; line-height: 1.65; }
.log-line { display: flex; min-width: 0; padding: 0 .8rem; }
.log-line-number { flex: 0 0 4rem; color: #8295b1; text-align: right; padding-right: 1rem; user-select: none; }
.log-line-text { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.no-wrap .log-line-text { white-space: pre; overflow-wrap: normal; }
.no-wrap .log-line { width: max-content; min-width: 100%; }
.log-level-error { color: #ffb4b4; background: #702b2b30; }
.log-level-warning { color: #ffd48c; }
.log-viewer.is-expanded { position: fixed; inset: 1rem; z-index: 100; background: #101827; border: 1px solid #43516b; border-radius: 16px; padding: 1.2rem; overflow: auto; box-shadow: 0 0 0 100vmax #000b; }
.log-viewer.is-expanded .log-viewport { height: calc(100vh - 290px); max-height: none; }
@media (max-width: 760px) { .log-controls { grid-template-columns: minmax(0, 1fr); } .log-viewer.is-expanded { inset: .4rem; padding: .7rem; } .log-viewer.is-expanded .log-viewport { height: 40vh; } }

.log-browser-grid.grid.two { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); }
@media (max-width: 1200px) { .log-browser-grid.grid.two { grid-template-columns: minmax(0, 1fr); } }

.job-notifications { position: fixed; right: 20px; bottom: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; max-height: 65vh; overflow: auto; width: min(420px, calc(100vw - 40px)); }
.job-notice { display: flex; gap: 12px; padding: 16px; border: 1px solid #40566b; border-radius: 12px; background: #14202e; color: #eef3fa; box-shadow: 0 8px 28px #0006; }
.job-notice > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.job-notice a { display: block; margin-top: 8px; }
.job-notice > button { padding: 0 6px; align-self: flex-start; }
.job-notice.succeeded { border-color: #46bb88; }
.job-notice.failed { border-color: #f48282; }
.job-spinner { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; border: 2px solid #8297aa; border-top-color: #36d7cb; border-radius: 50%; animation: job-spin 0.8s linear infinite; vertical-align: middle; }
@keyframes job-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .job-spinner { animation-duration: 2s; } }
