:root{
  --bg:#0b0c14;
  --radius: 18px;

  /* app layout */
  --topbar-h:64px;
  --work-pad:18px;

  /* widths */
  --w-swap:520px;
  --w-wide:1300px; /* ~2.5x swap */
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:#111;
  overflow:hidden;

  /* ===== Tempo-like background ===== */
  background:
    radial-gradient(1200px 600px at 70% 30%, rgba(32,198,216,.18), transparent 60%),
    radial-gradient(900px 500px at 30% 40%, rgba(160,100,255,.16), transparent 60%),
    url("./assets/bg.png") center/cover no-repeat fixed,
    var(--bg);
}

a{color:inherit}

/* ===== Topbar (giữ style Hedera) ===== */
.topbar{
  position:fixed; top:0; left:0; right:0;
  height:var(--topbar-h);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 16px;
  background:rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(255,255,255,.08);
  z-index:10;
}

.brand{display:flex; align-items:center; gap:10px}
.brand__link{display:flex; align-items:center; gap:10px; text-decoration:none}
.brand__logo{width:34px; height:34px}
.brand__name{color:#fff; font-weight:800; letter-spacing:.2px}

.nav{display:flex; gap:14px}
.nav__link{color:rgba(255,255,255,.85); text-decoration:none; font-weight:700}
.nav__link.is-active{color:#fff; text-decoration:underline}

.topbar__right{display:flex; align-items:center; gap:10px}
.pill{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  color:#fff;
  font-weight:700;
  font-size:14px;
}

.btn{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.20);
  text-decoration:none;
  color:#fff;
  font-weight:800;
  font-size:14px;
  background:rgba(255,255,255,.10);
  cursor:pointer;
}
.btn--ghost{background:transparent}
.btn:disabled{opacity:.45; cursor:not-allowed}

@media (max-width: 900px){
  .nav{display:none}
}

/* ===== App main + WorkArea ===== */
.appMain{
  position:relative;
  padding-top:var(--topbar-h);
  height:100%;
}

/* default workArea for swap/liquidity/faucet (center) */
.workArea{
  height:calc(100vh - var(--topbar-h));
  overflow:auto;
  padding:var(--work-pad);
  display:flex;
  align-items:center;
  justify-content:center;
}

/* for docs/metrics: start from top, still centered horizontally */
.workArea--top{
  align-items:flex-start;
  justify-content:center;
  padding-top:24px;
  padding-bottom:40px;
}

/* Each view centered */
.view{
  display:none;
  width:100%;
  align-items:center;
  justify-content:center;
}
.view.is-active{ display:flex; }

.view__content{
  width:100%;
  max-width:var(--w-swap);
}

/* Wide content (docs / metrics) */
.view__content--wide{
  max-width:var(--w-wide);
}

/* Card Tempo-glass */
.card{
  background: rgba(245,247,255,.86);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 16px;
  box-shadow:0 24px 80px rgba(0,0,0,.30);
}

.muted{color: rgba(0,0,0,.55);}

/* Segmented tabs */
.segTabs{
  display:flex;
  gap:8px;
  padding:8px;
  border-radius:999px;
  background: rgba(0,0,0,.06);
}
.segTabs a{
  flex:1;
  text-align:center;
  text-decoration:none;
  font-weight:800;
  padding:10px 12px;
  border-radius:999px;
  color: rgba(0,0,0,.65);
}
.segTabs a.is-active{
  background: rgba(110,140,255,.25);
  color:#111;
}

/* Inputs */
.input{
  width:100%;
  padding:14px 14px;
  border-radius:18px;
  border:1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  font-size:16px;
  outline:none;
}
.input:disabled{ opacity:.7; }

/* mini rows */
.miniRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:8px;
  font-size:12px;
  color: rgba(0,0,0,.55);
}
.miniRow .mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Primary button */
.btnPrimary{
  width:100%;
  border:0;
  border-radius:999px;
  padding:14px 16px;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
  background: rgba(32,198,216,.95);
  color:#fff;
  box-shadow:0 10px 28px rgba(0,0,0,.18);
}
.btnPrimary:disabled{ opacity:.5; cursor:not-allowed; }

/* Dropdown pill */
.selectPill{
  border-radius:999px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  font-weight:800;
}

/* 2 columns */
.twoCol{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width:560px){
  .twoCol{ grid-template-columns:1fr; }
}

/* =========================================================
   Metrics / Docs (wide work area) UI helpers
   ========================================================= */

/* KPI row */
.kpiGrid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}
@media (max-width: 1100px){
  .kpiGrid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .kpiGrid{ grid-template-columns: 1fr; }
}

.kpiCard{
  background: rgba(245,247,255,.86);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow:0 18px 60px rgba(0,0,0,.20);
}
.kpiCard__k{ font-size:12px; font-weight:800; color:rgba(0,0,0,.55); }
.kpiCard__v{ font-size:26px; font-weight:900; margin-top:6px; }
.kpiCard__s{ font-size:12px; color:rgba(0,0,0,.55); margin-top:6px; }

/* section block */
.block{
  margin-top:14px;
  background: rgba(245,247,255,.86);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow:0 18px 60px rgba(0,0,0,.18);
}
.block__title{ font-weight:900; font-size:14px; margin-bottom:10px; }

/* clean table */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
}
.table th,
.table td{
  text-align:left;
  padding:10px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-size:14px;
  white-space: nowrap;
}
.table th{ font-weight:900; color:#111; }
.table td{ color:#111; }

.tableWrap{
  width:100%;
  overflow:auto;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.60);
}

/* links list */
.linksList{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
  line-height:1.6;
}
.linksList .row{
  display:flex;
  gap:8px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.linksList .key{
  font-weight:900;
  color: rgba(0,0,0,.65);
}
.linksList a{
  color:#111;
  font-weight:800;
  text-decoration:underline;
  word-break:break-word;
}

/* small title used in docs */
.hTitle{
  font-size:28px;
  font-weight:900;
  margin:0;
}
/* --- Metrics/Docs spacing fix: make blocks evenly separated --- */
.view__content--wide{
  display: flex;
  flex-direction: column;
  gap: 16px;            /* chỉnh 14/16/18 tùy ý */
}

/* Avoid double-spacing if some blocks already have margin */
.view__content--wide .block,
.view__content--wide .kpiGrid{
  margin: 0 !important;
}