* {
  box-sizing:border-box;
}

:root {
  font-family:"Geist","Segoe UI",Arial,sans-serif;
  color:#1e302a;
  background:#f6f7f3;
  --ink:#183d32;
  --muted:#60706a;
  --line:#dbe1d9;
  --green:#c7f37b;
  --paper:#fff;
}

body {
  margin:0;
  font-size:16px;
}

[hidden] {
  display:none!important;
}

button,input,select,textarea {
  font:inherit;
}

button,a {
  touch-action:manipulation;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:wait;
  opacity:.58;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #7ba652;
  outline-offset:3px;
}

h1,h2,h3,p {
  margin:0;
}

input,select,textarea {
  width:100%;
  padding:.7rem .8rem;
  border:1px solid #cbd5ca;
  border-radius:8px;
  background:#fff;
  color:#203d32;
}

select {
  appearance:none;
  padding-right:2.2rem;
  background:#fff 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 5 5-5' fill='none' stroke='%2346564e' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right .8rem center;
}

textarea {
  resize:vertical;
}

label {
  display:grid;
  gap:7px;
  font-size:.91rem;
  font-weight:600;
}

small,.muted {
  color:var(--muted);
}

.brand {
  display:flex;
  gap:11px;
  align-items:center;
  font-size:1.55rem;
  font-weight:700;
  letter-spacing:-.07em;
}

.brandmark {
  display:inline-block;
  width:29px;
  height:29px;
  border-radius:9px;
  background:var(--green);
  position:relative;
  transform:rotate(-3deg);
  flex-shrink:0;
}

.brandmark:after {
  content:"";
  position:absolute;
  inset:7px 5px;
  background:#163c30;
  clip-path:polygon(0 0,22% 0,32% 58%,46% 17%,60% 17%,68% 58%,80% 0,100% 0,78% 100%,60% 100%,51% 65%,40% 100%,20% 100%);
}

.eyebrow,.nav-label,.meta {
  font-size:.76rem;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.primary,.secondary,.linkbtn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  border-radius:8px;
  padding:.7rem 1rem;
  font-weight:600;
  font-size:.91rem;
  text-decoration:none;
  line-height:1.35;
}

.primary {
  background:var(--ink);
  color:white;
}

.primary:hover {
  background:#285744;
}

.secondary {
  color:var(--ink);
  background:white;
  border:1px solid var(--line);
}

.secondary:hover,.icon-btn:hover {
  background:#eaf0e6;
}

.linkbtn {
  background:none;
  color:#2b6349;
  padding:.35rem .2rem;
}

svg {
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-width:1.7;
  flex-shrink:0;
}

.icon-btn {
  padding:7px;
  border:0;
  color:inherit;
  background:transparent;
  border-radius:7px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.login {
  min-height:100svh;
  display:grid;
  grid-template-columns:1fr 1fr;
}

.login-art {
  background:#12372e;
  color:#f5faf0;
  position:relative;
  overflow:hidden;
  padding:clamp(26px,5vw,82px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:610px;
}

.login-art .brand {
  z-index:1;
}

.login-head {
  position:relative;
  z-index:1;
}

.login-head .eyebrow {
  color:var(--green);
}

.login h1 {
  font-size:clamp(3.25rem,5.9vw,6.5rem);
  line-height:.98;
  letter-spacing:-.075em;
  font-weight:550;
  margin:20px 0;
}

.login-head p {
  color:#d3dfd5;
  max-width:350px;
  line-height:1.6;
}

.signal {
  position:relative;
  align-self:center;
  width:clamp(180px,31vw,390px);
  aspect-ratio:1.8;
  margin:35px 0;
}

.orbit {
  width:145%;
  height:155%;
  border:1px solid #416854;
  border-radius:50%;
  position:absolute;
  left:-20%;
  top:-30%;
  transform:rotate(-28deg);
}

.orbit.b {
  inset:-17% auto auto -6%;
  width:116%;
  height:132%;
}

.orbit.c {
  inset:-1% auto auto 8%;
  width:88%;
  height:100%;
}

.bubble {
  position:absolute;
  border-radius:25px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  box-shadow:0 14px 26px #08281f44;
  transform:rotate(-10deg);
}

.bubble:after {
  content:"";
  position:absolute;
  bottom:-12px;
  left:20%;
  width:25px;
  height:25px;
  background:inherit;
  clip-path:polygon(0 0,100% 0,0 100%);
}

.bubble.one {
  background:#c7f37b;
  left:13%;
  top:4%;
  width:50%;
  height:54%;
  z-index:1;
}

.bubble i {
  width:10px;
  height:10px;
  background:#153f31;
  border-radius:50%;
}

.bubble.two {
  background:#56806b;
  color:#e1f9c6;
  left:52%;
  top:42%;
  width:32%;
  height:42%;
  font-size:2rem;
  letter-spacing:-8px;
  transform:rotate(8deg);
}

.login-panel {
  display:grid;
  place-items:center;
  padding:35px;
}

.login-panel form {
  width:min(100%,365px);
  display:grid;
  gap:20px;
}

.login-panel h2 {
  font-size:3rem;
  letter-spacing:-.06em;
  line-height:1;
}

.login-panel p,.sub {
  color:var(--muted);
  line-height:1.5;
}

.login-panel .eyebrow {
  color:#57774c;
}

.error,#notice {
  background:#fff1e7;
  color:#834124;
  padding:12px;
  border-radius:7px;
  font-size:.9rem;
}

#notice {
  margin:12px 4% 0;
}

#loading {
  padding:3rem;
  text-align:center;
}

#shell {
  min-height:100vh;
  display:grid;
  grid-template-columns:232px minmax(0,1fr);
}

aside {
  background:#143a30;
  color:#ecf3e9;
  position:sticky;
  top:0;
  height:100svh;
  display:flex;
  flex-direction:column;
  padding:32px 16px 15px;
  z-index:4;
}

aside .brand {
  margin:0 10px;
}

.brand-sub {
  margin:4px 0 22px 51px;
  color:#b6c9ba;
  font-size:.81rem;
}

nav {
  overflow:auto;
  flex:1;
}

.nav-label {
  color:#acc1b3;
  margin:25px 13px 8px;
  font-size:.69rem;
}

.nav-item {
  width:100%;
  display:flex;
  gap:13px;
  align-items:center;
  border:0;
  border-radius:7px;
  padding:10px 13px;
  text-align:left;
  color:#dae6dc;
  background:none;
  font-size:.94rem;
  margin:2px 0;
}

.nav-item:hover {
  background:#214b3f;
}

.nav-item.active {
  background:#c8ef8d;
  color:#143a30;
  font-weight:650;
}

.profile {
  display:flex;
  align-items:center;
  border-top:1px solid #38574c;
  gap:9px;
  padding:17px 4px 3px;
  margin-top:12px;
}

.profile>div:nth-child(2) {
  min-width:0;
  flex:1;
}

.profile strong,.profile small {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.83rem;
}

.profile small {
  color:#bbcebe;
  margin-top:2px;
  font-size:.75rem;
}

.profile .icon-btn:hover {
  background:#2d5143;
}

.avatar {
  background:#dae8cb;
  color:#2d4b36;
  border-radius:50%;
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  font-weight:700;
  font-size:.85rem;
}

.main {
  min-width:0;
}

header {
  height:68px;
  padding:0 clamp(18px,3.4vw,62px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:#fff;
}

.crumb {
  font-size:.88rem;
  color:var(--muted);
}

.crumb span {
  margin:0 11px;
  color:#9aaaa1;
}

.crumb b {
  color:var(--ink);
  font-weight:600;
}

.header-right {
  display:flex;
  gap:14px;
  align-items:center;
}

.header-right select {
  font-size:.85rem;
  max-width:210px;
  width:auto;
  padding-top:.45rem;
  padding-bottom:.45rem;
}

#menu {
  display:none;
}

#view {
  max-width:1720px;
  margin:auto;
  padding:clamp(23px,3.2vw,54px);
}

.page-heading,.panel-heading,.rowflex {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.page-heading {
  margin-bottom:26px;
  flex-wrap:wrap;
}

.page-heading h1 {
  font-size:clamp(2rem,3.4vw,3.45rem);
  line-height:1.08;
  letter-spacing:-.065em;
  font-weight:590;
  margin:6px 0;
}

.sub {
  font-size:.94rem;
}

.actions {
  display:flex;
  gap:9px;
  align-items:center;
  flex-wrap:wrap;
}

.hero {
  background:#234c3c;
  border-radius:16px;
  color:#f7fbf4;
  position:relative;
  overflow:hidden;
  padding:clamp(22px,3vw,44px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:15px;
}

.hero>div:first-child {
  z-index:1;
}

.hero .eyebrow {
  color:#c9e5b2;
  display:flex;
  align-items:center;
  gap:8px;
}

.hero strong {
  font-size:clamp(2.5rem,4.4vw,4.5rem);
  line-height:1.3;
  letter-spacing:-.06em;
  display:block;
  font-weight:520;
}

.hero .linkbtn {
  color:#dbf4bd;
  padding:0;
  margin-top:4px;
}

.hero-art {
  position:absolute;
  right:3%;
  top:-45%;
  width:34%;
  height:190%;
  transform:rotate(32deg);
  border-radius:42%;
  background:repeating-radial-gradient(ellipse at 50% 53%,transparent 0 11px,#678c5b 12px 13px,transparent 14px 18px);
  opacity:.83;
}

.stats {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:15px;
  margin-bottom:22px;
}

.stat,.panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:13px;
}

.stat {
  padding:19px;
}

.stat-head {
  display:flex;
  align-items:center;
  gap:9px;
  color:#53645a;
  font-size:.9rem;
}

.tile-icon {
  display:inline-grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:9px;
  background:#e8f1df;
  color:#385f43;
}

.stat:nth-child(2) .tile-icon {
  background:#fff0d9;
  color:#8c642d;
}

.stat:nth-child(3) .tile-icon {
  background:#e9edf7;
  color:#536d93;
}

.stat strong {
  display:block;
  font-size:2rem;
  letter-spacing:-.06em;
  margin-top:9px;
  font-weight:600;
}

.panel {
  margin-bottom:20px;
  overflow:hidden;
}

.panel-heading {
  padding:18px 20px;
}

.panel h2,dialog h2 {
  font-size:1.22rem;
  font-weight:650;
  letter-spacing:-.04em;
}

.table-wrap {
  overflow-x:auto;
}

table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:.91rem;
}

th {
  white-space:nowrap;
  background:#f4f6f1;
  color:#53625a;
  font-weight:600;
  font-size:.8rem;
}

th,td {
  padding:13px 19px;
  border-top:1px solid #e5e9e2;
}

td {
  overflow-wrap:anywhere;
}

td small {
  display:block;
  margin-top:4px;
}

.badge {
  display:inline-block;
  white-space:nowrap;
  font-size:.79rem;
  font-weight:600;
  color:#446039;
  background:#edf3e7;
  padding:4px 8px;
  border-radius:6px;
}

.badge.warn {
  color:#886026;
  background:#fff1d6;
}

.badge.bad {
  color:#97492f;
  background:#fbe8de;
}

.empty {
  padding:28px 20px 33px;
  text-align:center;
  color:var(--muted);
  font-size:.94rem;
}

.search {
  max-width:220px;
  font-size:.87rem;
  padding:.5rem .7rem;
}

.mode {
  display:inline-flex;
  font-size:.77rem;
  font-weight:600;
  align-items:center;
  gap:7px;
  color:#53654c;
}

.mode:before {
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#779e49;
}

.form-grid {
  display:grid;
  gap:16px;
}

.help {
  color:var(--muted);
  font-size:.83rem;
  font-weight:400;
  line-height:1.45;
}

.check {
  display:flex;
  align-items:center;
  gap:10px;
}

.check input {
  width:18px;
  height:18px;
}

.dialog-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:19px;
}

dialog {
  color:#20392e;
  border:1px solid var(--line);
  border-radius:14px;
  width:min(475px,calc(100vw - 28px));
  padding:24px;
  background:#fbfcf9;
  max-height:90svh;
  overflow:auto;
  box-shadow:0 24px 100px #10251f30;
}

dialog::backdrop {
  background:#142c2488;
}

.dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:4px;
}

.details {
  padding:20px;
  display:grid;
  gap:16px;
}

.details pre {
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-all;
  background:#f3f5ef;
  padding:15px;
  border-radius:8px;
}

.info-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 20px;
  border-top:1px solid var(--line);
}

.info-row p {
  margin-top:4px;
  font-size:.87rem;
  color:var(--muted);
}

#toast {
  position:fixed;
  bottom:21px;
  left:50%;
  transform:translateX(-50%);
  background:#173d31;
  color:#fff;
  padding:12px 20px;
  border-radius:9px;
  box-shadow:0 3px 18px #0002;
  z-index:7;
  font-size:.9rem;
  max-width:90vw;
}

@media(max-width:900px) {
  #shell {
    grid-template-columns:195px minmax(0,1fr);
  }
  aside {
    padding:24px 9px 12px;
  }
  #view {
    padding:22px 17px;
  }
  .stat {
    padding:14px;
  }
  .stats {
    gap:8px;
  }
  .stat-head {
    gap:6px;
    flex-wrap:wrap;
  }
  .crumb {
    display:none;
  }
  .header-right {
    margin-left:auto;
  }
}

@media(max-width:700px) {
  .login {
    grid-template-columns:1fr;
  }
  .login-art {
    padding:25px;
    min-height:210px;
  }
  .login-head {
    margin-top:24px;
  }
  .login h1 {
    font-size:2.5rem;
    margin:8px 0;
  }
  .login-head p {
    display:none;
  }
  .login .signal {
    position:absolute;
    width:170px;
    right:4%;
    top:18%;
    opacity:.65;
  }
  .login-panel {
    padding:30px 24px;
  }
  .login-panel form {
    gap:14px;
  }
  .login-panel h2 {
    font-size:2.25rem;
  }
  #shell {
    display:block;
  }
  aside {
    position:fixed;
    left:0;
    width:240px;
    transform:translateX(-100%);
  }
  body.nav-open aside {
    transform:none;
  }
  #backdrop {
    position:fixed;
    inset:0;
    background:#182e2688;
    z-index:3;
  }
  #menu {
    display:inline-flex;
  }
  header {
    height:55px;
  }
  .crumb {
    display:block;
    margin-left:6px;
  }
  .page-heading {
    gap:12px;
  }
  .stats {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .stat-head {
    font-size:.8rem;
    display:block;
  }
  .tile-icon {
    margin-bottom:7px;
    display:grid;
  }
  .stat strong {
    font-size:1.5rem;
  }
  .stat {
    padding:11px;
  }
  .hero-art {
    right:-8%;
    width:46%;
  }
  .panel-heading {
    padding:14px;
    flex-wrap:wrap;
  }
  th,td {
    padding:10px 14px;
  }
  .info-row {
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .header-right select {
    max-width:137px;
  }
  .header-right {
    gap:3px;
  }
}

.demo-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.demo-actions .secondary {
  flex:1;
  font-size:.85rem;
  white-space:nowrap;
}


.template-preview {
  padding: 12px;
  border-left: 3px solid #97ba79;
  background: #edf4e8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: .94rem;
}
nav {
  scrollbar-width: thin;
  scrollbar-color: #496c59 transparent;
}
@media (max-width: 480px) {
  .crumb { display: none; }
  .header-right .mode { font-size: .72rem; }
}
