/* ===== Shell ===== */


.app-layout {
  min-height: 100vh;
  display: flex;
}

/* ===== Sidebar ===== */


.sidebar-top {
  padding: 10px 0px 10px 15px;
}

.user-block {
  display: grid;
  grid-template-columns: 50px 1fr 34px;
  gap: 5px;
  align-items: center;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background: #edf0ff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.user-avatar img{
      width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #6c63ff;
  opacity: .9;
}

.user-name {
  font-weight: 700;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #D7DBE1;
  color: #545C7D;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.role-pill svg{
  width: 18px;
  height: 18px;
}

.sidebar-collapse {
      width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #FFFFFF;
    display: grid;
    place-items: center;
    position: relative;
    right: -15px;
    overflow: visible;
    transition:all .5s ease;
}


.sidebar-collapse:hover path{
  stroke: #584CDB;
  transform: translate(-2px, 0px);
  transition:all .5s ease;
}

.sidebar-nav {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  color: #2f3650;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-left: 5px solid #fff;
}

.nav-item i {
  color: #6c63ff;
  font-size: 16px;
}

.nav-item.active {
  background: #EFEFF6;
  position: relative;
  border-left: 5px solid #584CDB;
}


.sidebar-bottom {
  margin-top: auto;
  padding: 6px;
}

.logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #313131;
  font-size: 14px;
  font-weight: 700;
}

.logout:hover{
  color: #584CDB;
}


/* ===== Content ===== */
.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== Topbar ===== */
.topbar {
  height: 56px;
  background: #2f3a54;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 18px;
}

.topbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}

.brand-dot {
  width: 10px;
  height: 10px;
  background: #6c63ff;
  border-radius: 999px;
}

.brand-text {
  font-weight: 700;
}

.app-page {
  padding: 18px;
}


/* ===== Layout base ===== */
.app-layout{
  min-height: 100vh;
  position: relative;
}


/* ===== Backdrop ===== */
.app-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 999; 
}

/* ===== Sidebar ===== */
.sidebar{
  position: fixed;
  top: 56px;        
  left: 0;
  height: calc(100vh - 56px);
  width: 280px;
  background: #fff;
  border-right: 1px solid rgba(0,0,0,.06);
  z-index: 1000;

  transform: translateX(-105%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
  padding: 16px 0px;
}

/* Estado abierto */
.app-shell.sidebar-open .sidebar{
  transform: translateX(0);
}
.app-shell.sidebar-open .app-backdrop{
  opacity: 1;
  pointer-events: auto;
}

/* ===== Topbar ===== */
.topbar{
  height: 56px;
  background: #2f3a54;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 1100;
}

.topbar-inner{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-menu-btn{
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.0);
  color: #fff;
  display: grid;
  place-items: center;
  transition:all .5s ease;
}

.topbar-menu-btn:hover{
  color: #D6D5EE;
  transition:all .5s ease;
}

.topbar-brand img{
  width: 80px;
}
