* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #e9ecef;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar.collapsed {
    margin-left: -250px;
}

.sidebar-header {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    max-width: 150px;
    height: auto;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav > li > a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.sidebar-nav > li > a:hover,
.sidebar-nav > li.active > a {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav > li > a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.submenu {
    list-style: none;
    padding: 0;
    display: none;
    background: rgba(0,0,0,0.2);
}

.nav-item-dropdown.open .submenu {
    display: block;
}

.submenu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 50px;
    color: #95a5a6;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
}

.submenu li a:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

/* Topbar */
.topbar {
    background: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-avatar i {
    font-size: 28px;
    color: #95a5a6;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    transition: margin-left 0.3s;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 0;
}

.content-wrapper {
    padding: 20px;
}

/* Cards */
.stat-card {
    border-radius: 8px;
    padding: 20px;
    color: white;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card .stat-number {
    font-size: 36px;
    font-weight: bold;
}

.stat-card .stat-label {
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.9;
}

.stat-red { background: #e74c3c; }
.stat-orange { background: #f39c12; }
.stat-green { background: #27ae60; }
.stat-blue { background: #3498db; }

/* Module Cards */
.module-indicator {
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    background: white;
    border-left: 5px solid;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.module-indicator .indicator-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.module-indicator .indicator-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #666;
    margin-top: 5px;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.table-container h5 {
    margin-bottom: 15px;
    font-weight: 600;
}

/* Task Cards */
.task-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.task-card-header {
    padding: 10px 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-card-header .task-icon {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.task-card-body {
    padding: 15px;
}

.priority-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-alto { background: #e74c3c; color: white; }
.priority-medio { background: #f39c12; color: white; }
.priority-bajo { background: #27ae60; color: white; }

/* Filter bar */
.filter-bar {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-bar select,
.filter-bar input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-primary {
    background: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

/* Welcome card */
.welcome-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.welcome-card .highlight {
    color: #3498db;
    font-weight: 600;
}

.welcome-card .brand {
    font-weight: bold;
    color: #333;
}

.quote-block {
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin-top: 20px;
    color: #666;
    font-style: italic;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #1abc9c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 9999;
}

.chat-widget:hover {
    background: #16a085;
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c3e50;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-box .form-control {
    padding: 12px;
    margin-bottom: 15px;
}

.login-box .btn-login {
    width: 100%;
    padding: 12px;
    background: #3498db;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

.login-box .btn-login:hover {
    background: #2980b9;
}

/* Chart container */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.chart-container h5 {
    margin-bottom: 15px;
    font-weight: 600;
}

/* Pagination */
.pagination {
    margin-top: 15px;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h4 {
    font-weight: 600;
    color: #333;
}

/* Report list */
.report-item {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-item .report-title {
    font-weight: 600;
    color: #333;
}

.report-item .report-meta {
    font-size: 13px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    .sidebar.show {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
    }
}
