
:root{--bg:#f4f7fb;--panel:#fff;--panel2:#eef3f9;--text:#101827;--muted:#68758a;--line:#dbe3ee;--blue:#2563eb;--cyan:#06b6d4;--good:#16a34a;--warn:#d97706;--bad:#dc2626;--shadow:0 10px 30px rgba(28,45,75,.08);--radius:16px}
[data-theme=dark]{--bg:#08101c;--panel:#0e1928;--panel2:#132135;--text:#edf5ff;--muted:#94a5ba;--line:#21334a;--blue:#3b82f6;--cyan:#22d3ee;--shadow:0 14px 38px rgba(0,0,0,.25)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial;color:var(--text);background:var(--bg)}body{display:flex}.sidebar{position:fixed;inset:0 auto 0 0;width:250px;background:var(--panel);border-right:1px solid var(--line);padding:22px 14px;z-index:20}.brand{display:flex;gap:10px;align-items:center;padding:0 10px 22px;font-weight:900;letter-spacing:.12em}.brand i{width:12px;height:12px;border-radius:4px;background:linear-gradient(135deg,var(--blue),var(--cyan));box-shadow:0 0 24px color-mix(in srgb,var(--blue) 55%,transparent)}.navgroup{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em;margin:18px 12px 8px}.nav a{display:flex;align-items:center;gap:10px;color:var(--muted);text-decoration:none;padding:10px 12px;border-radius:10px;margin:2px 0;font-weight:650}.nav a:hover,.nav a.active{background:var(--panel2);color:var(--text)}.nav a.active{box-shadow:inset 3px 0 0 var(--blue)}.main{width:calc(100% - 250px);margin-left:250px}.topbar{height:68px;background:color-mix(in srgb,var(--panel) 92%,transparent);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10;backdrop-filter:blur(12px)}.content{max-width:1500px;margin:auto;padding:28px}.pagehead{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:22px}.pagehead h1{margin:0;font-size:28px}.muted{color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}.kpi .label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.kpi .value{font-size:30px;font-weight:850;margin-top:8px}.badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:var(--panel2);font-size:11px;font-weight:800;text-transform:uppercase}.badge.good{color:var(--good)}.badge.warn{color:var(--warn)}.badge.bad{color:var(--bad)}.btn{border:1px solid var(--line);background:var(--panel);color:var(--text);padding:10px 14px;border-radius:10px;font-weight:750;cursor:pointer}.btn.primary{background:var(--blue);border-color:var(--blue);color:white}.btn.danger{background:var(--bad);border-color:var(--bad);color:white}.btn:disabled{opacity:.5}.field{margin:12px 0}.field label{display:block;font-size:12px;color:var(--muted);font-weight:700;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);background:var(--panel);color:var(--text);padding:11px 12px;border-radius:10px;font:inherit}.field textarea{min-height:100px}.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel)}table{width:100%;border-collapse:collapse;min-width:720px}th,td{text-align:left;padding:13px 14px;border-bottom:1px solid var(--line)}th{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}tr:last-child td{border-bottom:0}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.split{display:flex;justify-content:space-between;gap:14px;align-items:center}.loginwrap{min-height:100vh;display:grid;place-items:center;width:100%;padding:20px}.login{width:min(440px,100%)}.login h1{margin:0 0 6px}.msg{padding:11px;border-radius:10px;margin-top:12px;background:var(--panel2);color:var(--muted)}.canvas-wrap{background:#060b13;border:1px solid var(--line);border-radius:16px;padding:14px;overflow:auto}.b7canvas{position:relative;width:1024px;height:600px;transform-origin:top left;overflow:hidden;background:#07101c;color:white;border-radius:10px;box-shadow:0 25px 80px rgba(0,0,0,.35)}.b7bg{position:absolute;inset:-6%;background-position:center;background-size:cover}.b7shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(3,9,17,.88),rgba(3,9,17,.18) 75%,rgba(3,9,17,.35))}.b7title,.b7text,.b7button{position:absolute;z-index:2}.b7title{left:70px;top:160px;font-size:68px;font-weight:900;line-height:.95}.b7text{left:74px;top:320px;font-size:24px;max-width:490px;color:#dce8f7}.b7button{left:74px;top:440px;border:1px solid #4da3ff;background:#2563ebcc;padding:17px 26px;border-radius:999px;font-weight:850}.kenburns{animation:ken 12s ease-in-out infinite alternate}@keyframes ken{from{transform:scale(1.03) translate(1%,0)}to{transform:scale(1.14) translate(-2%,-1%)}}@media(max-width:900px){.sidebar{transform:translateX(-100%)}.main{margin-left:0;width:100%}.grid{grid-template-columns:1fr 1fr}.grid2{grid-template-columns:1fr}.content{padding:18px}.topbar{padding:0 18px}}@media(max-width:560px){.grid{grid-template-columns:1fr}.pagehead{flex-direction:column}}

/* ===== Devices mobile layout ===== */
@media (max-width: 700px) {
  .tablewrap {
    overflow: visible;
    border: 0;
  }

  .tablewrap table,
  .tablewrap thead,
  .tablewrap tbody,
  .tablewrap tr,
  .tablewrap th,
  .tablewrap td {
    display: block;
    width: 100%;
  }

  .tablewrap thead {
    display: none;
  }

  .tablewrap tbody tr {
    margin: 0 0 16px 0;
    padding: 16px;
    border: 1px solid var(--border, #454b57);
    border-radius: 16px;
    background: rgba(255,255,255,.02);
  }

  .tablewrap tbody td {
    box-sizing: border-box;
    padding: 7px 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tablewrap tbody td:nth-child(1)::before {
    content: "DEVICE";
  }

  .tablewrap tbody td:nth-child(2)::before {
    content: "MODEL";
  }

  .tablewrap tbody td:nth-child(3)::before {
    content: "TOPOLOGY";
  }

  .tablewrap tbody td:nth-child(4)::before {
    content: "CAPABILITIES";
  }

  .tablewrap tbody td:nth-child(5)::before {
    content: "LANGUAGE";
  }

  .tablewrap tbody td:nth-child(6)::before {
    content: "LAST SEEN";
  }

  .tablewrap tbody td::before {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--muted, #aab4cc);
  }

  .tablewrap tbody td:first-child a {
    font-size: 18px;
  }
}

@media (max-width:700px){

  .tablewrap tbody tr{
    padding:14px 16px;
    margin-bottom:12px;
  }

  .tablewrap tbody td{
    padding:4px 0;
  }

  .tablewrap tbody td::before{
    margin-bottom:1px;
    font-size:11px;
  }

  .tablewrap tbody tr{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px 18px;
  }

  .tablewrap tbody td{
    display:block;
    width:auto;
  }

  .tablewrap tbody td:nth-child(1),
  .tablewrap tbody td:nth-child(4){
    grid-column:1 / -1;
  }

  .tablewrap tbody td:nth-child(1) a{
    font-size:17px;
  }
}

@media (max-width:700px){

  .tablewrap tbody tr{
    display:block;
    padding:14px 16px;
  }

  .tablewrap tbody td{
    display:block;
    width:100%;
    padding:5px 0;
  }

  .tablewrap tbody td:nth-child(1),
  .tablewrap tbody td:nth-child(2),
  .tablewrap tbody td:nth-child(3),
  .tablewrap tbody td:nth-child(4),
  .tablewrap tbody td:nth-child(5),
  .tablewrap tbody td:nth-child(6){
    grid-column:auto;
  }

}

/* FINAL mobile width fix */
@media (max-width:700px){

  html, body{
    width:100%;
    max-width:100%;
    overflow-x:hidden !important;
  }

  main,
  #content,
  .tablewrap{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box;
    overflow-x:hidden !important;
  }

  .tablewrap table{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    table-layout:fixed;
  }

  .tablewrap tbody,
  .tablewrap tbody tr{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .tablewrap tbody td{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-wrap:anywhere;
    word-break:break-word;
    box-sizing:border-box;
  }
}

/* Device NAME - mobile */
.device-name-mobile{
  display:none;
}

@media (max-width:700px){

  .device-name-desktop{
    display:none !important;
  }

  .device-name-mobile{
    display:block;
    margin-top:14px;
  }

  .device-name-mobile .mobile-label{
    display:block;
    font-size:14px;
    font-weight:700;
    letter-spacing:.04em;
    color:var(--muted);
    margin-bottom:4px;
  }
}




/* B7 Studio mobile preview */
@media (max-width:700px){
  .canvas-wrap{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
    box-sizing:border-box;
  }

  #scale{
    max-width:100%;
    margin:0 auto;
  }
}

/* V2.1 navigation + forms */
.menubtn{display:none}.navveil{display:none}.modalback{position:fixed;inset:0;background:rgba(2,8,18,.62);z-index:60;display:grid;place-items:center;padding:18px;backdrop-filter:blur(4px)}.modal{width:min(680px,100%);max-height:90vh;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:0 25px 90px rgba(0,0,0,.35)}.modal h2{margin:0}.modalactions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;flex-wrap:wrap}.checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.check{display:flex;gap:8px;align-items:center;padding:9px 10px;border:1px solid var(--line);border-radius:10px}.toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:14px}.toolbar .field{margin:0;min-width:150px}.statrow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.compact td{padding-top:9px;padding-bottom:9px}.dangertext{color:var(--bad)}.goodtext{color:var(--good)}
@media(max-width:900px){.menubtn{display:inline-flex}.sidebar{transition:transform .2s ease;box-shadow:18px 0 50px rgba(0,0,0,.25)}.sidebar.open{transform:translateX(0)!important}.navveil.open{display:block;position:fixed;inset:0;background:rgba(2,8,18,.45);z-index:15}.statrow{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.checks,.statrow{grid-template-columns:1fr}.modal{padding:16px}.topbar{height:62px}}

/* Generic mobile table labels. Pages opt in with data-label attributes. */
@media(max-width:700px){.tablewrap:not(.devices-wrap) tbody td::before{content:attr(data-label)!important;display:block;margin-bottom:2px;font-size:11px;font-weight:800;letter-spacing:.07em;color:var(--muted)}.tablewrap:not(.devices-wrap) tbody td:empty::before{display:block}}

/* ===== V2.2 Logs & Analytics ===== */
.logtabs{display:flex;gap:6px;margin:0 0 16px;border-bottom:1px solid var(--line);overflow:auto}.logtab{border:0;background:transparent;color:var(--muted);padding:11px 14px;font-weight:800;cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap}.logtab.active{color:var(--text);border-bottom-color:var(--blue)}.tabcount{display:inline-flex;min-width:20px;height:20px;padding:0 6px;align-items:center;justify-content:center;border-radius:999px;background:var(--panel2);font-size:10px;margin-left:4px}.logtoolbar .grow{flex:1;min-width:220px}.stats6{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:14px}.metricgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metricgrid>div{padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel2)}.metricgrid span{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}.metricgrid b{font-size:18px}.metricline{padding:10px 0;border-bottom:1px solid var(--line)}.metricline:last-child{border-bottom:0}.payload{display:block;max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}.warntext{color:var(--warn)}.smallvalue{font-size:20px!important;overflow-wrap:anywhere}.phaseline{display:flex;gap:0;overflow:auto;padding:8px 0}.phase{display:flex;gap:9px;align-items:center;min-width:170px;padding:10px 14px 10px 0;position:relative}.phase:not(:last-child):after{content:"";height:2px;background:var(--line);width:28px;margin-left:auto}.phaseidx{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--blue);color:#fff;font-weight:850;flex:0 0 auto}.eventstream{display:grid;gap:0}.eventitem{display:grid;grid-template-columns:18px 1fr;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}.eventitem:last-child{border-bottom:0}.eventdot{width:9px;height:9px;border-radius:50%;background:var(--good);margin-top:6px}.eventitem.warning .eventdot{background:var(--warn)}.eventitem.error .eventdot,.eventitem.critical .eventdot{background:var(--bad)}.eventitem code{display:block;margin-top:4px;color:var(--muted);overflow-wrap:anywhere}.jsonpretty{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--muted);font-size:12px}.chambercard h3{margin-top:0}details summary{cursor:pointer}
@media(max-width:1200px){.stats6{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.stats6{grid-template-columns:1fr 1fr}.metricgrid{grid-template-columns:1fr}.logtabs{margin-left:-4px;margin-right:-4px}.payload{max-width:100%}}

/* ===== V2.3 Device Detail + Live Telemetry ===== */
.dev-statusbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px 16px;margin-bottom:14px}.live-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--muted);margin-right:8px}.live-dot.on{background:var(--good);box-shadow:0 0 0 5px color-mix(in srgb,var(--good) 14%,transparent)}.live-dot.off{background:var(--bad)}.telemetry-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:14px}.telemetry-grid>div{border:1px solid var(--line);background:var(--panel2);border-radius:10px;padding:10px}.telemetry-grid span{display:block;color:var(--muted);font-size:11px}.telemetry-grid b{display:block;margin-top:3px;font-size:16px}.telemetry-grid small{display:block;margin-top:4px;color:var(--muted)}.telemetry-grid .sensorbox{grid-column:span 2}.telemetry-chart{width:100%;height:220px;border:1px solid var(--line);border-radius:12px;background:var(--panel2);color:var(--muted);overflow:visible}.live-kpis .smallvalue{font-size:18px!important}.metricline a{text-decoration:none;color:var(--text)}
@media(max-width:1100px){.telemetry-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.dev-statusbar{align-items:flex-start}.telemetry-grid{grid-template-columns:1fr}.telemetry-grid .sensorbox{grid-column:auto}.telemetry-chart{height:170px}}

/* ===== Fleet Dashboard mobile cards ===== */
@media(max-width:700px){

  .fleet-wrap thead{
    display:none;
  }

  .fleet-wrap tbody tr{
    display:block;
    padding:14px 16px;
    margin-bottom:12px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--panel2);
  }

  .fleet-wrap tbody td{
    display:block;
    width:100%;
    padding:8px 0;
    border:0;
  }

  .fleet-wrap tbody td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:3px;
    font-size:11px;
    font-weight:800;
    letter-spacing:.07em;
    color:var(--muted);
  }

  .fleet-wrap tbody td[data-label="DEVICE"]{
    padding-top:0;
    padding-bottom:12px;
    border-bottom:1px solid var(--line);
    margin-bottom:4px;
  }

  .fleet-wrap tbody td[data-label="DEVICE"]::before{
    display:none;
  }

  .fleet-wrap tbody td[data-label="DEVICE"] a{
    font-size:20px;
  }

}

/* ===== Fleet health summary ===== */
.health-mini{
  display:grid;
  grid-template-columns:repeat(2,minmax(90px,1fr));
  gap:6px 10px;
  min-width:220px;
}

.health-mini>div{
  padding:5px 7px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel2);
}

.health-mini span{
  display:block;
  font-size:10px;
  color:var(--muted);
  margin-bottom:2px;
}

.health-mini b{
  font-size:12px;
}

@media(max-width:700px){
  .health-mini{
    grid-template-columns:1fr 1fr;
    min-width:0;
  }
}

/* ===== Compact Fleet Health ===== */
.fleet-health{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  min-width:230px;
}

.fleet-health>div{
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel2);
}

.fleet-health span{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:700;
  margin-bottom:2px;
}

.fleet-health b{
  display:block;
  font-size:13px;
}

.fleet-health .wide{
  grid-column:auto;
}

@media(max-width:700px){

  .fleet-wrap tbody tr{
    padding:12px 14px;
  }

  .fleet-wrap tbody td{
    padding:5px 0;
  }

  .fleet-wrap tbody td[data-label="HEALTH"]{
    padding-top:10px;
  }

  .fleet-health{
    grid-template-columns:1fr 1fr;
    min-width:0;
    gap:6px;
  }

  .fleet-health>div{
    padding:7px;
  }

  .fleet-health .wide{
    grid-column:auto;
  }

  .fleet-wrap tbody td[data-label="LOCATION"],
  .fleet-wrap tbody td[data-label="LAST SEEN"]{
    padding-top:6px;
  }
}

/* ===== FINAL Fleet Health mobile override ===== */
@media(max-width:700px){

  .fleet-wrap td[data-label="HEALTH"]{
    display:block !important;
    width:100% !important;
    padding-top:10px !important;
  }

  .fleet-wrap td[data-label="HEALTH"] > .fleet-health{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  .fleet-wrap td[data-label="HEALTH"] > .fleet-health > div{
    display:block !important;
    min-width:0 !important;
    width:auto !important;
    padding:8px !important;
    border:1px solid var(--line) !important;
    border-radius:8px !important;
    background:var(--panel2) !important;
  }

  .fleet-wrap td[data-label="HEALTH"] > .fleet-health span{
    display:block !important;
    font-size:10px !important;
    margin-bottom:3px !important;
    color:var(--muted) !important;
  }

  .fleet-wrap td[data-label="HEALTH"] > .fleet-health b{
    display:block !important;
    font-size:13px !important;
  }

}

/* ===== Fleet Health value states ===== */
.health-good{
  color:var(--good) !important;
}

.health-warn{
  color:var(--warn) !important;
}

.health-bad{
  color:var(--bad) !important;
}

.health-neutral{
  color:var(--text) !important;
}

.health-na{
  color:var(--muted) !important;
}

/* ===== Fleet Live Cycle ===== */

.fleet-cycle{
  min-width:210px;
}

.fleet-cycle-head{
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--panel2);
}

.fleet-cycle-head span,
.fleet-cycle-grid span{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  margin-bottom:3px;
}

.fleet-cycle-head b{
  font-size:13px;
  overflow-wrap:anywhere;
}

.fleet-cycle.active .fleet-cycle-head b{
  color:var(--good);
}

.fleet-cycle.idle .fleet-cycle-head b{
  color:var(--muted);
}

.fleet-cycle-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin-top:6px;
}

.fleet-cycle-grid>div{
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel2);
}

.fleet-cycle-grid b{
  font-size:12px;
}

@media(max-width:700px){

  .fleet-wrap td[data-label="LIVE CYCLE"]{
    padding-top:10px !important;
  }

  .fleet-cycle{
    min-width:0;
    width:100%;
  }

  .fleet-cycle-grid{
    grid-template-columns:1fr 1fr;
  }
}

/* ===== Fleet cycle progress ===== */

.fleet-cycle-head small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
  overflow-wrap:anywhere;
}

.cycle-progress{
  height:7px;
  margin-top:8px;
  border-radius:999px;
  overflow:hidden;
  background:var(--panel2);
  border:1px solid var(--line);
}

.cycle-progress i{
  display:block;
  height:100%;
  background:var(--good);
  border-radius:999px;
  transition:width .35s ease;
}

.cycle-progress-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-top:5px;
}

.cycle-progress-meta b{
  color:var(--good);
  font-size:12px;
}

.cycle-progress-meta span{
  color:var(--muted);
  font-size:11px;
  text-align:right;
}

/* ===== Devices mobile labels ===== */
@media(max-width:700px){

  .devices-wrap thead{
    display:none;
  }

  .devices-wrap tbody tr{
    display:block;
    padding:18px 16px;
    margin-bottom:14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--panel2);
  }

  .devices-wrap tbody td{
    display:block;
    width:100%;
    padding:10px 0;
    border:0;
  }

  .devices-wrap tbody td[data-label]::before{
    content:attr(data-label);
    display:block;
    margin-bottom:4px;
    font-size:14px;
    font-weight:700;
    letter-spacing:.04em;
    color:var(--muted);
  }

  .devices-wrap .device-main{
    padding-top:0;
  }

  .devices-wrap .device-main::before{
    content:"DEVICE";
    display:block;
    margin-bottom:4px;
    font-size:14px;
    font-weight:700;
    letter-spacing:.04em;
    color:var(--muted);
  }
}

/* ===== Sidebar scroll fix V1 ===== */
.sidebar{
  height:100dvh;
  max-height:100dvh;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  padding-bottom:32px;
}

.sidebar .nav{
  min-height:min-content;
  padding-bottom:24px;
}

@media(max-width:900px){
  .sidebar{
    height:100dvh;
    max-height:100dvh;
    overflow-y:auto;
    overflow-x:hidden;
    touch-action:pan-y;
  }
}

/* ===== Sidebar scroll fix V2 ===== */
.sidebar{
  display:flex;
  flex-direction:column;
  height:100vh;
  height:100dvh;
  max-height:100dvh;
  overflow:hidden;
}

.sidebar .brand{
  flex:0 0 auto;
}

.sidebar .nav{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
  padding-bottom:48px;
}

@media(max-width:900px){
  .sidebar{
    top:0;
    bottom:0;
    height:100vh;
    height:100dvh;
    max-height:100dvh;
    overflow:hidden !important;
  }

  .sidebar .nav{
    flex:1 1 auto;
    min-height:0;
    overflow-y:scroll !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
    padding-bottom:72px;
  }
}

/* ===== Sidebar scroll fix V2.1 ===== */

.sidebar{
  display:flex;
  flex-direction:column;
  height:100vh;
  height:100dvh;
  max-height:100dvh;
  overflow:hidden;
}

.sidebar .brand{
  flex:0 0 auto;
}

.sidebar .nav{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
  padding-bottom:80px;
}

@media(max-width:900px){

  .sidebar{
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    height:100vh;
    height:100dvh;
    max-height:100dvh;
    overflow:hidden !important;
  }

  .sidebar .nav{
    flex:1 1 0;
    min-height:0;
    max-height:calc(100dvh - 70px);
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
    touch-action:pan-y;
    padding-bottom:110px;
  }

  .sidebar .nav::after{
    content:"";
    display:block;
    height:40px;
    flex:0 0 auto;
  }
}

/* ===== Sidebar scroll fix V2.1 ===== */
.sidebar{
  display:flex;
  flex-direction:column;
  height:100vh;
  height:100dvh;
  max-height:100dvh;
  overflow:hidden;
}

.sidebar .brand{
  flex:0 0 auto;
}

.sidebar .nav{
  flex:1 1 0;
  min-height:0;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
  padding-bottom:110px;
}

@media(max-width:900px){
  .sidebar{
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    height:100vh;
    height:100dvh;
    max-height:100dvh;
    overflow:hidden !important;
  }

  .sidebar .nav{
    max-height:calc(100dvh - 70px);
    overflow-y:auto !important;
    touch-action:pan-y;
  }
}
