/* Modern Button System - Global Styles */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --success-color: #10b981;
    --success-dark: #059669;
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --info-color: #06b6d4;
    --info-dark: #0891b2;
    --secondary-color: #6b7280;
    --secondary-dark: #4b5563;
    --light-color: #f8fafc;
    --dark-color: #1f2937;
    --border-radius: 0.75rem;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Modern Button */
.btn-modern {
    position: relative;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    font-family: inherit;
    line-height: 1.5;
    white-space: nowrap;
    user-select: none;
    vertical-align: middle;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-modern:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
}

.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Button Variants */
.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    color: white;
}

.btn-primary-modern:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #6a4c93 100%);
}

.btn-success-modern {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    color: white;
}

.btn-success-modern:hover {
    background: linear-gradient(135deg, var(--success-dark) 0%, #047857 100%);
}

.btn-warning-modern {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-dark) 100%);
    color: white;
}

.btn-warning-modern:hover {
    background: linear-gradient(135deg, var(--warning-dark) 0%, #b45309 100%);
}

.btn-danger-modern {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: white;
}

.btn-danger-modern:hover {
    background: linear-gradient(135deg, var(--danger-dark) 0%, #b91c1c 100%);
}

.btn-info-modern {
    background: linear-gradient(135deg, var(--info-color) 0%, var(--info-dark) 100%);
    color: white;
}

.btn-info-modern:hover {
    background: linear-gradient(135deg, var(--info-dark) 0%, #0e7490 100%);
}

.btn-secondary-modern {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
}

.btn-secondary-modern:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #374151 100%);
}

.btn-light-modern {
    background: linear-gradient(135deg, var(--light-color) 0%, #e2e8f0 100%);
    color: var(--dark-color);
    border: 1px solid #e2e8f0;
}

.btn-light-modern:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.btn-dark-modern {
    background: linear-gradient(135deg, var(--dark-color) 0%, #111827 100%);
    color: white;
}

.btn-dark-modern:hover {
    background: linear-gradient(135deg, #111827 0%, #000000 100%);
}

/* Button Sizes */
.btn-sm-modern {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
}

.btn-lg-modern {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
}

.btn-xl-modern {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
    border-radius: var(--border-radius-xl);
}

/* Action Buttons (Icon Only) */
.action-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: var(--transition);
    border: none;
    color: white;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.action-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.action-btn.view {
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
}

.action-btn.edit {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-dark) 100%);
}

.action-btn.assign {
    background: linear-gradient(135deg, var(--info-color) 0%, var(--info-dark) 100%);
}

.action-btn.remove {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.action-btn.delete {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.fab:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Filter Buttons */
.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    border: 2px solid transparent;
    background: white;
    color: var(--secondary-color);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 8px 15px -3px rgba(102, 126, 234, 0.3);
}

.filter-btn.active:hover {
    color: white;
    transform: translateY(-2px);
}

/* Outline Button Variants */
.btn-outline-primary-modern {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary-modern:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-success-modern {
    background: transparent;
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.btn-outline-success-modern:hover {
    background: var(--success-color);
    color: white;
}

.btn-outline-warning-modern {
    background: transparent;
    color: var(--warning-color);
    border: 2px solid var(--warning-color);
}

.btn-outline-warning-modern:hover {
    background: var(--warning-color);
    color: white;
}

.btn-outline-danger-modern {
    background: transparent;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

.btn-outline-danger-modern:hover {
    background: var(--danger-color);
    color: white;
}

.btn-outline-info-modern {
    background: transparent;
    color: var(--info-color);
    border: 2px solid var(--info-color);
}

.btn-outline-info-modern:hover {
    background: var(--info-color);
    color: white;
}

/* Button Groups */
.btn-group-modern {
    display: inline-flex;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.btn-group-modern .btn-modern {
    border-radius: 0;
    margin: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-group-modern .btn-modern:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.btn-group-modern .btn-modern:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    border-right: none;
}

/* Loading State */
.btn-modern.loading {
    position: relative;
    color: transparent;
}

.btn-modern.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn-modern {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .fab {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .btn-modern {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .fab {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .btn-modern,
    .action-btn,
    .fab {
        display: none !important;
    }
}
