:root{--bg:#080c16;--panel:#111827;--panel-2:#172033;--panel-3:#0d1424;--muted:#94a3b8;--text:#eef3ff;--line:#263349;--accent:#60a5fa;--accent-2:#22d3ee;--ok:#22c55e;--warn:#f59e0b;--err:#ef4444}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top left,#13213c,#080c16 45%);color:var(--text);font:14px/1.45 Inter,system-ui,Segoe UI,Arial,sans-serif}a{color:#93c5fd}a:hover{color:var(--accent-2)}.sidebar{position:fixed;inset:0 auto 0 0;width:285px;background:rgba(5,10,22,.96);border-right:1px solid var(--line);padding:22px;display:flex;flex-direction:column;gap:18px;z-index:4}.brand a{font-size:24px;font-weight:900;line-height:1;text-decoration:none;color:var(--text)}.brand span{color:var(--accent-2)}.project-nav{display:grid;gap:8px}.projects-menu{border:1px solid transparent;border-radius:14px}.projects-menu summary{list-style:none;cursor:pointer;padding:12px;border:1px solid var(--line);border-radius:14px;color:var(--text);font-weight:800}.projects-menu summary::-webkit-details-marker{display:none}.projects-menu summary:after{content:'▸';float:right;color:var(--muted)}.projects-menu[open] summary:after{content:'▾'}.project-list-menu{display:grid;gap:8px;margin-top:8px}.project-link{display:block;text-decoration:none;color:var(--muted);padding:12px;border:1px solid transparent;border-radius:14px}.project-link strong,.project-link small{display:block}.project-link small{margin-top:4px;font-size:11px}.project-link:hover,.project-link.selected{background:var(--panel);border-color:#2f81f7;color:var(--text)}.account-box{margin-top:auto;padding-top:16px;border-top:1px solid var(--line)}main{margin-left:285px}.topbar{min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 24px;border-bottom:1px solid var(--line);background:rgba(17,24,39,.84);position:sticky;top:0;z-index:3;backdrop-filter:blur(12px)}.topbar small{display:block;color:var(--muted)}.topbar div{min-width:0}.topbar strong,.topbar small{overflow-wrap:anywhere}.content{padding:24px;max-width:1500px}.hero,.panel,.card,article,.login-card{background:linear-gradient(180deg,var(--panel),#0e1627);border:1px solid var(--line);border-radius:20px;padding:20px;box-shadow:0 18px 50px rgba(0,0,0,.16)}.project-title-simple{margin:0 0 16px}.project-title-simple h1,.hero h1,h1{font-size:32px;line-height:1.15;margin:0 0 12px}.login-card{max-width:460px;margin:8vh auto}.stack{display:grid;gap:12px}.grid{display:grid;gap:16px}.cards{grid-template-columns:repeat(auto-fit,minmax(245px,1fr))}.six-cards{grid-template-columns:repeat(3,minmax(220px,1fr));align-items:stretch}.two{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}.status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.status-grid.compact{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}.metric{background:var(--panel-3);border:1px solid var(--line);border-radius:14px;padding:12px}.metric span{display:block;color:var(--muted);font-size:12px}.metric strong{display:block;overflow-wrap:anywhere}.muted{color:var(--muted)}.source-paths{overflow-wrap:anywhere;word-break:break-word}.badge{display:inline-block;border-radius:999px;padding:4px 10px;font-size:12px;background:#263349;color:#cbd5e1}.badge.ok{background:rgba(34,197,94,.18);color:#86efac}.badge.warn,.alert.warn{background:rgba(245,158,11,.12);color:#facc15}.badge.neutral{background:#263349;color:#cbd5e1}.alert{padding:14px;border:1px solid var(--line);border-radius:14px;margin:10px 0 14px}.button,button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#2563eb;color:#fff;border:0;border-radius:10px;padding:10px 14px;text-decoration:none;cursor:pointer}.button.disabled,.disabled-card{opacity:.62}.disabled{cursor:not-allowed}.icon{font-size:34px}.icon-small{font-size:18px}.card.link,.function-card{text-decoration:none;color:var(--text);display:flex;flex-direction:column;gap:10px;min-height:190px}.function-card strong{display:block;font-size:20px;line-height:1.25}.function-card span{display:block;color:var(--muted);line-height:1.35}.integration-card,.agent-card{min-height:190px}.agent-card{display:flex;flex-direction:column;gap:12px}.agent-card .actions{margin-top:auto}.kv{display:grid;grid-template-columns:minmax(120px,42%) minmax(0,1fr);gap:8px 12px}.kv dt{color:var(--muted);min-width:0}.kv dd{margin:0;min-width:0;overflow-wrap:anywhere;word-break:normal}.agent-card .kv{grid-template-columns:1fr}.agent-card .kv dt{font-size:12px}.agent-card .kv dd{padding:0 0 8px;border-bottom:1px solid rgba(148,163,184,.12)}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.breadcrumbs{margin:0 0 16px;color:var(--muted)}.progress{height:10px;background:#0b1220;border-radius:999px;overflow:hidden;border:1px solid var(--line);margin:12px 0}.progress span{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent-2))}.progress.small{height:6px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px}table{width:100%;border-collapse:collapse;min-width:1180px;background:var(--panel)}th,td{padding:12px;border-bottom:1px solid var(--line);vertical-align:top}th{position:sticky;top:0;background:#101827;text-align:left}.mini-row{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}input,textarea,select{width:100%;background:#0b1220;border:1px solid var(--line);border-radius:10px;color:var(--text);padding:10px}.notice{border-left:4px solid var(--accent);padding-left:12px;color:#cbd5e1}.context-preview{white-space:pre-wrap;overflow:auto;max-height:220px;background:#070b14;border:1px solid var(--line);border-radius:12px;padding:12px}.menu{display:none}.toast{position:fixed;right:20px;bottom:20px;background:#052e16;border:1px solid #166534;border-radius:12px;padding:12px 14px;z-index:9}dialog{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:16px;max-width:680px}dialog textarea{width:100%}@media(max-width:900px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:translateX(0)}main{margin-left:0}.menu{display:inline-flex}.content{padding:14px}.topbar{padding:10px 14px}.six-cards{grid-template-columns:1fr}.cards{grid-template-columns:1fr}.kv{grid-template-columns:1fr}.status-grid{grid-template-columns:1fr}.hero,.panel,.card,article,.login-card{padding:16px}}

/* Status badges for LDE */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 500;
  background: #e0e0e0;
  color: #333;
}
.badge.ok { background: #c8e6c9; color: #1b5e20; }
.badge.completed { background: #c8e6c9; color: #1b5e20; }
.badge.partial { background: #fff9c4; color: #f57f17; }
.badge.failed { background: #ffcdd2; color: #b71c1c; }
.badge.running { background: #bbdefb; color: #0d47a1; }
.badge.pending { background: #e0e0e0; color: #555; }
.badge.blocked { background: #ffccbc; color: #bf360c; }
.badge.unresolved { background: #f5f5f5; color: #555; }
.badge.candidate { background: #c5cae9; color: #1a237e; }
.badge.accepted { background: #c8e6c9; color: #1b5e20; }
.badge.rejected { background: #ffcdd2; color: #b71c1c; }
.badge.state-A { background: #c8e6c9; color: #1b5e20; }
.badge.state-B { background: #fff9c4; color: #f57f17; }
.badge.state-C { background: #c5cae9; color: #1a237e; }
.badge.state-D { background: #bbdefb; color: #0d47a1; }
.badge.state-E { background: #ffccbc; color: #bf360c; }
.badge.state-F { background: #ffcdd2; color: #b71c1c; }
.badge.state-G { background: #c8e6c9; color: #1b5e20; }
.badge.state-H { background: #bbdefb; color: #0d47a1; }
.badge.state-I { background: #f5f5f5; color: #555; }
.badge.state-J { background: #ffccbc; color: #bf360c; }

/* Filter row */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0;
}
.filter-row input, .filter-row select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.filter-row input[type="text"] { min-width: 200px; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Toggle (for checkboxes that look like toggles) */
label.toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Status grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.metric {
  background: linear-gradient(180deg,var(--panel),#0e1627);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 1.1rem; color: var(--text); }

.status-grid.compact .metric { padding: 0.5rem 0.75rem; }

/* Hero */
.hero { padding: 1.5rem 0; }
.hero h1 { margin: 0 0 0.5rem 0; }

/* Btn */
.btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #e8e8e8; }
.btn.primary { background: #1976d2; color: white; border-color: #1565c0; }
.btn.primary:hover { background: #1565c0; }

/* Grid cards */
.grid { display: grid; gap: 1rem; }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cards article {
  background: linear-gradient(180deg,var(--panel),#0e1627);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
}
.cards article h3 { margin-top: 0; }

/* Sidebar group titles for the newly exposed navigation sections. */
.nav-section-title {
  display: block;
  padding: 0 12px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-section {
  display: grid;
  gap: 8px;
}
.nav-section a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
}
.nav-section a:hover {
  background: var(--panel);
  border-color: #2f81f7;
  color: var(--text);
}
.nav-section a.active {
  background: var(--panel);
  border-color: #2f81f7;
  color: var(--text);
}
.nav-disclosure summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  font-weight: 700;
}
.nav-disclosure summary::-webkit-details-marker { display: none; }
.nav-disclosure summary::after { content: '▸'; float: right; color: var(--muted); }
.nav-disclosure[open] summary::after { content: '▾'; }
.nav-disclosure .nav-section { padding-left: 10px; }

/* LDE's larger tile set wraps independently from the project function cards. */
.function-grid.lde-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1500px;
}
.overview-hero { margin-bottom: 1rem; }
.overview-tiles { display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.overview-tiles a, .integration-mini-grid a { color: var(--text); text-decoration: none; }
.control-grid { display: grid; gap: 1rem; margin-bottom: 1rem; align-items: start; }
.middle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bottom-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.integration-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.project-summary { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.capability-list li { margin: .6rem 0; }
.capability-list li::marker { content: '✓  '; color: var(--ok); }
.capability-details dt { font-weight: 800; margin-top: 1rem; }
.capability-details dd { color: var(--muted); margin: .25rem 0 0; }
.activity-list { display: grid; gap: .75rem; }
.activity-row { display: flex; gap: .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.activity-row > span { color: var(--accent-2); font-size: 1.4rem; }
.activity-row small { display: block; color: var(--muted); }
@media(max-width:1200px){.overview-tiles{grid-template-columns:repeat(3,minmax(145px,1fr))}.bottom-grid{grid-template-columns:1fr 1fr}.bottom-grid article:last-child{grid-column:1/-1}}
@media(max-width:900px){.overview-tiles,.middle-grid,.bottom-grid,.integration-mini-grid{grid-template-columns:1fr}.bottom-grid article:last-child{grid-column:auto}}

/* Alert */
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}
.alert.error { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; }

/* Form */
form label { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
form label > span { font-weight: 500; }
form input, form textarea, form select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}
form button[type="submit"] {
  padding: 0.5rem 1rem;
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}
form button[type="submit"]:hover { background: #1565c0; }
