/* =========================
   Reality Node Community Dashboard
   ========================= */

:root{
  --bg0: #06101f;
  --bg1: rgba(255,255,255,0.04);
  --bg2: rgba(255,255,255,0.06);
  --bd1: rgba(255,255,255,0.10);
  --bd2: rgba(255,255,255,0.16);
  --txt: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --muted2: rgba(255,255,255,0.58);

  --good: #2ecc71;
  --bad: #ff4d4d;
  --warn: #f7c948;

  --shadow: 0 18px 60px rgba(0,0,0,0.38);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(46,204,113,0.08), transparent 60%),
    radial-gradient(900px 520px at 80% 0%, rgba(247,201,72,0.06), transparent 55%),
    var(--bg0);
  color: var(--txt);
}

a{ color: inherit; }
.small{ font-size: 12px; color: var(--muted2); }
code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

/* =========================
   TOPBAR
   ========================= */

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(6,16,31,0.72);
  backdrop-filter: blur(10px);
}

.title{
  display:flex;
  align-items:center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 320px;
}

.titleMain{
  font-weight: 900;
  letter-spacing: .1px;
}

.dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(247,201,72,0.9), rgba(46,204,113,0.85));
  box-shadow: 0 0 0 4px rgba(247,201,72,0.08);
}

.actions{
  flex: 0 0 auto;
}

.actionsRow{
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.times{
  text-align:right;
  line-height:1.25;
  margin-top: 2px;
}

/* ===== Topnav: clean segmented (final) ===== */
.topnav{
  flex: 1 1 auto;
  display:flex;
  justify-content:center;
  align-items:center;
  min-width: 220px;
}

.topnavInner{
  display:inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
}

.navLink{
  position: relative;
  display:inline-flex;
  align-items:center;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 900;
  font-size: 13px;
  color: rgba(255,255,255,0.68);
  border: 1px solid transparent;
  background: transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}




/* =========================
   CENTER NAV
   ========================= */

.topnav{
  flex: 1 1 auto;
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  min-width: 180px;
}

.navLink{
  display:inline-flex;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
  color: rgba(255,255,255,0.82);
    background: rgba(46,204,113,0.10);
  border-color: rgba(46,204,113,0.35);

  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}

.navLink:hover{
  transform: translateY(-1px);
  background: var(--bg2);
  border-color: var(--bd2);
  color: rgba(255,255,255,0.92);
}

.navLink.isActive{
  background: var(--bg1);
  border: 1px solid var(--bd1);
  color: rgba(255,255,255,0.96);
}

/* =========================
   CONTAINER / SECTIONS
   ========================= */

.container{
  max-width: 1240px;
  margin: 18px auto 28px auto;
  padding: 0 16px;
}

.pageSection{
  scroll-margin-top: 92px;
  margin-bottom: 22px;
}

.sectionTitle{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 12px;
  margin: 14px 0 10px;
  font-weight: 900;
}

.sectionTitle > div:first-child{
  font-size: 16px;
}

.sectionHint{
  font-size: 12px;
  color: var(--muted2);
  font-weight: 700;
}

/* =========================
   GRID / CARDS
   ========================= */

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1100px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: var(--bg1);
  border: 1px solid var(--bd1);
  border-radius: 12px;
  overflow:hidden;
  box-shadow: 0 8px 26px rgba(0,0,0,0.22);
}

.cardHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 12px 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cardBody{
  padding: 10px 12px 12px;
}

.hostLine{
  display:flex;
  flex-direction:column;
  gap: 2px;
  min-width: 0;
}
.hostName{
  font-weight: 950;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hostSub{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hostUrl{
  font-size: 12px;
  color: var(--muted2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================
   DETAILS
   ========================= */

details{
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow:hidden;
}

summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 10px;
}

summary::-webkit-details-marker{ display:none; }

.sumLeft{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap: 2px;
}
.sumTitle{
  font-weight: 900;
  font-size: 13px;
}
.sumMeta{
  font-size: 12px;
  color: var(--muted2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chev{
  color: var(--muted2);
  font-weight: 900;
  transform: translateY(-1px);
}

details[open] summary .chev{
  transform: rotate(180deg);
}

.content{
  padding: 0 10px 10px 10px;
}

pre{
  margin: 10px 0 0 0;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.25);
  overflow:auto;
  max-height: 320px;
}

/* =========================
   KV
   ========================= */

.kv{
  display:grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
}
.k{
  font-size: 12px;
  color: var(--muted2);
  font-weight: 800;
}
.v{
  font-size: 12px;
  color: rgba(255,255,255,0.88);
  word-break: break-word;
}

/* =========================
   FOOTER LINE ON CARDS
   ========================= */

.footer{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  margin-top: 10px;
}

.tag{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

/* =========================
   STATUS PILL + LED
   ========================= */

.statusPill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.86);
  font-size: 12px;
  user-select:none;
  white-space: nowrap;
}

.statusPillTight{
  padding: 6px 10px;
  gap: 8px;
}

.pillStrong{
  font-weight: 900;
}

.led{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.led.good{
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(46,204,113,0.12);
}
.led.bad{
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(255,77,77,0.12);
}
.ledGlow{
  box-shadow: 0 0 0 4px rgba(46,204,113,0.10);
}

/* Spinner control via class */
.spinIcon{
  display:inline-grid;
  place-items:center;
  width: 14px;
  height: 14px;
}
.isSpinning{
  animation: rnSpin .9s linear infinite;
}

/* =========================
   ERROR BOX / NOTE BOX
   ========================= */

.errorBox{
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,77,77,0.35);
  background: rgba(255,77,77,0.06);
}
.errorTitle{
  font-weight: 900;
  margin-bottom: 4px;
}

.noteBox{
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(247,201,72,0.30);
  background: rgba(247,201,72,0.06);
}
.noteTitle{
  font-weight: 900;
  margin-bottom: 6px;
}

.hintLine{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted2);
}

/* =========================
   OWN BLOCK
   ========================= */

.ownBlock hr{
  border: none;
  border-top: 1px solid rgba(255,255,255,0.10);
  margin: 18px 0 10px;
}

/* =========================
   FOOTER BAR
   ========================= */

.footerBar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.20);
}

.footerLeft, .footerRight{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted2);
  font-size: 12px;
}

.footerTag{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-weight: 800;
}

/* =========================
   FAB + MODAL
   ========================= */

.luukFab{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  box-shadow: var(--shadow);
  cursor:pointer;
  display:grid;
  place-items:center;
  transition: transform .12s ease, background .12s ease;
  z-index: 60;
}
.luukFab:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.09);
}
.luukFab img{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
}

.luukModal{
  position: fixed;
  inset: 0;
  display:none;
  z-index: 80;
}
.luukModal.isOpen{
  display:block;
}

.luukModalOverlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}

.luukModalCard{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 28px));
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(6,16,31,0.92);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.luukModalClose{
  position:absolute;
  right: 10px;
  top: 8px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-size: 20px;
  cursor:pointer;
}

.luukModalHeader{
  display:flex;
  gap: 12px;
  padding: 14px;
  align-items:center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.luukModalAvatar{
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
}

.luukModalHeaderText{
  display:flex;
  flex-direction:column;
  gap: 2px;
}

.luukModalName{
  font-weight: 950;
  font-size: 16px;
}

.luukModalBadge{
  display:inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(46,204,113,0.28);
  background: rgba(46,204,113,0.08);
  color: rgba(255,255,255,0.86);
  font-size: 12px;
  font-weight: 900;
}

.luukModalText{
  padding: 12px 14px 0 14px;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
}

.luukModalMedia{
  padding: 12px 14px;
}
.luukModalMedia video{
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.35);
}

.luukModalActions{
  padding: 0 14px 14px 14px;
  display:flex;
  gap: 10px;
}

.luukModalBtn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
  transition: transform .12s ease, background .12s ease;
}
.luukModalBtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.09);
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes rnSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.led.warn{
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(247,201,72,0.14);
}

.soonHint {margin-top: 30px;}

