/* Enhanced Styles for Dashboard */

/* Button Animations */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Card Animations */
.dashboard-section, .app-card, .stat-card, .quick-action-card {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dashboard-section:hover, .app-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.quick-action-card:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Table Row Animations */
.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Form Element Animations */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    transition: all 0.3s ease;
    border: 1px solid #ced4da;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-2px);
}

/* Badge Animations */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Sidebar Menu Animations */
.sidebar-menu a {
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.sidebar-menu a:hover::after {
    width: 100%;
}

.sidebar-menu a.active::after {
    width: 100%;
}

/* Modal Animations */
.modal .modal-content {
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Notification Badge Animation */
.notification-badge {
    position: relative;
}

.notification-badge .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Chart Animations */
.chart-container {
    transition: all 0.5s ease;
}

.chart-container:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Section Title Underline Animation */
.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.section-header:hover h2::after {
    width: 100%;
}

/* Dropdown Menu Animation */
.dropdown-menu {
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
    display: block;
    visibility: hidden;
}

.dropdown.show .dropdown-menu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* File Upload Animation */
.file-upload-container {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.file-upload-container:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.file-upload-container input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    text-align: right;
    filter: alpha(opacity=0);
    opacity: 0;
    outline: none;
    cursor: pointer;
    display: block;
}

/* Image Preview Animation */
.image-preview {
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Discussion Thread Animation */
.message-bubble {
    transition: all 0.3s ease;
}

.message-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Notification Animation */
@keyframes slideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    10% {
        transform: translateX(0);
        opacity: 1;
    }
    90% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideIn 5s forwards;
}

/* View Switcher Styles */
.view-switcher {
    margin-top: 5px;
}

.view-switcher .dropdown-toggle {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #6c757d;
}

.view-switcher .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.view-switcher .dropdown-menu {
    min-width: 180px;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    border-radius: 4px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.view-switcher .dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 400;
    color: #212529;
}

.view-switcher .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.view-switcher .dropdown-item.active {
    background-color: #0d6efd;
    color: white;
}

.view-switcher .dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Executive Dashboard Specific Styles */
.executive-card {
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.executive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.executive-card.revenue {
    border-left-color: #28a745;
}

.executive-card.customers {
    border-left-color: #ffc107;
}

.executive-card.quotes {
    border-left-color: #17a2b8;
}

.executive-card.orders {
    border-left-color: #dc3545;
}

/* PDF Download Button Animation */
.pdf-download-btn {
    transition: all 0.3s ease;
}

.pdf-download-btn:hover {
    background-color: #dc3545;
    color: white;
}

.pdf-download-btn i {
    transition: all 0.3s ease;
}

.pdf-download-btn:hover i {
    transform: translateY(-2px);
}
