/* B7oothKw app shell — the Grade A dashboard layout.
   Ported from the Grade A humanizer's style.css so the two sites read as one
   product family: same 236px collapsible sidebar, same nav treatment, same
   content/view split, same mobile top-bar collapse. The ONLY deliberate
   difference is the accent: B7oothKw stays on its own red (--acc/--acc2 from
   humanizer.css) where Grade A is indigo. Every other token already matched.

   The sidebar markup itself is built once in js/shell.js — five hand-copied
   copies would drift the moment one page gained a link. */

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- shell ---------- */
body.hz-page{overflow:hidden}                 /* the panes scroll, not the page */
.app-shell{display:flex;height:100vh;position:relative}

.sidebar{
  width:236px;flex:0 0 236px;display:flex;flex-direction:column;position:relative;
  border-right:1px solid var(--line);background:rgba(12,15,21,.55);
  padding:16px 14px;backdrop-filter:blur(8px);white-space:nowrap;
  transition:width .22s ease, flex-basis .22s ease, padding .22s ease;
}
body.hz-page.light .sidebar{background:rgba(255,255,255,.7)}

/* collapse toggle, riding the sidebar's edge */
.sidebar-toggle{
  position:absolute;top:50%;left:224px;transform:translateY(-50%);
  width:24px;height:24px;border-radius:50%;z-index:60;cursor:pointer;
  background:var(--panel2);border:1px solid var(--line2);color:var(--mut);
  display:flex;align-items:center;justify-content:center;font-size:15px;
  box-shadow:0 2px 8px rgba(0,0,0,.3);transition:left .22s ease, background .15s, color .15s;
}
.sidebar-toggle:hover{background:var(--panel);color:var(--ink)}
.sidebar-toggle .chev{display:block;line-height:1;transition:transform .22s ease;margin-top:-1px}
.app-shell.collapsed .sidebar{flex-basis:0;width:0;padding-left:0;padding-right:0;overflow:hidden;border-right:0}
.app-shell.collapsed .sidebar-toggle{left:6px}
.app-shell.collapsed .sidebar-toggle .chev{transform:rotate(180deg)}

/* ---------- brand ---------- */
.side-brand{padding:4px 6px 14px;border-bottom:1px solid var(--line);margin-bottom:12px}
.side-brand .logo-link{display:block}
.side-brand .logo-svg{height:42px;width:auto;display:block;transform-origin:left center}

/* theme toggle sits in the sidebar's top-right, as on Grade A */
.hz-page .theme-toggle{position:absolute;top:26px;right:14px;z-index:6;
  width:30px;height:30px;display:flex;align-items:center;justify-content:center;
  font-size:14px;cursor:pointer;border-radius:8px;
  background:transparent;border:1px solid var(--line2);color:var(--mut);transition:.15s}
.hz-page .theme-toggle:hover{background:var(--panel2);color:var(--ink)}

/* ---------- nav ---------- */
.nav{display:flex;flex-direction:column;gap:4px;flex:1}
.nav-group-label{font-size:11px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;
  color:var(--faint);padding:14px 13px 5px}
.nav-group-label:first-child{padding-top:2px}
.nav-item{
  display:flex;align-items:center;gap:11px;text-decoration:none;
  padding:11px 13px;border-radius:10px;color:var(--mut);
  font-size:15px;font-weight:700;letter-spacing:-.3px;transition:.15s;cursor:pointer;
}
/* .hidden lives in styles.css, which loads FIRST — display:flex above would beat it
   on equal specificity. Restate it so a hidden staff link is actually hidden. */
.nav-item.hidden,.nav-group-label.hidden{display:none}
.nav-item:hover{background:var(--panel2);color:var(--ink)}
.nav-item.active{background:linear-gradient(135deg,rgba(255,49,49,.20),rgba(255,106,77,.14));
  color:var(--ink);box-shadow:inset 0 0 0 1px var(--line2)}
.nav-ic{font-size:15px;width:18px;text-align:center;flex:0 0 18px}
.nav-item[data-view="humanizer"] .nav-ic{color:var(--acc)}
.nav-item[data-view="plans"] .nav-ic{color:#f4b03c}
.nav-sep{height:1px;background:var(--line);margin:9px 10px}
/* unread count, pushed to the far edge of its nav item */
.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;
  padding:0 6px;margin-left:auto;border-radius:999px;background:var(--bad);color:#fff;
  font-size:11px;font-weight:800;line-height:1;box-shadow:0 0 0 3px rgba(248,81,73,.18)}
.nav-badge.hidden{display:none}
/* One box for every image/SVG nav mark, whatever its aspect ratio: contain it and
   pin it left, so the labels beside them all start on the same x as the text ones. */
.nav-tn-icon{flex:0 0 18px;width:18px;height:18px;display:block;
  object-fit:contain;object-position:left center}
.nav-tn-word{font-size:15px;font-weight:700;color:inherit;letter-spacing:-.3px;line-height:1}
.nav-tn-word sup{font-size:7px;vertical-align:super;opacity:.6}
/* the glyph carries its own brand green (fill on the <svg>); only the label shifts */
.nav-wa:hover{color:#25d366}

/* ---------- account + legal ---------- */
.side-foot{border-top:1px solid var(--line);padding-top:12px;margin-top:8px}
.acct-chip{display:flex;align-items:center;gap:10px;width:100%;padding:8px 9px;border-radius:10px;
  background:transparent;border:1px solid transparent;color:var(--ink);
  font-family:inherit;font-size:13.5px;font-weight:650;cursor:pointer;text-align:left;transition:.15s}
.acct-chip:hover{background:var(--panel2);border-color:var(--line2)}
.acct-avatar{flex:0 0 28px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  font-size:12px;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--acc),var(--acc2))}
.acct-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acct-sub{display:block;font-size:11px;font-weight:600;color:var(--faint)}

.side-legal{display:flex;flex-wrap:wrap;gap:4px 10px;padding:10px 4px 0;margin-top:8px;
  border-top:1px solid var(--line)}
.side-legal a{color:var(--faint);font-size:11.5px;text-decoration:none;transition:color .15s}
.side-legal a:hover{color:var(--ink)}

/* mobile hamburger — hidden on desktop, where the nav is always open */
.nav-burger{display:none;background:transparent;border:1px solid var(--line2);border-radius:10px;
  width:42px;height:40px;cursor:pointer;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;padding:0;transition:border-color .15s,background .15s}
.nav-burger:hover{border-color:var(--acc);background:var(--panel2)}
.nav-burger span{display:block;width:18px;height:2px;background:var(--ink);border-radius:2px;
  transition:transform .22s ease,opacity .18s ease}
.sidebar.menu-open .nav-burger span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.sidebar.menu-open .nav-burger span:nth-child(2){opacity:0}
.sidebar.menu-open .nav-burger span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

/* ---------- content ---------- */
/* .content IS a <main>, and styles.css caps every main at 1100px and centres it —
   which left the workspace floating in the middle of the shell. Undo all three. */
.content{flex:1;min-width:0;max-width:none;margin:0;padding:0;
  display:flex;flex-direction:column;overflow:hidden;position:relative}
.view{flex:1;min-height:0;display:flex;flex-direction:column;overflow:auto;padding:18px 22px}
.view-title{font-size:22px;font-weight:800;margin:0 0 4px;display:flex;align-items:center;gap:8px}
.view-sub{color:var(--mut);font-size:13.5px;margin:0 0 16px}
.title-tn-icon{height:26px;width:auto;display:block}

/* ---------- responsive: the sidebar becomes a top bar ---------- */
@media (max-width:820px){
  body.hz-page{overflow:auto}
  html,body{height:auto}
  .app-shell{flex-direction:column;height:auto;min-height:100dvh}

  .sidebar{
    width:100%;flex:0 0 auto;flex-direction:row;flex-wrap:wrap;align-items:center;gap:10px;
    border-right:0;border-bottom:1px solid var(--line);padding:10px 14px;
  }
  .side-brand{flex:1 1 auto;border-bottom:0;margin:0;padding:0;order:1}
  .side-brand .logo-svg{height:34px}
  .hz-page .theme-toggle{position:static;order:3;flex:0 0 auto;width:38px;height:38px;font-size:15px}
  .nav-burger{display:inline-flex;order:4;flex:0 0 auto;width:38px;height:38px}
  .side-foot{order:2;border-top:0;padding:0;margin:0;flex:0 0 auto}
  .acct-chip{width:38px;height:38px;justify-content:center;padding:0;gap:0;
    border:1px solid var(--line2);border-radius:10px}
  .acct-text{display:none}

  .nav{display:none}
  .sidebar.menu-open{z-index:100}
  .sidebar.menu-open .nav{
    display:flex;flex-direction:column;gap:4px;
    position:absolute;left:0;right:0;top:100%;z-index:60;
    background:var(--panel);border-bottom:1px solid var(--line);
    padding:8px;box-shadow:0 18px 36px rgba(0,0,0,.5)}
  .sidebar.menu-open .nav-item{flex:0 0 auto;width:100%;justify-content:flex-start;
    padding:13px 14px;font-size:15px;white-space:normal;border-radius:10px}
  .sidebar-toggle{display:none}
  .app-shell.collapsed .sidebar{flex-basis:auto;width:100%;padding:10px 14px;overflow:visible;
    border-bottom:1px solid var(--line)}
  .side-legal{display:none}

  .content{overflow:visible;min-height:auto}
  .view{overflow:visible;min-height:auto;padding:14px}
}
