body{
    margin:0;
    background:#f4f6f9;
    font-family:Arial, Helvetica, sans-serif;
}

.container-fluid-layout{
    display:flex;
    min-height:calc(100vh - 60px);
}

.sidebar{
    width:250px;
    background:#212529;
    color:white;
    padding:20px;
}

.sidebar ul{
    list-style:none;
    padding:0;
}

.sidebar li{
    padding:12px;
    margin-bottom:8px;
    border-radius:8px;
    cursor:pointer;
}

.sidebar li:hover{
    background:#343a40;
}

.content{
    flex:1;
    padding:30px;
}

.footer{
    background:white;
    text-align:center;
    padding:10px;
    border-top:1px solid #ddd;
}

.sidebar li{

    transition:.3s;

}

.sidebar li:hover{

    transform:translateX(6px);

}

.sidebar i{

    margin-right:10px;

}

.workspace-card{

    background:#fff;

    border-radius:16px;

    border:1px solid #e9ecef;

    padding:20px;

    text-align:center;

    box-shadow:0 4px 15px rgba(0,0,0,.06);

    transition:.25s;

    height:100%;

}

.workspace-card:hover{

    transform:translateY(-4px);

    box-shadow:0 12px 25px rgba(0,0,0,.10);

}

.workspace-card small{

    color:#6c757d;

    text-transform:uppercase;

    letter-spacing:.5px;

}

.workspace-card h2{

    color:#0d6efd;

    font-weight:700;

    margin-top:10px;

}

.workspace-card h5{

    margin-top:10px;

    font-weight:600;

}

/* ==========================================
   Layout Grid
========================================== */

.layout-grid{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.layout-row{
    display:flex;
    gap:12px;
}

.layout-cell{
    position:relative;
    width:120px;
    height:90px;
    border-radius:16px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:white;
    font-weight:700;
    box-shadow:0 8px 20px rgba(0,0,0,.15);
    transition:.25s;
}

.layout-cell:hover{
    transform:translateY(-4px);
}

.layout-name{
    font-size:.85rem;
    text-align:center;
}

.layout-position{
    font-size:.70rem;
    opacity:.8;
}

.layout-lock{
    position:absolute;
    top:6px;
    right:8px;
}

.layout-empty{
    width:120px;
    height:90px;
    border-radius:16px;
    border:2px dashed #d1d5db;
    background:#f8fafc;
}

/* =======================================
   Layout Grid 2.0
======================================= */

.layout-cell{

    min-width:130px;
    min-height:110px;

    border-radius:14px;

    padding:14px;

    color:white;

    display:flex;

    flex-direction:column;

    justify-content:space-between;

    box-shadow:0 10px 20px rgba(0,0,0,.15);

    transition:.25s;

    cursor:pointer;

}

.layout-cell:hover{

    transform:translateY(-4px);

    box-shadow:0 18px 35px rgba(0,0,0,.25);

}

.layout-icon{

    font-size:24px;

}

.layout-name{

    font-weight:700;

    font-size:15px;

    text-align:center;

    line-height:1.3;

}

.layout-divider{

    border-top:1px solid rgba(255,255,255,.35);

    margin:10px 0;

}

.layout-footer{

    display:flex;

    justify-content:space-between;

    align-items:center;

    font-size:12px;

}

.layout-fixed{

    font-size:16px;

}

.layout-empty{

    min-width:130px;

    min-height:110px;

    border:2px dashed #d9dee5;

    border-radius:14px;

    background:#fafbfc;

    display:flex;

    align-items:center;

    justify-content:center;

    color:#b8bec7;

    font-size:26px;

}

/* =======================================
   FLOORPLAN VIEW
=======================================*/

.floorplan{

    display:flex;

    flex-wrap:wrap;

    gap:20px;

    padding:20px;

    justify-content:center;

}

.floor-area{

    width:220px;

    min-height:120px;

    border-radius:16px;

    padding:20px;

    color:white;

    box-shadow:0 10px 25px rgba(0,0,0,.18);

    transition:.25s;

}

.floor-area:hover{

    transform:scale(1.04);

}

.floor-title{

    font-size:18px;

    font-weight:bold;

    margin-bottom:20px;

}

.floor-info{

    opacity:.9;

}

.floor-fixed{

    margin-top:18px;

    font-weight:bold;

}

/* ==========================================
   GRID DE LAYOUTS
========================================== */

.layout-grid{
    display:grid;
    gap:12px;
    width:100%;
}

.layout-cell{

    min-height:110px;

    border-radius:12px;

    color:white;

    padding:12px;

    display:flex;

    flex-direction:column;

    justify-content:space-between;

    align-items:center;

    font-weight:600;

    box-shadow:0 2px 8px rgba(0,0,0,.15);

    transition:.2s;

}

.layout-cell:hover{

    transform:translateY(-2px);

}

.layout-empty{

    min-height:110px;

    border:2px dashed #d9d9d9;

    border-radius:12px;

    background:#fafafa;

}

.layout-icon{

    font-size:24px;

}

.layout-name{

    font-size:13px;

    text-align:center;

    font-weight:600;

    word-break:break-word;

}

.layout-divider{

    width:100%;

    height:1px;

    background:rgba(255,255,255,.30);

    margin:8px 0;

}

.layout-footer{

    width:100%;

    display:flex;

    justify-content:space-between;

    font-size:11px;

}

.layout-fixed{

    color:yellow;

}

/* =====================================================
   LAYOUTIA - IDENTIDAD DEL SIDEBAR
===================================================== */

.sidebar-brand {
    width: 100%;
    padding: 18px 10px;
    margin-bottom: 4px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;

    background: #ffffff;
    border-bottom: 3px solid #08bce8;
}

.sidebar-brand-link {
    width: 100%;
    height: 72px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
    text-decoration: none;
}

.sidebar-logo {
    display: block;

    width: 100%;
    max-width: 165px;
    max-height: 70px;

    object-fit: contain;
    object-position: center;

    transition: transform 0.20s ease;
}

.sidebar-brand-link:hover .sidebar-logo {
    transform: scale(1.03);
}

/* =====================================================
   AJUSTE FINAL LOGO LAYOUTIA
===================================================== */

.sidebar-brand {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 4px 16px;
    overflow: hidden;
}

.sidebar-brand-link {
    box-sizing: border-box;
    width: 100%;
    height: 65px;
    overflow: hidden;
}

.sidebar-logo {
    width: 145px !important;
    height: 60px !important;
    max-width: 145px !important;
    max-height: 60px !important;

    object-fit: contain !important;
    object-position: center !important;

    margin: 0 auto;
}

/* =====================================================
   LAYOUTIA - LOGOTIPO SIDEBAR FINAL
   Estas reglas sobrescriben configuraciones anteriores
===================================================== */

.sidebar-brand {
    box-sizing: border-box !important;
    width: 100% !important;

    padding: 14px 10px 16px !important;
    margin: 0 0 6px 0 !important;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    background: #ffffff !important;

    border-bottom: 3px solid #08bce8 !important;

    overflow: hidden !important;

    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.16) !important;
}


.sidebar-brand-link {
    box-sizing: border-box !important;

    width: 100% !important;
    height: 72px !important;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    overflow: hidden !important;

    text-decoration: none !important;
}


/* Imagen del logotipo */

.sidebar-brand-link .sidebar-logo {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 72px !important;

    object-fit: contain !important;
    object-position: center center !important;

    margin: 0 auto !important;
    padding: 0 !important;

    transform: none !important;

    transition:
        transform 0.20s ease,
        filter 0.20s ease !important;
}


/* Hover discreto */

.sidebar-brand-link:hover .sidebar-logo {
    transform: scale(1.015) !important;

    filter:
        drop-shadow(
            0 2px 3px rgba(0, 45, 90, 0.15)
        ) !important;
}

/* =====================================================
   LAYOUTIA - AJUSTE VISUAL DEFINITIVO DEL LOGO
===================================================== */

.sidebar-brand {
    padding: 8px 6px 10px !important;
}

.sidebar-brand-link {
    height: 68px !important;
}

.sidebar-brand-link .sidebar-logo {
    width: 100% !important;
    height: auto !important;

    max-width: 175px !important;
    max-height: 64px !important;

    object-fit: contain !important;
    object-position: center !important;
}

/* =====================================================
   LAYOUTIA - LOGO SIDEBAR SIN RECUADRO
   Override definitivo
===================================================== */

.sidebar .sidebar-brand {
    box-sizing: border-box !important;
    width: 100% !important;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    padding: 20px 16px 14px !important;
    margin: 0 0 8px 0 !important;

    /* Sin tarjeta o recuadro */
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    overflow: visible !important;
}

.sidebar .sidebar-brand-link {
    box-sizing: border-box !important;

    width: 100% !important;
    height: auto !important;
    min-height: 72px !important;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;
    border: none !important;
    box-shadow: none !important;

    overflow: visible !important;
    text-decoration: none !important;
}

.sidebar .sidebar-brand-link .sidebar-logo {
    display: block !important;

    width: 190px !important;
    max-width: 90% !important;
    height: auto !important;
    max-height: none !important;

    margin: 0 auto !important;
    padding: 0 !important;

    object-fit: contain !important;
    object-position: center center !important;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    transition:
        transform 0.20s ease,
        filter 0.20s ease !important;
}

.sidebar .sidebar-brand-link:hover {
    background: transparent !important;
}

.sidebar .sidebar-brand-link:hover .sidebar-logo {
    transform: scale(1.025) !important;

    filter:
        drop-shadow(
            0 2px 4px rgba(0, 0, 0, 0.20)
        ) !important;
}

/* =====================================================
   LAYOUTIA - MAIN + TOPBAR DE USUARIO
   ===================================================== */

.layoutia-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}


/* TOPBAR */

.layoutia-main .topbar {
    position: relative;
    z-index: 1000;

    width: 100%;
    height: 76px;

    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #ffffff;
    color: #1f2937;

    border-bottom: 1px solid #e7edf4;

    box-shadow:
        0 3px 14px rgba(15, 38, 65, 0.05);
}


/* INFORMACIÓN IZQUIERDA */

.topbar-context {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-context-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #0d6efd;
    background: #eef6ff;

    border-radius: 10px;

    font-size: 1rem;
}

.topbar-title {
    color: #1f2937;

    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
}

.topbar-subtitle {
    margin-top: 2px;

    color: #7a8699;

    font-size: 0.72rem;
}


/* ACCIONES DERECHA */

.topbar-actions {
    display: flex;
    align-items: center;

    gap: 12px;
}

.topbar-icon-button {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #667085;
    background: transparent;

    border: 1px solid transparent;
    border-radius: 50%;

    font-size: 1.05rem;

    transition: 0.2s ease;
}

.topbar-icon-button:hover {
    color: #0d6efd;
    background: #f2f7fc;
}


/* USUARIO */

.topbar-user {
    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 190px;

    padding: 6px 10px;

    color: #1f2937;
    background: transparent;

    border: 1px solid transparent;
    border-radius: 12px;

    text-align: left;

    transition: 0.2s ease;
}

.topbar-user:hover,
.topbar-user[aria-expanded="true"] {
    background: #f5f8fc;
    border-color: #e3eaf2;
}


/* AVATAR */

.topbar-avatar {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    color: #ffffff;
    background: linear-gradient(
        135deg,
        #0d6efd,
        #08bce8
    );

    border-radius: 50%;

    font-size: 1.2rem;
}

.topbar-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    border-radius: 50%;
}


/* NOMBRE Y PUESTO */

.topbar-user-data {
    min-width: 0;

    display: flex;
    flex: 1;
    flex-direction: column;
}

.topbar-user-name {
    overflow: hidden;

    color: #1f2937;

    font-size: 0.86rem;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-role {
    overflow: hidden;

    margin-top: 1px;

    color: #8490a3;

    font-size: 0.68rem;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-chevron {
    color: #98a2b3;

    font-size: 0.72rem;
}


/* MENÚ DESPLEGABLE */

.layoutia-user-menu {
    width: 260px;

    margin-top: 10px !important;
    padding: 8px;

    border: 1px solid #e5eaf0;
    border-radius: 14px;

    box-shadow:
        0 16px 40px rgba(15, 38, 65, 0.14);
}

.layoutia-user-menu-header {
    display: flex;
    flex-direction: column;

    padding: 10px 12px 8px;
}

.layoutia-user-menu-header strong {
    color: #1f2937;

    font-size: 0.88rem;
    font-weight: 600;
}

.layoutia-user-menu-header span {
    overflow: hidden;

    margin-top: 3px;

    color: #8490a3;

    font-size: 0.72rem;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.layoutia-user-menu .dropdown-item {
    padding: 9px 12px;

    border-radius: 8px;

    color: #344054;

    font-size: 0.82rem;
}

.layoutia-user-menu .dropdown-item:hover {
    color: #0d6efd;
    background: #f1f7fd;
}

.layoutia-user-menu .dropdown-item.text-danger:hover {
    color: #dc3545 !important;
    background: #fff3f4;
}


/* EL CONTENIDO QUEDA DEBAJO DEL TOPBAR */

.layoutia-main > .content {
    width: 100%;
    flex: 1;
}


/* RESPONSIVE */

@media (max-width: 768px) {

    .layoutia-main .topbar {
        height: 68px;
        padding: 0 16px;
    }

    .topbar-context {
        display: none;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .topbar-user {
        min-width: 0;
    }

    .topbar-user-data {
        display: none;
    }

}