/* Portbase IBSW — layout (split from the approved mockup design system) */

.app {
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  min-height:100vh;
}

aside {
  background:var(--card);
  border-right:1px solid var(--bd);
  padding:14px 10px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
}

.brand {
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:700;
  font-size:15px;
  padding:4px 8px 14px;
}

.brand small {
  display:block;
  font-weight:400;
  color:var(--mu);
  font-size:11px;
}

.logo {
  width:32px;
  height:32px;
  border-radius:9px;
  background:var(--ac);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  flex:none;
}

.logo-img {
  width:32px;
  height:32px;
  border-radius:9px;
  object-fit:cover;
  flex:none;
}

.nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  padding:8px 10px;
  border-radius:8px;
  cursor:pointer;
  color:var(--tx);
  border:0;
  background:none;
  width:100%;
  text-align:left;
  font-size:14px;
}

.nav:hover {
  background:var(--acs);
}

.nav.on {
  background:var(--acs);
  color:var(--ac);
  font-weight:600;
}

.nav small {
  color:var(--mu);
  font-weight:400;
}

.sec {
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--mu);
  padding:14px 10px 4px;
}

main {
  padding:18px;
  min-width:0;
}

.top {
  display:none;
}

@media(max-width:760px) {
  .app {
    grid-template-columns:minmax(0,1fr);
  }

  aside {
    position:fixed;
    z-index:40;
    left:0;
    top:0;
    width:260px;
    transform:translateX(-100%);
    transition:transform .2s;
    box-shadow:2px 0 12px rgba(0,0,0,.25);
  }

  aside.open {
    transform:none;
  }

  .top {
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 14px;
    background:var(--card);
    border-bottom:1px solid var(--bd);
    position:sticky;
    top:env(safe-area-inset-top,0px);
    z-index:30;
  }

  main {
    padding:12px;
  }

}
.app>div {
  min-width:0;
}

main {
  max-width:100%;
}

aside {
  display:flex;
  flex-direction:column;
  padding:0;
  overflow:hidden;
}

.sh {
  flex:none;
  padding:14px 12px 12px;
}

.sn {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:0 10px 10px;
}

.sf {
  flex:none;
  padding:10px;
  border-top:1px solid var(--bd);
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.sf .ava {
  width:34px;
  height:34px;
  border-radius:50%;
  background:var(--ac);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
  font-size:13px;
  flex:none;
}

.sf .who {
  flex:1 1 90px;
  min-width:0;
}

.sf .who-name {
  font-weight:600;
  font-size:13px;
  line-height:1.3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.sf .who-role {
  color:var(--mu);
  font-size:12px;
  line-height:1.3;
}

.sf .who-link {
  color:inherit;
  text-decoration:none;
}

.sf .who-link:hover {
  color:var(--ac);
  text-decoration:underline;
}

.sf .btn {
  flex:1 1 auto;
  white-space:nowrap;
  text-align:center;
}

.nav {
  min-height:40px;
  gap:10px;
  justify-content:flex-start;
  position:relative;
  margin-bottom:2px;
}

.nav .ni {
  width:17px;
  height:17px;
  flex:none;
  opacity:.75;
}

.nav .nt {
  flex:1;
  min-width:0;
  line-height:1.25;
}

.nav .nc {
  font-size:11px;
  padding:2px 8px;
  border-radius:10px;
  background:var(--bg);
  color:var(--mu);
  flex:none;
}

.nav.on::before {
  content:"";
  position:absolute;
  left:-10px;
  top:9px;
  bottom:9px;
  width:3px;
  border-radius:3px;
  background:var(--ac);
}

.menu {
  width:38px;
  height:38px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
}

.bd {
  display:none;
}

@media(max-width:760px) {
  aside {
    width:min(290px,86vw);
    height:100dvh;
  }

  .sh {
    padding-top:calc(14px + env(safe-area-inset-top,0px));
  }

  .sf {
    padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));
    background:var(--card);
    position:relative;
    z-index:2;
  }

  .bd {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    z-index:35;
  }

  .bd.on {
    display:block;
  }

  aside {
    display:none;
  }

  aside.open {
    display:flex;
    transform:none;
    animation:aslide .2s ease;
  }

  .nav {
    min-height:44px;
  }

  main {
    padding:12px;
  }

  .top {
    gap:12px;
  }

}
main {
  max-width:1680px;
  width:100%;
}

@media(min-width:1400px) {
  main {
    padding:24px 32px;
  }
}
