:root {
  font-family: 'Segoe UI', Inter, Arial, sans-serif;
  font-size: 16px;
  color: #182b34;
  background: #f4f6f5;
  --ink: #142b35;
  --line: #d9e1de;
  --muted: #536962;
  --accent: #bb4925;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.63rem 0.95rem;
  background: #bb4925;
  color: #fff;
  font-weight: 650;
  font-size: 0.91rem;
}
button:hover {
  filter: brightness(0.92);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #1381b3;
  outline-offset: 2px;
}
#shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem 1.2rem;
  min-width: 0;
}
.brand {
  font-size: 2rem;
  font-weight: 750;
  letter-spacing: -0.08rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.mark {
  display: inline-block;
  width: 31px;
  height: 36px;
  background: linear-gradient(140deg, #ffab74 0 49%, #f47d48 50%);
  clip-path: polygon(50% 0, 98% 17%, 92% 60%, 76% 83%, 50% 100%, 23% 83%, 8% 60%, 2% 17%);
  position: relative;
}
.mark:after {
  content: '';
  position: absolute;
  inset: 8px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 16%, 85% 66%, 50% 100%, 12% 68%, 0 16%);
}
.brand,
.wordmark {
  margin-left: 0.65rem;
}
.wordmark,
.eyebrow,
.group-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.wordmark {
  color: #a9bab9;
  margin-top: 0.5rem;
}
.group-label {
  color: #a0b6b7;
  margin: 2rem 0.75rem 0.55rem;
}
nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: none;
  color: #d1dede;
  text-align: left;
  border-radius: 0.45rem;
  padding: 0.65rem 0.85rem;
  font-weight: 500;
  margin: 0.1rem 0;
}
nav button.active {
  background: #2d4951;
  color: white;
  box-shadow: inset 3px 0 #ff9461;
}
nav button:hover,
footer button:hover {
  background: #26414a;
}
.icon {
  width: 1.3rem;
  text-align: center;
  font-family: 'Segoe UI Symbol', sans-serif;
  color: inherit;
  font-size: 1.16rem;
}
footer {
  margin-top: auto;
  padding: 0.9rem 0.15rem 0;
  border-top: 1px solid #355059;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
}
.avatar {
  border-radius: 50%;
  background: #3f5960;
  padding: 0.5rem 0.75rem;
  color: #fff;
}
footer small {
  display: block;
  font-size: 0.76rem;
  color: #b6c5c5;
}
footer button {
  margin-left: auto;
  background: transparent;
}
main {
  min-width: 0;
}
header {
  height: 4.15rem;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(1.15rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafcfb;
}
.crumb,
.local {
  color: var(--muted);
  font-size: 0.88rem;
}
.crumb span {
  margin: 0 0.6rem;
  color: #80938d;
}
.crumb b {
  color: #263d37;
}
.local {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.local i {
  width: 8px;
  height: 8px;
  background: #368168;
  border-radius: 50%;
}
.page {
  max-width: 1450px;
  margin: auto;
  padding: 2.1rem clamp(1.15rem, 4vw, 4rem) 3rem;
}
.heading,
.panelhead,
.row,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.heading {
  margin-bottom: 1.5rem;
}
.eyebrow {
  color: #6b5547;
  margin: 0 0 0.35rem;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.05rem);
  letter-spacing: -0.055em;
  line-height: 1.1;
}
h2 {
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.02rem;
}
.hero {
  border-radius: 0.9rem;
  background-color: #19383c;
  background-image: radial-gradient(#38605d 1px, transparent 1px);
  background-size: 16px 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.85rem 2rem;
  min-height: 142px;
  gap: 1.5rem;
}
.hero h2 {
  font-size: 1.65rem;
}
.hero p {
  margin-top: 0.55rem;
  color: #d6e4de;
  font-size: 0.93rem;
  max-width: 34em;
}
.path {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.node {
  display: grid;
  place-items: center;
  border: 1px solid #809b92;
  border-radius: 0.8rem;
  width: 48px;
  height: 48px;
  background: #244549;
  font-size: 1.4rem;
}
.node.middle {
  border-color: #ee976b;
  color: #ffa87a;
}
.path i {
  width: 24px;
  border-top: 2px dotted #93afa3;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.1rem 0 1.4rem;
}
.stat,
.panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 0.8rem;
}
.stat {
  text-align: left;
  color: #203932;
  padding: 1.15rem 1.3rem;
  font-weight: 500;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
}
.stat strong {
  font-size: 2.35rem;
  line-height: 1.15;
  letter-spacing: -0.06em;
  grid-column: 1;
  margin-top: 0.4rem;
}
.stat .icon {
  grid-column: 2;
  grid-row: 1/3;
  background: #eaf1ed;
  color: #366057;
  width: 2.1rem;
  padding: 0.35rem 0;
  border-radius: 0.5rem;
}
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
}
.panel {
  padding: 1.25rem 1.35rem;
  min-width: 0;
}
.panelhead {
  margin-bottom: 0.9rem;
}
.row {
  border-top: 1px solid #e5eae8;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}
.row:first-child {
  border: 0;
}
.row:last-child {
  padding-bottom: 0;
}
.row div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.row small,
.hint,
.empty,
.meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.row small {
  display: block;
}
.pill {
  font-size: 0.78rem;
  font-weight: 600;
  background: #eaf0ed;
  color: #375549;
  padding: 0.25rem 0.55rem;
  border-radius: 1rem;
  white-space: nowrap;
}
.pill.warn {
  background: #faf0dd;
  color: #755623;
}
.secondary,
.quiet {
  background: #fff;
  color: #294037;
  border-color: #cfdad4;
}
.quiet {
  border: 0;
  color: #805036;
  padding: 0.35rem 0.5rem;
}
.bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.empty {
  padding: 0.75rem 0;
}
.list .row {
  padding: 1.1rem 0;
}
.detail {
  margin-top: 1rem;
}
.error {
  color: #a93022;
  margin: 0.65rem 0;
}
.actions {
  justify-content: flex-end;
  margin-top: 1.15rem;
}
dialog {
  border: 1px solid #d0dcd5;
  border-radius: 1rem;
  width: min(500px, 94vw);
  padding: 1.6rem;
  color: var(--ink);
  max-height: 88vh;
}
dialog::backdrop {
  background: #0d2229a6;
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.8rem 0;
}
label input,
label textarea,
label select {
  display: block;
  margin-top: 0.35rem;
  width: 100%;
  padding: 0.62rem;
  border: 1px solid #adbbb5;
  border-radius: 0.4rem;
  color: var(--ink);
  background: #fff;
}
textarea {
  resize: vertical;
  min-height: 4.4rem;
}
label.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
}
label.check input {
  width: auto;
  margin: 0;
}
.loginbox {
  border: 1px solid var(--line);
  background: #fff;
  max-width: 490px;
  margin: 12vh auto;
  padding: 2rem;
  border-radius: 1rem;
}
.loginbox .brand {
  margin: 0 0 2rem;
}
.loginbox h1 {
  font-size: 2rem;
}
.loginbox p {
  line-height: 1.5;
  margin: 1rem 0;
}
.loginbox code,
code {
  background: #eaf0ed;
  border-radius: 0.3rem;
  padding: 0.2rem 0.35rem;
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: #183f36;
  color: #fff;
  padding: 1rem 1.3rem;
  border-radius: 0.6rem;
  max-width: 90vw;
  z-index: 3;
}
a {
  color: #864122;
}
.panel p + p,
.panel .hint + .bar {
  margin-top: 0.9rem;
}
@media (max-width: 900px) {
  #shell {
    grid-template-columns: 190px 1fr;
  }
  .hero {
    padding: 1.4rem;
  }
  .path i {
    width: 12px;
  }
  .node {
    width: 34px;
    height: 38px;
  }
  .split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  #shell {
    display: block;
  }
  aside {
    padding: 0.85rem;
  }
  aside .brand {
    font-size: 1.55rem;
  }
  .wordmark,
  aside footer,
  .group-label {
    display: none;
  }
  nav {
    display: flex;
    gap: 0.25rem;
    overflow: auto;
    margin-top: 0.7rem;
  }
  nav button {
    width: auto;
    white-space: nowrap;
    font-size: 0.84rem;
  }
  nav .icon {
    display: none;
  }
  header {
    height: 3rem;
  }
  .page {
    padding-top: 1.35rem;
  }
  .hero {
    flex-wrap: wrap;
  }
  .path {
    display: none;
  }
  .stats {
    gap: 0.4rem;
  }
  .stat {
    padding: 0.65rem;
    font-size: 0.84rem;
  }
  .stat strong {
    font-size: 1.75rem;
  }
  .stat .icon {
    display: none;
  }
  .heading {
    align-items: flex-start;
  }
  .panel {
    padding: 1rem;
  }
  .loginbox {
    margin: 10vh 1rem;
  }
}
