:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  background: #eef0f2;
  color: #15181c;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main {
  max-width: 1400px;
  margin: 20px auto;
  padding: 20px;
}
header {
  background: #fff;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
header > div {
  margin-left: auto;
  overflow-wrap: anywhere;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #0f5c42;
  font-size: 28px;
  font-weight: 750;
}
.brand span {
  color: #15181c;
  font-size: 16px;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.025em;
  margin: 0;
}
h2 {
  font-size: 19px;
  margin: 0 0 18px;
}
p {
  margin: 12px 0;
}
a {
  color: inherit;
}
button,
.button,
summary {
  cursor: pointer;
  font: inherit;
  border: 1px solid #d9dee4;
  border-radius: 999px;
  background: white;
  padding: 11px 18px;
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
}
button:hover,
.button:hover {
  background: #f2f4f5;
}
.primary,
summary {
  background: #15181c;
  color: white;
  border-color: #15181c;
}
.primary:hover {
  background: #0f5c42;
}
.card {
  background: white;
  border-radius: 22px;
  padding: 26px;
  min-width: 0;
}
.notice {
  background: #e6f4ee;
  color: #0f5c42;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 13px;
}
.error {
  background: #fff0f0;
  color: #991b1b;
  border-left: 3px solid #991b1b;
  padding: 18px;
  border-radius: 14px;
}
.title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 32px 0 24px;
}
.title p,
.hint,
small {
  color: #596372;
  font-size: 13px;
}
.badge {
  display: inline-block;
  border-radius: 999px;
  background: #f2f4f5;
  padding: 6px 10px;
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.metrics strong {
  display: block;
  font-size: 32px;
  margin-top: 8px;
}
.metrics .locked {
  font-size: 26px;
  color: #0f5c42;
}
.metrics small {
  font-weight: 400;
  font-size: 12px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
  margin: 24px 0 40px;
}
.workspace h2 {
  margin-top: 16px;
}
.initial {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #e6f4ee;
  color: #0f5c42;
  font-weight: 700;
}
.hostname {
  font-size: 14px;
  color: #0f5c42;
  overflow-wrap: anywhere;
}
.workspace p {
  overflow-wrap: anywhere;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  min-width: 0;
}
input,
select {
  font: inherit;
  font-size: 16px;
  width: 100%;
  min-width: 0;
  border: 1px solid #d9dee4;
  background: #f7f8f9;
  border-radius: 12px;
  padding: 12px;
  min-height: 44px;
}
select {
  padding-right: 28px;
}
.composer {
  margin: 24px 0;
}
.composer > .card {
  margin-top: 16px;
}
summary {
  list-style: none;
  width: fit-content;
}
summary::-webkit-details-marker {
  display: none;
}
.workspace details {
  margin-top: 12px;
  min-width: 0;
}
.workspace details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1px solid #e5e8eb;
  border-radius: 0;
  padding: 12px 0;
}
.workspace details > summary::after {
  content: '+';
}
.workspace details[open] > summary::after {
  content: '−';
}
.workspace details .card {
  padding: 16px 0;
  border: 0;
  box-shadow: none;
}
section + section {
  margin-top: 32px;
}
.operator-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #eef0f2;
}
.operator-row b {
  overflow-wrap: anywhere;
}
.operator-row label {
  margin: 0;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
th,
td {
  padding: 14px;
  border-bottom: 1px solid #eef0f2;
  white-space: nowrap;
}
th {
  background: #f7f8f9;
  font-weight: 500;
  color: #596372;
}
.steps {
  padding-left: 24px;
}
.steps li {
  padding: 14px 0;
  overflow-wrap: anywhere;
}
.steps .badge {
  margin-left: 16px;
}
.login {
  max-width: 480px;
  margin: 64px auto;
}
.login form {
  margin-top: 24px;
}
.empty {
  text-align: center;
  padding: 48px;
  color: #596372;
}
footer {
  font-size: 12px;
  color: #596372;
  text-align: center;
  margin: 60px 0 20px;
}
.skip {
  position: absolute;
  top: -80px;
}
.skip:focus {
  top: 0;
  background: white;
  padding: 12px;
  z-index: 2;
}
:focus-visible {
  outline: 3px solid #0f8a5f;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  header,
  main {
    margin: 12px;
    padding: 16px;
  }
  .metrics,
  .fields,
  .operator-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .title {
    align-items: start;
    flex-direction: column;
  }
  .card {
    padding: 20px;
  }
  .operator-row {
    gap: 12px;
  }
  .operator-row button {
    width: 100%;
  }
  .steps .badge {
    margin-left: 0;
    display: block;
    width: fit-content;
  }
  .brand {
    font-size: 22px;
  }
  .brand span {
    font-size: 14px;
  }
  .login {
    margin: 24px auto;
  }
  .metrics {
    gap: 12px;
  }
  .metrics section + section {
    margin-top: 0;
  }
}
:root .metrics > section {
  margin-top: 0;
}
.local-state {
  border-top: 1px solid #e5e7eb;
  margin-top: 20px;
  padding-top: 12px;
}

/* Managed portal overview: status and release information stay visible above settings. */
.managed header { border: 1px solid #e5e8eb; border-radius: 18px; }
.managed header > span { margin-left: auto; overflow-wrap: anywhere; font-size: 13px; color: #596372; }
.managed .brand { font-size: 22px; }
.managed .portal-title { display: flex; align-items: center; gap: 12px; }
.managed .workspace-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); align-items: start; }
.managed .portal-card { border: 1px solid #dde3e7; border-radius: 18px; padding: 24px; }
.managed .portal-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.managed .portal-heading > div { flex: 1; min-width: 150px; }
.managed .portal-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.managed .portal-host { margin: 3px 0 0; color: #596372; font-size: 13px; }
.managed .portal-initial { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #e8f2ed; color: #145c43; font-weight: 700; font-size: 19px; }
.managed .portal-status { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 5px 9px; font-size: 12px; background: #f1f3f5; color: #505b68; }
.managed .portal-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.managed .portal-status.online { background: #e9f5ee; color: #176241; }
.managed .portal-status.offline { background: #fff0ee; color: #9d2b20; }
.managed .portal-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; border-block: 1px solid #e5e8eb; margin: 22px 0 14px; padding: 16px 0; }
.managed .portal-facts dt { color: #596372; font-size: 12px; }
.managed .portal-facts dd { margin: 5px 0 0; font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.managed .portal-facts time { font-size: 12px; font-weight: 400; }
.managed .portal-owner { font-size: 12px; color: #596372; }
.managed .portal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; }
.managed .portal-actions .button { padding: 9px 14px; }
.managed .portal-status-help > summary { color: #596372; font-size: 12px; }
@media (max-width: 520px) {
  .managed header, .managed main { margin: 10px; padding: 16px; }
  .managed .portal-card { padding: 18px; }
  .managed .portal-facts { grid-template-columns: 1fr; gap: 10px; }
  .managed .portal-facts > div { display: flex; justify-content: space-between; gap: 16px; }
  .managed .portal-facts dd { text-align: right; margin: 0; }
  .managed .title { gap: 12px; flex-wrap: wrap; }
  .managed .portal-title h1 { font-size: 26px; }
}
