/* User Management - Administrative Design */

/* Custom Header - Verde con gradiente */
.custom-header {
    background: #66BB6A !important;
    background: linear-gradient(135deg, #66BB6A 0%, #2E7D32 100%) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(102, 187, 106, 0.2) !important;
}

.icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-wrapper:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Admin Header */
.admin-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

.breadcrumb a {
    color: #66BB6A;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #4CAF50;
    text-decoration: underline;
}

.admin-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #66BB6A, #4CAF50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(102, 187, 106, 0.2);
}

.admin-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.admin-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

.admin-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-admin-primary {
    background: #66BB6A;
    border-color: #66BB6A;
    color: white;
    transition: all 0.3s ease;
}

.btn-admin-primary:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 187, 106, 0.3);
}

/* Admin Stats */
.admin-stats {
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #66BB6A;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: #f8f9fa;
    color: #6c757d;
    flex-shrink: 0;
}

.stat-icon.active {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.stat-icon.online {
    background: rgba(46, 125, 50, 0.1);
    color: #2E7D32;
}

.stat-icon.admin {
    background: rgba(255, 193, 7, 0.1);
    color: #ff9800;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Sidebar Filters */
.admin-sidebar {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.admin-sidebar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-section {
    padding: 1.5rem;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #f1f3f4;
    padding-bottom: 0.5rem;
}

.search-input {
    position: relative;
}

.search-input i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 2;
}

.search-input .form-control {
    padding-left: 2.5rem;
}

/* Admin Table Container */
.admin-table-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.table-header h5 {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.table-actions .btn {
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
}

.search-input .form-control:focus {
    border-color: #66BB6A;
    box-shadow: 0 0 0 0.2rem rgba(102, 187, 106, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-select:focus {
    border-color: #66BB6A;
    box-shadow: 0 0 0 0.2rem rgba(102, 187, 106, 0.25);
}

.form-check-input:checked {
    background-color: #66BB6A;
    border-color: #66BB6A;
}

/* Table Container */
.admin-table-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.table-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.table-header h5 {
    color: #2c3e50;
    font-weight: 600;
}

.table-actions .btn {
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
}

/* Admin Table */
.admin-table {
    margin: 0;
}

.admin-table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
}

.admin-table tbody tr:hover {
    background-color: rgba(102, 187, 106, 0.05);
}

.admin-table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

/* User Avatar */
.avatar-sm > div {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #66BB6A, #4CAF50);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Action Buttons */
.btn-action {
    border-radius: 6px;
    padding: 0.375rem 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary:hover {
    background-color: #66BB6A;
    border-color: #66BB6A;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

/* Loading States */
.admin-loading {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty State */
.admin-empty-state {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon {
    color: #dee2e6;
}

.empty-title {
    color: #6c757d;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    color: #adb5bd;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.empty-actions .btn {
    border-radius: 8px;
    font-weight: 500;
}

/* Modal Improvements */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #66BB6A, #4CAF50);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #66BB6A;
    box-shadow: 0 0 0 0.2rem rgba(102, 187, 106, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Alert Improvements */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Responsive Design */
@media (max-width: 992px) {
    .admin-sidebar {
        margin-bottom: 2rem;
        position: static;
    }
    
    .admin-header {
        padding: 1rem 0;
    }
    
    .admin-actions {
        margin-top: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .admin-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .admin-table thead th {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .admin-title {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .btn-group-sm .btn-action {
        padding: 0.25rem 0.375rem;
        font-size: 0.8rem;
    }
}

/* Notification animations */
.custom-notification {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* User Profile Specific Enhancements */
.user-avatar-large {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.user-avatar-large:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

/* Additional Form Enhancements */
.form-control:focus, .form-select:focus {
    border-color: #66BB6A !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 187, 106, 0.25) !important;
    outline: none !important;
}

/* Button Hover Effects Enhancement */
.btn-admin-primary:hover, .btn-light:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 187, 106, 0.3);
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
    .admin-stats .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .custom-header .d-flex {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-actions {
        justify-content: center;
        width: 100%;
    }
    
    .icon-wrapper {
        margin: 0 auto;
    }
    
    .admin-table-container {
        margin: 0 -15px;
        border-radius: 0;
    }
}