/* Financial Dashboard Header Styles - Option 5 */

/* Header Top Bar */
.header-top {
    font-size: 0.875rem;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

.header-top .container {
    max-width: 100%;
}

.header-top .btn-link {
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.header-top .btn-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #2c5aa0 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navbar-brand:hover {
    color: #1e3d72 !important;
}

.navbar-brand i {
    color: #2c5aa0;
}

/* Financial Navigation Pills */
.nav-pills-financial {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin: 0;
}

.nav-pills-financial .nav-item {
    margin: 0 0.125rem;
}

.nav-pills-financial .nav-link {
    color: #495057;
    background-color: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-pills-financial .nav-link:hover {
    color: #2c5aa0;
    background-color: #e9ecef;
    transform: translateY(-1px);
}

.nav-pills-financial .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    box-shadow: 0 2px 4px rgba(44, 90, 160, 0.3);
}

.nav-pills-financial .nav-link i {
    font-size: 0.875rem;
    opacity: 0.8;
}

.nav-pills-financial .nav-link.active i {
    opacity: 1;
}

/* Page Title Section */
.page-title-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.page-title-section h1 {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    font-size: 1.5rem;
}

.page-title-section h1 i {
    color: #2c5aa0;
    font-size: 1.25rem;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: #6c757d;
}

.breadcrumb-item a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #1e3d72;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #adb5bd;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .header-top {
        font-size: 0.8rem;
    }

    .header-top .d-flex {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .nav-pills-financial {
        flex-direction: column;
        background-color: transparent;
        padding: 0;
    }

    .nav-pills-financial .nav-item {
        margin: 0.125rem 0;
    }

    .nav-pills-financial .nav-link {
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .page-title-section .row {
        text-align: center;
    }

    .page-title-section .col-md-6:last-child {
        margin-top: 0.5rem;
    }

    /* Ensure consistent padding on smaller screens */
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 767.98px) {
    .page-title-section h1 {
        font-size: 1.25rem;
    }

    .breadcrumb {
        justify-content: center;
        font-size: 0.8rem;
    }

    /* Additional mobile optimizations */
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Ensure cards have proper spacing on mobile */
    .card {
        margin-bottom: 1rem;
    }

    /* Adjust button groups for mobile */
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Animation for smooth transitions */
.header-financial {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading states */
.nav-link.loading {
    opacity: 0.6;
    pointer-events: none;
}

.nav-link.loading::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-online {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.status-offline {
    background-color: #dc3545;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Enhanced shadows and depth */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-title-section {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Professional color scheme */
:root {
    --primary-blue: #2c5aa0;
    --primary-blue-dark: #1e3d72;
    --secondary-gray: #6c757d;
    --light-gray: #f8f9fa;
    --border-gray: #dee2e6;
    --success-green: #28a745;
    --danger-red: #dc3545;
    --warning-yellow: #ffc107;
}

/* Utility classes for consistent styling */
.text-financial-primary {
    color: var(--primary-blue) !important;
}

.bg-financial-primary {
    background-color: var(--primary-blue) !important;
}

.border-financial {
    border-color: var(--border-gray) !important;
}

/* Print styles */
@media print {
    .header-top,
    .navbar,
    .page-title-section {
        display: none !important;
    }
}
