/* Estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* Sidebar con gradiente */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 250px;
    background: linear-gradient(180deg, #1a2a3a 0%, #0d1b2a 100%);
    color: white;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar .logo {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar .logo h2 {
    font-size: 20px;
    color: #fff;
}

.sidebar .logo small {
    display: block;
    font-size: 11px;
    color: #8ba0b8;
    margin-top: 5px;
}

.sidebar .user-info {
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.sidebar .user-info .name {
    font-weight: bold;
    font-size: 16px;
}

.sidebar .user-info .role {
    font-size: 12px;
    color: #8ba0b8;
    margin-top: 3px;
}

.sidebar .user-info .company {
    font-size: 11px;
    color: #6a8aad;
    margin-top: 3px;
}

.sidebar .menu-item {
    display: block;
    padding: 12px 15px;
    color: #c8d6e5;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.sidebar .menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    transform: translateX(5px);
}

.sidebar .menu-item.active {
    background: #3498db;
    color: #fff;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.sidebar .menu-item i {
    margin-right: 10px;
    width: 20px;
}

/* Badge de notificación */
.sidebar .menu-item .badge-notification {
    float: right;
    background: #e74c3c;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 25px;
}

/* Header */
.header {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 22px;
    color: #2c3e50;
}

.header h1 i {
    color: #3498db;
    margin-right: 10px;
}

.header .header-actions {
    display: flex;
    gap: 10px;
}

/* Cards modernas */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.card-header {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
}

.card-header i {
    color: #3498db;
    margin-right: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.3s;
    border-left: 4px solid #3498db;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-card .label {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
}

.stat-card .icon {
    font-size: 28px;
    color: #3498db;
    margin-bottom: 10px;
}

/* Botones mejorados */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: #2ecc71;
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-warning {
    background: #f39c12;
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-warning:hover {
    background: #d68910;
    transform: translateY(-2px);
}

.btn-info {
    background: #1abc9c;
    color: white;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.3);
}

.btn-info:hover {
    background: #16a085;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
}

/* Tablas mejoradas */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #f8fafc;
}

table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #7f8c8d;
    border-bottom: 2px solid #eef2f7;
}

table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f2f5;
}

table tbody tr:hover {
    background: #f8fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-warning { 
    background: #ffc107; 
    color: #000; 
}

.badge-success { 
    background: #2ecc71; 
    color: #fff; 
}

.badge-danger { 
    background: #e74c3c; 
    color: #fff; 
}

.badge-info { 
    background: #3498db; 
    color: #fff; 
}

.badge-primary { 
    background: #007bff; 
    color: #fff; 
}

.badge-secondary { 
    background: #95a5a6; 
    color: #fff; 
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group label .required {
    color: #e74c3c;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #eef2f7;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fafbfc;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #fff;
}

.form-control:disabled {
    background: #f0f2f5;
    cursor: not-allowed;
}

/* Login */
.login-container {
    max-width: 420px;
    margin: 80px auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-container .login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-container .login-logo h2 {
    color: #2c3e50;
    font-size: 24px;
}

.login-container .login-logo p {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
}

/* Modal mejorado */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success { 
    background: #d5f5e3; 
    color: #1a7a42; 
    border-left: 4px solid #2ecc71; 
}

.alert-danger { 
    background: #fadbd8; 
    color: #922b21; 
    border-left: 4px solid #e74c3c; 
}

.alert-warning { 
    background: #fdebd0; 
    color: #935e38; 
    border-left: 4px solid #f39c12; 
}

.alert-info { 
    background: #d6eaf8; 
    color: #1a5276; 
    border-left: 4px solid #3498db; 
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 10px;
    }
    
    .sidebar .logo h2,
    .sidebar .logo small,
    .sidebar .user-info,
    .sidebar .menu-item span {
        display: none;
    }
    
    .sidebar .menu-item i {
        margin-right: 0;
        font-size: 20px;
    }
    
    .main-content {
        margin-left: 60px;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
}