/**
 * MobiFirms Purple Gradient Theme
 * Consistent styling across all pages
 */

/* Purple Gradient Buttons */
.btn-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    font-weight: 600;
}

.btn-gradient-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-gradient-purple:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    color: white;
}

.btn-gradient-purple:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

/* White Header Buttons - Consistent styling for header action buttons */
.btn-white {
    background: white;
    color: #495057;
    border: 2px solid rgba(102, 126, 234, 0.15);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    background: #f8f9fa;
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-white:focus {
    background: white;
    color: #667eea;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-white:active {
    background: #f8f9fa;
    color: #667eea;
    border-color: #667eea;
    transform: translateY(0);
}

/* Outline version for secondary actions */
.btn-outline-gradient-purple {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box, 
                linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
    color: #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-gradient-purple:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Page Headers with Gradient */
.page-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.page-header-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,100 1000,0"/></svg>');
    background-size: cover;
}

.page-header-gradient .container,
.page-header-gradient .container-fluid {
    position: relative;
    z-index: 1;
}

/* Cards with Gradient Accents */
.card-gradient {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.card-gradient:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.card-gradient .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem 1rem 0 0 !important;
    border: none;
}

/* Form Controls with Purple Focus */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Navigation Pills with Gradient */
.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-pills .nav-link {
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* Badges with Gradient */
.badge-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Progress Bars with Gradient */
.progress-bar-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Alerts with Gradient Accents */
.alert-gradient-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* Links with Gradient Hover */
.link-gradient {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: bottom;
}

.link-gradient:hover {
    color: #764ba2;
    background-size: 100% 2px;
}

/* Table Headers with Gradient */
.table-gradient thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
}

/* Sidebar Active States */
.sidebar .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Modal Headers */
.modal-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
}

/* Dropdown Items Hover */
.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Loading Spinner */
.spinner-gradient {
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-gradient-purple {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .page-header-gradient {
        padding: 2rem 0;
        margin-bottom: 1.5rem;
    }
}
