/* Estilos para el sistema CRM */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 300;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.copyright {
    margin-top: 30px;
    color: #999;
    font-size: 12px;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    border-bottom: 1px solid #4a6741;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 300;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #34495e;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background: #34495e;
    color: white;
}

.sidebar-menu li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Dropdown Menu Styles */
.dropdown-menu-item {
    position: relative;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.dropdown-arrow.rotated {
    transform: rotate(180deg);
}

.submenu {
    background: #34495e;
    padding: 0;
    margin: 0;
    list-style: none;
    border-left: 3px solid #3498db;
}

.submenu li {
    border-bottom: 1px solid #2c3e50;
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu li a {
    padding: 12px 20px 12px 40px;
    color: #bdc3c7;
    font-size: 14px;
    display: block;
    transition: all 0.3s ease;
}

.submenu li a:hover {
    background: #2c3e50;
    color: #3498db;
    padding-left: 45px;
}

.submenu li a i {
    margin-right: 8px;
    width: 16px;
    font-size: 12px;
}

.main-content {
    flex: 1;
    padding: 0;
    padding-top: 70px;
    background: transparent;
    margin-left: 250px;
}

.topbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    z-index: 999;
}

.topbar h1 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 300;
}

.user-menu {
    position: relative;
}

.user-dropdown {
    background: none;
    border: none;
    color: #2c3e50;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.user-dropdown:hover {
    background: #f8f9fa;
}

.content-area {
    padding: 30px;
    background: transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
    color: white;
    border: none;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.stat-card.blue { 
    background: linear-gradient(135deg, #4FC3F7 0%, #29B6F6 100%);
    box-shadow: 0 8px 25px rgba(79, 195, 247, 0.4);
}
.stat-card.green { 
    background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%);
    box-shadow: 0 8px 25px rgba(102, 187, 106, 0.4);
}
.stat-card.orange { 
    background: linear-gradient(135deg, #FFA726 0%, #FF9800 100%);
    box-shadow: 0 8px 25px rgba(255, 167, 38, 0.4);
}
.stat-card.red { 
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
    box-shadow: 0 8px 25px rgba(239, 83, 80, 0.4);
}
.stat-card.purple { 
    background: linear-gradient(135deg, #AB47BC 0%, #8E24AA 100%);
    box-shadow: 0 8px 25px rgba(171, 71, 188, 0.4);
}
.stat-card.dark-red { 
    background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.4);
}
.stat-card.teal { 
    background: linear-gradient(135deg, #26A69A 0%, #00796B 100%);
    box-shadow: 0 8px 25px rgba(38, 166, 154, 0.4);
}
.stat-card.gray { 
    background: linear-gradient(135deg, #78909C 0%, #546E7A 100%);
    box-shadow: 0 8px 25px rgba(120, 144, 156, 0.4);
}

.stat-card h3 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-card p {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.stat-card i {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    opacity: 0.25;
    color: rgba(255,255,255,0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 70px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .topbar {
        padding: 15px;
        left: 0;
    }
    
    .content-area {
        padding: 15px;
    }
}