:root{
  --bg1:#f6f9ff;
  --bg2:#eef4ff;

  --card: rgba(255,255,255,.88);
  --border: rgba(15, 23, 42, .10);

  --text: #0b1220;
  --muted: rgba(11, 18, 32, .72);

  --accent: #2fb7ff;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(15, 23, 42, .12);

  --sidebar-w: 280px;
  --topbar-h: 72px;
}

.app-bg{
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 10% 0%, var(--bg2), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, #e9fff5, transparent 55%),
    linear-gradient(180deg, var(--bg1), #ffffff);
  color: var(--text);
}

/* Card glass */
.glass{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Topbar */
.topbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1035;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--border);
}

.brand-title{ font-weight: 800; line-height: 1.05; }
.brand-sub{ font-size: .85rem; color: var(--muted); }

.btn-icon{
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* User pill */
.userpill{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.65);
}
.userpill i{ font-size: 1.2rem; }
.u-name{ font-weight: 800; font-size: .92rem; line-height: 1.05; }
.u-role{ font-size: .78rem; color: var(--muted); line-height: 1.05; }

/* Sidebar layout */
.fp-sidebar{
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  height: calc(100vh - var(--topbar-h));
  width: var(--sidebar-w);
  padding: 12px;
  z-index: 1020;
  transition: transform .24s ease, opacity .24s ease;
}

.fp-side-inner{
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction: column;
  overflow: hidden;
}

.fp-side-logos{
  display:flex;
  justify-content: center;
  gap: 12px;
  padding: 14px 12px 8px;
}
.fp-side-logos img{
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.fp-navlist{
  padding: 10px;
  display: grid;
  gap: 6px;
}

.fp-nav{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
}
.fp-nav i{ font-size: 1.1rem; opacity: .9; }
.fp-nav:hover{
  background: rgba(47,183,255,.08);
  border-color: rgba(47,183,255,.18);
}
.fp-nav.active{
  background: rgba(47,183,255,.12);
  border-color: rgba(47,183,255,.35);
  font-weight: 800;
}

.fp-side-foot{
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}


/* Espacio para header fijo */
main.container-fluid{
  padding-top: calc(var(--topbar-h) + 12px) !important;
}

/* Empuja el contenido cuando hay sidebar (desktop) */
@media (min-width: 992px){
  main.container-fluid{
    padding-left: calc(var(--sidebar-w) + 16px);
    transition: padding-left .24s ease;
  }

  body.sidebar-collapsed .fp-sidebar{
    transform: translateX(calc(-1 * var(--sidebar-w) - 28px));
    opacity: 0;
    pointer-events: none;
  }

  body.sidebar-collapsed main.container-fluid{
    padding-left: 16px !important;
  }
}

@media (max-width: 991.98px){
  :root{
    --topbar-h: 68px;
  }
}
