
/* ================================
   NUCLEO360 - Custom Styles
   SB Admin Pro Enhancement
================================ */

/* Sidebar base improvement */
#layoutSidenav_nav nav.sidenav .nav-link {
  border-radius: .5rem;
  margin: .15rem .5rem;
  padding: .65rem .75rem;
  font-weight: 500;
  transition: all .2s ease;
}

/* Hover effect */
#layoutSidenav_nav nav.sidenav .nav-link:hover {
  background: rgba(0, 0, 0, .05);
}

/* Active menu item */
#layoutSidenav_nav nav.sidenav .nav-link.active {
  background: rgba(13, 110, 253, .15);
  font-weight: 600;
  color: #0d6efd !important;
  position: relative;
}

/* Active left indicator bar */
#layoutSidenav_nav nav.sidenav .nav-link.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 3px;
  background: #0d6efd;
}

/* Sidebar section titles */
.sidenav-menu-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #6c757d;
  margin-top: 1rem;
  margin-left: .75rem;
}

/* Card elevation refinement */
.card {
  border: none;
  border-radius: .75rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.08);
}

/* Page header refinement */
.page-header-title {
  font-weight: 600;
}

.page-header-subtitle {
  opacity: .85;
}

/* Buttons modern look */
.btn {
  border-radius: .5rem;
  font-weight: 500;
}

/* Table refinement */
.table thead th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* Smooth transitions */
* {
  transition: background-color .15s ease, color .15s ease;
}

body { font-family: var(--bs-font-sans-serif) !important; }

/* Menú: peso y tamaño como SB Admin Pro */
#layoutSidenav_nav .sidenav .nav-link {
  font-size: .9rem;
  font-weight: 500;
}

/* Fuerza la tipografía del template en todo el sitio */
:root{
  --bs-font-sans-serif: "Metropolis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}
body, #layoutSidenav_nav .sidenav, #layoutSidenav_nav .sidenav .nav-link {
  font-family: var(--bs-font-sans-serif) !important;
}


/* =========================
   SIDENAV CON FOOTER USUARIO
   ========================= */

.sidenav-user-layout {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidenav-user-layout .sidenav-menu {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.sidenav-user-footer {
    flex: 0 0 auto;
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(to bottom, rgba(255,255,255,0.98), #ffffff);
}

.sidenav-user-card {
    border-radius: 1rem;
    padding: 0.9rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 0.15rem 0.65rem rgba(31, 45, 65, 0.08);
}

.sidenav-user-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.sidenav-user-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.sidenav-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    background: #f8f9fc;
}

.sidenav-user-status-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
}

.sidenav-user-meta {
    min-width: 0;
    flex: 1;
}

.sidenav-user-name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1f2d41;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidenav-user-role {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #69707a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidenav-user-session {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: #00ac69;
    font-weight: 600;
}

.sidenav-user-actions {
    margin-top: 0.85rem;
}

.sidenav-user-actions .btn {
    border-radius: 0.8rem;
    font-weight: 600;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

/* Hover elegante */
.sidenav-user-card:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
    box-shadow: 0 0.35rem 1rem rgba(31, 45, 65, 0.12);
}

/* Mobile */
@media (max-width: 991.98px) {
    .sidenav-user-footer {
        padding: 0.85rem;
    }

    .sidenav-user-card {
        padding: 0.8rem;
    }

    .sidenav-user-avatar {
        width: 44px;
        height: 44px;
    }
}

/* Footer usuario */

.sidenav-user-footer{
    padding:14px;
}

.sidenav-user-card{
    background:#fff;
    border-radius:10px;
    padding:12px;
    border:1px solid rgba(0,0,0,.08);
    box-shadow:0 2px 8px rgba(0,0,0,.04);
}

/* info */

.sidenav-user-meta{
    display:flex;
    flex-direction:column;
    gap:3px;
}

.sidenav-user-name{
    font-size:13px;
    font-weight:600;
    color:#212529;
}

.sidenav-user-role{
    font-size:12px;
    color:#6c757d;
}

.sidenav-user-company{
    font-size:12px;
    color:#495057;
}

.sidenav-user-env{
    margin-top:3px;
}

/* botón */

.sidenav-user-actions{
    margin-top:10px;
}

/* badge ambiente */

.env-badge{
    display:inline-block;
    font-size:11px;
    font-weight:600;
    padding:3px 8px;
    border-radius:20px;
}

/* ambientes */

.env-prod{
    background:#d1e7dd;
    color:#0f5132;
}

.env-qa{
    background:#fff3cd;
    color:#664d03;
}

.env-dev{
    background:#cfe2ff;
    color:#084298;
}

.env-uat{
    background:#e2d9f3;
    color:#5a2ca0;
}

.env-default{
    background:#e2e3e5;
    color:#41464b;
}