:root{
  --bg:#0b1020;
  --panel:#111833;
  --panel-2:#0f1630;
  --border:rgba(255,255,255,.08);
  --text:#e8ecff;
  --muted:rgba(232,236,255,.68);

  --ok:#2bd17e;
  --warn:#ffc857;
  --crit:#ff5a77;
  --info:#7aa8ff;

  --shadow: 0 14px 45px rgba(0,0,0,.35);
  --radius:16px;
  --radius-sm:12px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: radial-gradient(1100px 650px at 18% -10%, rgba(122,168,255,.18), transparent 60%),
              radial-gradient(900px 550px at 85% 0%, rgba(43,209,126,.10), transparent 55%),
              var(--bg);
  color:var(--text);
}

.app{
  display:grid;
  grid-template-columns: 300px 1fr;
  height: 100vh;
  overflow:hidden;
}

/* Sidebar */
.sidebar{
  border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.sidebarBrand{
  display:flex;
  gap:12px;
  align-items:center;
  padding: 12px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0,0,0,.12);
  box-shadow: var(--shadow);
}

.brandLogo{
  width: 62px;
  height: 62px;
  border-radius: 14px;            /* keep same silhouette as earlier */
  border: 1px solid var(--border);
  object-fit: contain;            /* logo stays fully visible */
  background: rgba(0,0,0,.10);    /* helps if PNG has transparency */
  padding: 1px;                   /* optional; remove if you want it tighter */
}
html[data-theme="light"] .brandLogo{
  background: rgba(255,255,255,.10);
}

.brandMark{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(43,209,126,.20), rgba(122,168,255,.18)),
    rgba(255,255,255,.03);
  position: relative;
  overflow:hidden;
}
.brandMark::before{
  content:"";
  position:absolute;
  inset:-8px;
  background:
    radial-gradient(18px 18px at 30% 40%, rgba(255,255,255,.25), transparent 60%),
    radial-gradient(22px 22px at 70% 20%, rgba(255,255,255,.16), transparent 60%);
}

.brandText{ line-height: 1.05; }
.brandText .kicker{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.brandText .name{
  margin-top: 2px;
  font-size: 14px;
  font-weight: 750;
}

.nav{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.navItem{
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
  color: rgba(232,236,255,.82);
  padding: 12px 12px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .10s ease, background .10s ease, border-color .10s ease;
  user-select:none;
  font-size: 13px;
  font-weight: 650;
}
.navItem:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.14);
}
.navItem.active{
  border-color: rgba(122,168,255,.32);
  background: rgba(122,168,255,.10);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(122,168,255,.06) inset;
}

.sidebarFooter{
  margin-top:auto;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0,0,0,.10);
  padding: 12px;
}
.hint{
  color: rgba(232,236,255,.58);
  font-size: 12px;
  line-height: 1.35;
}

/* Main */
.main{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 14px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.titleBlock{ line-height: 1.2; }
.title{
  font-size: 15px;
  font-weight: 850;
}
.subtitle{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.headerRight{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.segmented{
  display:flex;
  gap:6px;
  padding:6px;
  border:1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
}
.segBtn{
  border:0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, color .12s ease;
  user-select:none;
}
.segBtn:hover{ transform: translateY(-1px); }
.segBtn.active{
  background: rgba(122,168,255,.18);
  color: var(--text);
  border: 1px solid rgba(122,168,255,.25);
}

.pillBtn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: rgba(232,236,255,.86);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor:pointer;
  transition: transform .10s ease, background .10s ease;
  user-select:none;
}
.pillBtn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.05); }

.profile{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 8px 10px;
  border:1px solid var(--border);
  border-radius: 999px;
  background: rgba(0,0,0,.10);
}
.avatar{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
}
.profileText{ line-height:1.05; }
.pName{ font-size: 12px; font-weight: 800; }
.pRole{ margin-top: 2px; font-size: 11px; color: var(--muted); }

/* Content + sections */
.content{
  padding: 14px;
  overflow:auto;
  min-height: 0;
}

.usecase{
  display:none;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0,0,0,.10);
  box-shadow: var(--shadow);
  overflow:hidden;
  min-height: calc(100vh - 98px - 28px);
}
.usecase.active{ display:block; }

.ucFrameHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 12px;
  border-bottom:1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.ucName{
  font-size: 13px;
  font-weight: 850;
}
.ucMeta{
  display:flex;
  align-items:center;
  gap:10px;
  color: rgba(232,236,255,.72);
  font-size: 12px;
  user-select:none;
}
.dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(43,209,126,.75);
  box-shadow: 0 0 0 5px rgba(43,209,126,.10);
}

.ucFrame{
  width:100%;
  height: calc(100vh - 98px - 28px - 54px);
  border:0;
  background: transparent;
}

/* Toast */
.toast{
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 420px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(17,24,51,.92);
  color: rgba(232,236,255,.92);
  box-shadow: 0 18px 70px rgba(0,0,0,.5);
  display:none;
  font-size: 12px;
  line-height: 1.35;
}
.toast.show{ display:block; }

@media (max-width: 980px){
  .app{ grid-template-columns: 1fr; }
  .sidebar{ position: relative; }
  .usecase{ min-height: 70vh; }
  .ucFrame{ height: 70vh; }
}
