:root{
  --bg:#0b0f17;
  --panel:#0f1624;
  --panel2:#0c1320;
  --muted:#9fb0cc;
  --text:#e8f0ff;
  --line:rgba(255,255,255,.10);
  --soft:rgba(255,255,255,.06);
  --accent:#7c5cff;
  --accent2:#2de2e6;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:14px;
  --radius2:18px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --sidebarFull: 300px;
  --sidebarCollapsed: 86px;
  --rightbar: 320px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(124,92,255,.12), transparent 55%),
    radial-gradient(1000px 700px at 85% 25%, rgba(45,226,230,.10), transparent 55%),
    linear-gradient(180deg, #070a10, #0b0f17 40%, #070a10);
  color:var(--text);
  overflow:auto;
}

a{color:inherit;text-decoration:none}
button, input{font-family:inherit}

.app{
  display:grid;
  grid-template-columns: var(--sidebarFull) 1fr var(--rightbar);
  min-height:100vh;
  transition: grid-template-columns .18s ease;
}
.app.sidebar-collapsed{
  grid-template-columns: var(--sidebarCollapsed) 1fr var(--rightbar);
}

/* Sidebar (from dashboard7, minus footer) */
.sidebar{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border-right:1px solid var(--line);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:14px;
  overflow:visible;
  position:relative;
  z-index:5;
  transition: padding .18s ease;
}
.sidebar.collapsed{ padding:16px 10px; }

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
}
.logo{
  width:42px;height:42px;border-radius:14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.25), transparent 40%),
    linear-gradient(135deg, rgba(124,92,255,.9), rgba(45,226,230,.7));
  position:relative;
  flex:0 0 auto;
}
.logo:after{
  content:"";
  position:absolute; inset:9px;
  border-radius:12px;
  background:rgba(10,14,22,.45);
  border:1px solid rgba(255,255,255,.14);
}
.brandText{ min-width:0; }
.brand h1{ font-size:14px; margin:0; line-height:1.1; letter-spacing:.5px; }
.brand p{ margin:3px 0 0; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar.collapsed .brandText{ display:none; }

.nav{
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  border-radius: var(--radius2);
  padding:8px;
  overflow:visible;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.navHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 10px 8px;
  color:var(--muted);
  font-size:12px;
  letter-spacing:.4px;
  text-transform:uppercase;
}
.navHeaderRight{ display:flex; align-items:center; gap:8px; }

.navToggle{
  width:34px;height:34px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.20);
  color:var(--text);
  cursor:pointer;
  display:grid;
  place-items:center;
  transition:.12s ease;
  text-transform:none;
}
.navToggle:hover{ background:rgba(255,255,255,.04); }
.navToggle span{ font-size:16px; color:rgba(255,255,255,.85); }

.navList{
  overflow:auto;
  padding:6px;
  border-top:1px solid var(--line);
  position:relative;
}
.navItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 10px;
  border-radius:12px;
  cursor:pointer;
  border:1px solid transparent;
  transition: .15s ease;
  user-select:none;
  position:relative;
  outline:none;
}
.navItem:hover{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
}
.navItem.active{
  background:linear-gradient(90deg, rgba(124,92,255,.20), rgba(45,226,230,.12));
  border-color:rgba(124,92,255,.35);
  box-shadow: 0 10px 25px rgba(124,92,255,.10);
}
.navLeft{ display:flex; align-items:center; gap:10px; min-width:0; }
.icon{
  width:28px;height:28px;border-radius:10px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.20);
  display:grid; place-items:center;
  flex:0 0 auto;
  color:rgba(255,255,255,.85);
  font-size:13px;
}
.navText{ display:flex; flex-direction:column; min-width:0; }
.navTitle{ font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-transform:none; color:var(--text);}
.navSub{ font-size:11px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-transform:none; }

.sidebar.collapsed .navHeader{ padding:10px 8px 8px; }
.sidebar.collapsed .navHeaderLeft{ display:none; }
.sidebar.collapsed .navList{ border-top:1px solid var(--line); padding:6px 2px; }
.sidebar.collapsed .navItem{ justify-content:center; padding:10px 8px; }
.sidebar.collapsed .navText{ display:none; }

/* Tooltip for collapsed sidebar */
#navHoverTooltip{
  position:fixed;
  left:0; top:0;
  transform: translate(0,0);
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(12,19,32,.96);
  box-shadow: var(--shadow);
  z-index:9999;
  display:none;
  pointer-events:none;
  min-width: 180px;
  max-width: 260px;
}
#navHoverTooltip .t1{
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#navHoverTooltip .t2{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

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


/* Right sidebar (replaces topbar profile area) */
.rightbar{
  background:rgba(0,0,0,0);
  height:100vh;
  overflow:visible;
  position:sticky;
  top:0;
}
.rightbarInner{
  padding:14px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:flex-start;
  gap:14px;
  min-height:100%;
}
.rightbarTop{
  display:flex;
  justify-content:flex-end;
}
.rightbarBody{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.rightbarCard{
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  border-radius: var(--radius2);
  padding:12px;
}
.rbLabel{ font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; }
.rbValue{ margin-top:6px; font-size:13px; }
.rightbarHint{
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
  padding:10px 12px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.14);
  background:rgba(255,255,255,.01);
}

/* On smaller screens, keep the account sidebar but make it slimmer */
@media (max-width: 1100px){
  :root{ --rightbar: 260px; }
}
/* Topbar: only profile menu (from dashboard.html profileWrap) */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
}
.topbarLeft{ min-height:1px; }
.topbarRight{ display:flex; align-items:center; gap:10px; }

.profileWrap{ position:relative; }
.profileBtn{
  display:flex; align-items:center; gap:10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  padding:8px 10px;
  border-radius:16px;
  cursor:pointer;
  transition:.15s ease;
  max-width:320px;
  color:var(--text);
}
.profileBtn:hover{ background:rgba(255,255,255,.04); }
.profileTiny{
  width:32px;height:32px;border-radius:14px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.20), transparent 55%),
              linear-gradient(135deg, rgba(45,226,230,.6), rgba(124,92,255,.5));
  border:1px solid rgba(255,255,255,.14);
  flex:0 0 auto;
}
.profileText{ min-width:0; display:flex; flex-direction:column; line-height:1.15; }
.profileText .p1{
  font-size:13px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.profileText .p2{
  font-size:11px;color:var(--muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  margin-top:2px;
}
.caret{ color:var(--muted); font-size:12px; margin-left:2px; }

.menu{
  position:absolute;
  right:0; top:calc(100% + 10px);
  width:260px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(12,19,32,.95);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:none;
  z-index:20;
}
.menu.open{ display:block; }
.menuHead{
  padding:12px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.02);
}
.menuHead .mh1{ font-size:13px; margin:0; }
.menuHead .mh2{ font-size:12px; color:var(--muted); margin:4px 0 0; }

.menuItem{
  padding:10px 12px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  transition:.12s ease;
  border-bottom:1px solid rgba(255,255,255,.06);
  font-size:13px;
}
.menuItem:hover{ background:rgba(255,255,255,.04); }
.menuItem:last-child{ border-bottom:0; }
.menuItem.danger{ color: rgba(255,77,109,.95); }
.miIcon{ width:22px; display:inline-grid; place-items:center; }

.menuDivider{
  height:1px;
  background:rgba(255,255,255,.08);
}

/* Content */
.content{
  padding:18px;
  overflow:visible;
}
.card{
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
  max-width: 1100px;
}
.cardHead{
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.cardHead h3{ margin:0; font-size:14px; letter-spacing:.2px; }
.cardHead .sub{ font-size:12px; color:var(--muted); }
.cardBody{ padding:14px; }
.empty{
  padding:24px;
  border:1px dashed rgba(255,255,255,.16);
  border-radius:16px;
  color:var(--muted);
  background:rgba(0,0,0,.18);
  line-height:1.35;
}

/* Responsive */
@media (max-width: 980px){
  body{ overflow:auto; }
  .app{ grid-template-columns: 1fr; height:auto; }
  .sidebar{ position:sticky; top:0; z-index:10; }
}

/* Demo audience pill */
.pill{display:inline-block;margin-left:8px;padding:2px 8px;border:1px solid var(--line);border-radius:999px;font-size:11px;line-height:1.6;color:var(--muted);background:rgba(255,255,255,.04);}

/* Simple form + button helpers (used in Join Code / New Appointment / Demo Login) */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width: 900px){.grid2{grid-template-columns:1fr}}
.label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}
.hint{margin-top:10px;font-size:12px;color:var(--muted);opacity:.9}

.btn,.btnGhost{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 12px;border-radius:12px;font-weight:600;font-size:14px;
  border:1px solid var(--line);cursor:pointer;text-decoration:none;
  background:rgba(255,255,255,.06);color:var(--text);
}
.btn:hover{background:rgba(255,255,255,.09)}
.btnGhost{background:transparent}
.btnGhost:hover{background:rgba(255,255,255,.05)}

/* Client Management section header + tabs */
.cmHead{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}
.cmHeadLeft h2{margin:0;font-size:28px;letter-spacing:.2px}
.cmSub{color:var(--muted);margin-top:4px}
.cmHeadRight{display:flex;align-items:center;gap:10px}
.cmTabs{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0 8px}
.cmTab{padding:10px 14px;border-radius:12px;text-decoration:none;color:var(--muted);
  border:1px solid transparent;background:rgba(255,255,255,.02)}
.cmTab:hover{background:rgba(255,255,255,.05);color:var(--text)}
.cmTab.active{background:rgba(255,255,255,.06);border-color:var(--line);color:var(--text)}
.cmDivider{height:1px;background:var(--line);margin-bottom:14px}

/* -------------------------------
   Module header + sub-tabs (example1-6)
-------------------------------- */
.moduleHeader{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:10px}
.moduleHeader__title{font-size:26px;font-weight:700;letter-spacing:.2px}
.moduleHeader__subtitle{margin-top:4px;color:rgba(255,255,255,.7);font-size:13px}

.moduleTabs{display:flex;gap:10px;align-items:center;margin-top:12px}
.moduleTab{padding:10px 14px;border-radius:10px;color:rgba(255,255,255,.75);text-decoration:none;font-weight:600}
.moduleTab:hover{color:#fff;background:rgba(255,255,255,.06)}
.moduleTab.is-active{color:#fff;background:rgba(255,255,255,.08);box-shadow:inset 0 -2px 0 rgba(64,146,255,.95)}
.moduleTabs__rule{height:1px;background:rgba(255,255,255,.12);margin:12px 0 16px}


/* ================================
   Module tab shell (subnavtest UI)
================================ */
.pageShell{
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
  max-width: 1120px;
}
.pageHeader{
  padding:18px 18px 14px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.pageHeaderLeft{ min-width:0; }
.pageHeaderLeft h2{
  margin:0;
  font-size:20px;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pageHeaderLeft p{
  margin:6px 0 0;
  font-size:13px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pageHeaderRight{
  display:flex;
  gap:10px;
  flex:0 0 auto;
  align-items:center;
}
.ghostBtn{
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.18);
  color:var(--text);
  padding:8px 12px;
  border-radius:12px;
  cursor:pointer;
  transition:.12s ease;
  font-size:13px;
  white-space:nowrap;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ghostBtn:hover{ background:rgba(255,255,255,.04); }

.tabsBar{
  border-top:1px solid rgba(255,255,255,.10);
  padding:0 10px;
}
.tabs{
  display:flex;
  gap:2px;
  align-items:flex-end;
  overflow:auto;
  padding:10px 6px 0;
}
.tab{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 16px 11px;
  border-radius:14px 14px 0 0;
  color:rgba(255,255,255,.72);
  text-decoration:none;
  border:1px solid transparent;
  border-bottom:0;
  transition:.12s ease;
  white-space:nowrap;
  font-size:14px;
}
.tab:hover{
  color:rgba(255,255,255,.92);
  background:rgba(255,255,255,.03);
  border-color:rgba(255,255,255,.08);
}
.tab.active{
  color:var(--text);
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.12);
  box-shadow: 0 12px 26px rgba(0,0,0,.25);
}
.tabsUnderline{
  height:1px;
  background:rgba(255,255,255,.10);
  margin-top:-1px;
}
.panelBody{
  padding:18px;
}
.empty{
  padding:24px;
  border:1px dashed rgba(255,255,255,.16);
  border-radius:16px;
  color:var(--muted);
  background:rgba(0,0,0,.18);
  line-height:1.35;
}

