@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--tenant-bg, #f8fafc);
    color: #1e293b;
    line-height: 1.5;
}

/* Layout Principal */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.content-wrapper {
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Topbar */
.topbar {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tenant-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.15rem;
}

.tenant-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

/* Menú de Módulos (Dropdown) */
.modules-nav {
    position: relative;
}

.btn-modules-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-modules-menu:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.modules-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    padding: 8px;
    z-index: 100;
}

.modules-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #334155;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: #f1f5f9;
    color: var(--tenant-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tenant-primary);
}

/* Sidebar Opcional dentro del módulo */
.module-layout {
    display: flex;
    gap: 24px;
}

.module-sidebar {
    width: 250px;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    height: fit-content;
}

.module-body {
    flex: 1;
}

@media (max-width: 900px) {
    .module-layout {
        flex-direction: column;
    }

    .module-sidebar {
        width: 100%;
    }
}