:root {
  --bg: #f4efe4;
  --panel: #fffdf8;
  --ink: #1d2a34;
  --muted: #60707d;
  --line: #d9cfbb;
  --brand: #0f6a73;
  --brand-strong: #0a4e54;
  --warm: #cf8d2b;
  --danger: #ad3b2a;
  --ok: #1f7a3a;
  --shadow: 0 10px 30px rgba(18, 35, 44, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(207, 141, 43, 0.18), transparent 25rem),
    linear-gradient(180deg, #f8f2e7, var(--bg));
  color: var(--ink);
}

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

a:hover {
  text-decoration: underline;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, #5f4960, #6e5367);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  color: #f7f2f8;
}

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

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar .muted,
.topbar .nav a {
  color: rgba(255, 247, 251, 0.88);
}

.page {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.5rem;
}

.panel,
.hero {
  background: var(--panel);
  border: 1px solid rgba(29, 42, 52, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.25rem;
}

.subpanel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(29, 42, 52, 0.08);
}

.danger-zone {
  border-top-color: rgba(173, 59, 42, 0.3);
}

.status-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 14px;
}

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

.status-ok {
  background: rgba(31, 122, 58, 0.1);
  border: 1px solid rgba(31, 122, 58, 0.15);
}

.status-error {
  background: rgba(173, 59, 42, 0.1);
  border: 1px solid rgba(173, 59, 42, 0.15);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.hero-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-meta div {
  min-width: 9rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(15, 106, 115, 0.08);
}

.hero-meta strong,
.hero-meta span {
  display: block;
}

.hero-actions {
  display: flex;
  align-items: center;
}

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

.grid.two {
  grid-template-columns: 1.5fr 1fr;
}

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

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

.flash {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.flash-ok {
  background: rgba(31, 122, 58, 0.12);
  border: 1px solid rgba(31, 122, 58, 0.15);
}

.flash-error {
  background: rgba(173, 59, 42, 0.1);
  border: 1px solid rgba(173, 59, 42, 0.15);
}

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

.project-block + .project-block {
  margin-top: 1.25rem;
}

.project-link {
  font-size: 1.1rem;
  font-weight: 700;
}

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

th,
td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid rgba(29, 42, 52, 0.08);
  vertical-align: top;
  font-size: 0.92rem;
}

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

.log-box {
  background: #172028;
  color: #dff8ff;
  border-radius: 16px;
  padding: 1rem;
  max-height: 32rem;
  overflow: auto;
}

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

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

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

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

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

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  background: rgba(15, 106, 115, 0.1);
  color: var(--brand-strong);
}

button.danger,
.button.danger {
  background: linear-gradient(135deg, var(--danger), #7e2419);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button-row form {
  margin: 0;
}

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

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

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

.check.compact {
  font-size: 0.9rem;
}

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

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

.keyval {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(29, 42, 52, 0.08);
  border-radius: 14px;
  background: rgba(15, 106, 115, 0.04);
}

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

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

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(96, 112, 125, 0.12);
  color: var(--muted);
}

.pill-ok {
  background: rgba(31, 122, 58, 0.12);
  color: var(--ok);
}

.pill-error {
  background: rgba(173, 59, 42, 0.12);
  color: var(--danger);
}

.install-form {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(29, 42, 52, 0.08);
}

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

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

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

.workspace-body .page {
  max-width: none;
  padding: 0;
}

.workspace-shell {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  background: #2c313a;
}

.workspace-sidebar {
  background: linear-gradient(180deg, #2a3038, #232831);
  color: #edf1f7;
  padding: 1.35rem 1rem 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.workspace-sidebar .muted,
.workspace-empty {
  color: rgba(237, 241, 247, 0.62);
}

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

.workspace-sidebar-head h1 {
  margin: 0.2rem 0;
  font-size: 1.8rem;
}

.workspace-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8bd6e3;
  font-weight: 700;
}

.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.5rem;
}

.workspace-sidebar-group-head h2 {
  margin: 0;
  font-size: 1rem;
  color: #ffffff;
}

.workspace-sidebar-group-head a {
  color: #8bd6e3;
  font-size: 1.2rem;
  font-weight: 700;
}

.workspace-branch-link {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.45rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.03);
  color: #f6fbff;
  text-decoration: none;
}

.workspace-branch-link:hover,
.workspace-branch-link.is-active {
  text-decoration: none;
  background: rgba(139, 214, 227, 0.12);
  border-color: rgba(139, 214, 227, 0.25);
}

.workspace-branch-link-ok {
  box-shadow: inset 3px 0 0 rgba(31, 122, 58, 0.95);
}

.workspace-branch-link-warn {
  box-shadow: inset 3px 0 0 rgba(207, 141, 43, 0.95);
}

.workspace-branch-link-error {
  box-shadow: inset 3px 0 0 rgba(173, 59, 42, 0.95);
}

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

.workspace-branch-meta {
  font-size: 0.86rem;
  color: rgba(237, 241, 247, 0.72);
}

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

.workspace-main {
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(139, 214, 227, 0.12), transparent 26rem),
    linear-gradient(180deg, #f7f8fb, #edf0f5);
}

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

.workspace-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.workspace-hero h2 {
  margin: 0.15rem 0;
  font-size: 2rem;
}

.workspace-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

.workspace-command {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 42, 52, 0.08);
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.workspace-command code,
.inline-code-block {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #1b222a;
  color: #ddf4ff;
  overflow: auto;
  word-break: break-all;
}

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

.workspace-tab {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: rgba(29, 42, 52, 0.06);
  color: var(--ink);
  font-weight: 700;
}

.workspace-tab.is-active,
.workspace-tab:hover {
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
}

.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 {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 42, 52, 0.08);
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.branch-card:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.branch-card-ok {
  box-shadow:
    inset 0 0 0 1px rgba(31, 122, 58, 0.12),
    0 10px 30px rgba(18, 35, 44, 0.08);
}

.branch-card-warn {
  box-shadow:
    inset 0 0 0 1px rgba(207, 141, 43, 0.16),
    0 10px 30px rgba(18, 35, 44, 0.08);
}

.branch-card-error {
  box-shadow:
    inset 0 0 0 1px rgba(173, 59, 42, 0.16),
    0 10px 30px rgba(18, 35, 44, 0.08);
}

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

.release-card,
.activity-item,
.log-index-item {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(29, 42, 52, 0.08);
  background: #ffffff;
}

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

.release-card-ok {
  border-left: 4px solid rgba(31, 122, 58, 0.95);
}

.release-card-warn {
  border-left: 4px solid rgba(207, 141, 43, 0.95);
}

.release-card-error {
  border-left: 4px solid rgba(173, 59, 42, 0.95);
}

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

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

.log-index-item {
  text-decoration: none;
  color: var(--ink);
}

.log-index-item:hover,
.log-index-item.is-active {
  text-decoration: none;
  background: rgba(15, 106, 115, 0.06);
  border-color: rgba(15, 106, 115, 0.18);
}

@media (max-width: 960px) {
  .grid.two,
  .hero,
  .topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-meta {
    flex-direction: column;
  }

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

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

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

  .workspace-main {
    padding: 1rem;
  }

  .workspace-actions {
    width: 100%;
  }

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