:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
}

/* Sidebar */
.sidebar {
    width: 250px;
    min-height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    z-index: 10;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar .nav {
    padding: 0.5rem;
}

.sidebar .nav-link {
    padding: 0.75rem 1rem;
    margin-bottom: 0.2rem;
    border-radius: 0.4rem;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link i {
    margin-right: 0.6rem;
    width: 18px;
    font-size: 0.85rem;
}

/* Scroll personalizado para sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
    width: calc(100% - 250px);
}

/* Header */
.page-header {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--primary-color);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stats-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card.primary .icon {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.stats-card.success .icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stats-card.info .icon {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.stats-card p {
    color: #64748b;
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
}

.stats-card .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Estilos adicionales para tarjetas mejoradas */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Table */
.table-container {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--light-bg);
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: #1e293b;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--light-bg);
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Badge Status */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

.badge.bg-warning {
    background-color: var(--warning-color) !important;
}

.badge.bg-danger {
    background-color: var(--danger-color) !important;
}

.badge.bg-info {
    background-color: var(--info-color) !important;
}

/* Modal */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #1e293b;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

/* Form */
.form-label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Activity Feed */
.activity-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: var(--light-bg);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-list i {
    width: 20px;
}

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

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Main content layout */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}
