:root{
  --red:#e53935;
  --red2:#ff3b30;
  --bg:#ffffff;
  --panel:#f7f7f7;
  --border:#e8e8e8;
  --text:#111;
  --muted:#6b6b6b;
  --shadow: 0 18px 45px rgba(0,0,0,.10);
  --shadow2: 0 14px 24px rgba(229,57,53,.20);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background:var(--bg);
  color:var(--text);
}

.app{
  height:100vh;
  display:grid;
  grid-template-columns:300px 1fr;
}

/* Sidebar */
.sidebar{
  background:var(--panel);
  border-right:1px solid var(--border);
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:14px;
  border-bottom:1px solid var(--border);
}
.logoMark{
  width:34px;height:34px;
  display:grid;place-items:center;
  border-radius:12px;
  background:rgba(229,57,53,.10);
  color:var(--red);
  font-weight:900;
}
.brandName{font-weight:950;font-size:18px;line-height:1}
.brandTag{margin-top:6px;color:var(--muted);font-weight:800;font-size:12px}

.nav{display:flex;flex-direction:column;gap:10px}
.navItem{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:14px;
  text-decoration:none;
  color:var(--text);
  font-weight:900;
}
.navItem:hover{background:#fff}
.navItem.active{
  background:linear-gradient(135deg, var(--red), var(--red2));
  color:#fff;
  box-shadow:var(--shadow2);
}
.navIco{opacity:.9}

.sideActions{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.sideBtn{
  display:block;
  padding:12px 14px;
  border-radius:14px;
  text-decoration:none;
  font-weight:950;
  text-align:center;
  border:1px solid var(--border);
  background:#fff;
  box-shadow:var(--shadow);
}
.xBtn{
  border-color: rgba(229,57,53,.25);
  background: rgba(229,57,53,.08);
  color: var(--red);
}
.ghBtn{
  border-color: rgba(0,0,0,.10);
  background: #fff;
  color:#111;
}
.sideBtn:hover{filter:brightness(.99)}

.sideFoot{margin-top:auto}
.footPill{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  color:var(--muted);
  font-weight:850;
}
.footDot{
  width:10px;height:10px;border-radius:999px;
  background: linear-gradient(135deg, var(--red), var(--red2));
}

/* Main */
.main{overflow:auto}
.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  background: linear-gradient(to bottom, rgba(255,255,255,.96), rgba(255,255,255,.75));
  border-bottom:1px solid rgba(0,0,0,.04);
  backdrop-filter: blur(8px);
}
.topKicker{font-weight:950;color:var(--red);font-size:12px}
.topSub{font-weight:900;color:var(--muted);margin-top:4px}

.connectBtn{
  background:linear-gradient(135deg, var(--red), var(--red2));
  color:#fff;
  border:none;
  padding:12px 16px;
  border-radius:14px;
  font-weight:950;
  cursor:pointer;
  box-shadow:var(--shadow2);
}
.connectBtn:hover{filter:brightness(.99)}

.content{
  max-width:1100px;
  margin:0 auto;
  padding:26px 18px 60px;
}

.page{display:none}
.page.active{display:block}

/* Home */
.hero{
  padding:20px 0 0;
}
.heroBadgeRow{
  display:flex;gap:10px;flex-wrap:wrap;
}
.heroBadge{
  padding:7px 12px;
  border-radius:999px;
  background: rgba(229,57,53,.08);
  border:1px solid rgba(229,57,53,.20);
  color: var(--red);
  font-weight:950;
  font-size:12px;
}
.heroTitle{
  margin:18px 0 10px;
  font-size:56px;
  letter-spacing:-0.02em;
}
.heroSub{
  margin:0;
  max-width:860px;
  color:var(--muted);
  font-weight:800;
  line-height:1.7;
  font-size:18px;
}

.heroBtns{
  margin-top:22px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.btnPrimary, .btnGhost, .btnX, .btnGH{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:14px 18px;
  border-radius:14px;
  font-weight:950;
  text-decoration:none;
  cursor:pointer;
}

.btnPrimary{
  border:none;
  background: linear-gradient(135deg, var(--red), var(--red2));
  color:#fff;
  box-shadow:var(--shadow2);
}
.btnGhost{
  border:2px solid rgba(229,57,53,.35);
  background:#fff;
  color:var(--red);
}
.btnX{
  border:1px solid rgba(229,57,53,.25);
  background: rgba(229,57,53,.08);
  color: var(--red);
  box-shadow: var(--shadow);
}
.btnGH{
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  color:#111;
  box-shadow: var(--shadow);
}
.btnPrimary:hover,.btnGhost:hover,.btnX:hover,.btnGH:hover{filter:brightness(.99)}

.heroCards{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
}
.cardTop{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.cardIcon{
  width:34px;height:34px;border-radius:12px;
  display:grid;place-items:center;
  background: rgba(229,57,53,.08);
  border:1px solid rgba(229,57,53,.18);
}
.cardTitle{font-weight:950}
.cardText{margin:0;color:var(--muted);font-weight:800;line-height:1.7}

/* Shared */
.pageHead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}
.pageTitle{margin:0;font-size:44px;letter-spacing:-0.02em}
.pageSub{margin:6px 0 0;color:var(--muted);font-weight:800;line-height:1.6}

.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.input{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  outline:none;
}
.input:focus{border-color:#d8d8d8}
.select{min-width:220px}

.btnPrimary.small{padding:10px 14px;font-size:13px}
.btnGhost.small{padding:10px 14px;font-size:13px}

/* Agents grid */
.grid{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
}
.agentCard{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.agentCard h3{margin:0;font-weight:950}
.agentCard p{margin:0;color:var(--muted);font-weight:800;line-height:1.65}
.badges{display:flex;gap:8px;flex-wrap:wrap}
.badge{
  font-size:12px;
  font-weight:950;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fafafa;
}
.badge.red{
  border-color: rgba(229,57,53,.25);
  background: rgba(229,57,53,.08);
  color: var(--red);
}
.agentActions{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.smallBtn{
  padding:10px 12px;
  border-radius:14px;
  font-weight:950;
  cursor:pointer;
  border:1px solid var(--border);
  background:#fff;
}
.smallBtn.primary{
  border:none;
  background:linear-gradient(135deg, var(--red), var(--red2));
  color:#fff;
  box-shadow:var(--shadow2);
}
.smallBtn.ghost{
  border:2px solid rgba(229,57,53,.30);
  color:var(--red);
}

/* Docs layout */
.docsHeader{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}
.docsControls{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.miniLabel{font-size:12px;font-weight:950;color:var(--muted)}

.docsLayout{
  margin-top:14px;
  display:grid;
  grid-template-columns:260px 1fr;
  gap:14px;
}
.docsNav{
  position:sticky;
  top:92px;
  align-self:start;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px;
  box-shadow:var(--shadow);
}
.docsNavItem{
  display:block;
  padding:10px 12px;
  border-radius:14px;
  text-decoration:none;
  color:#111;
  font-weight:950;
}
.docsNavItem:hover{background:#fafafa}
.docsBody{display:flex;flex-direction:column;gap:14px}

.docCard{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
}
.docCard.accent{
  border-left:6px solid var(--red);
  background:#fffafa;
}
.docHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.docHead h2{margin:0;font-size:20px;font-weight:950}
.docCard p{color:var(--muted);font-weight:800;line-height:1.75}
.docCard ul, .docCard ol{color:#222;font-weight:850;line-height:1.85}
.inlineCode{padding:2px 6px;border-radius:8px;background:#f3f3f3;border:1px solid #eee;font-weight:900}

.docGrid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}
.featureCard{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
}
.featureCard h3{margin:0 0 8px;font-weight:950}
.featureCard p{margin:0;color:var(--muted);font-weight:800;line-height:1.65}

.pillRow{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}
.pill{
  padding:7px 12px;
  border-radius:999px;
  background: rgba(229,57,53,.08);
  border:1px solid rgba(229,57,53,.20);
  color: var(--red);
  font-weight:950;
  font-size:12px;
}

.code{
  margin:0;
  background:#f7f7f7;
  border:1px solid #eee;
  border-radius:16px;
  padding:14px;
  overflow:auto;
}
.code code{font-weight:850}

.callout{
  margin-top:12px;
  padding:12px 14px;
  border-radius:16px;
  font-weight:900;
  border:1px solid var(--border);
}
.callout.warn{
  background:#fff3cd;
  border-color:#ffe08a;
}
.callout.info{
  background:#e3f2fd;
  border-color:#b8dcff;
}

.chipBtn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:950;
  cursor:pointer;
}
.chipBtn:hover{background:#fafafa}

/* Status */
.statusCard{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
}
.statusRow{
  display:flex;
  justify-content:space-between;
  padding:7px 0;
  font-weight:950;
}
.status{
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
}
.status.live{background:#e8f5e9;color:#2e7d32}
.status.draft{background:#fff8e1;color:#f57c00}
.status.planned{background:#e3f2fd;color:#1565c0}

/* Profile */
.profileBox{
  margin-top:14px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
}
.profileRow{
  display:flex;justify-content:space-between;gap:10px;
  padding:10px 0;border-bottom:1px solid #f2f2f2;
  font-weight:900;
}
.profileRow:last-child{border-bottom:none}
.pLabel{color:var(--muted)}
.pVal{color:#111}
.mono{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace}
.inlineLink{color:var(--red);font-weight:950;text-decoration:none}
.inlineLink:hover{text-decoration:underline}

/* Modal */
.modalBackdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.38);
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:100;
}
.modalBackdrop.show{display:flex}
.modal{
  width:min(560px, 96vw);
  background:#fff;
  border-radius:20px;
  border:1px solid #eee;
  box-shadow: 0 30px 90px rgba(0,0,0,.25);
  padding:16px;
}
.modalTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  border-bottom:1px solid #f1f1f1;
  padding-bottom:12px;
}
.modalKicker{font-weight:950;color:var(--red);font-size:12px}
.modalTitle{font-weight:950;font-size:20px;margin-top:4px}
.modalClose{
  width:42px;height:42px;border-radius:14px;
  border:1px solid #eee;background:#fff;cursor:pointer;
}
.modalBody{padding-top:12px; display:flex; flex-direction:column; gap:10px}
.walletChoice{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px;
  border-radius:16px;
  border:1px solid #eee;
  background:#fff;
  cursor:pointer;
  font-weight:950;
}
.walletChoice:hover{background:#fafafa}
.walletHint{color:var(--muted);font-weight:900}
.modalFinePrint{color:var(--muted);font-weight:800;margin-top:6px}

/* Responsive */
@media(max-width:1040px){
  .heroCards{grid-template-columns:1fr}
  .docsLayout{grid-template-columns:1fr}
  .docsNav{position:relative;top:auto}
  .docGrid{grid-template-columns:1fr}
  .heroTitle{font-size:46px}
}
@media(max-width:800px){
  .app{grid-template-columns:1fr}
}
