
/* ========================================
   COMMUNITY SENTIMENT LAYOUT STYLES
   ======================================== */
.sentiment-layout {
    min-height: 500px;
}

.sentiment-widgets-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.sentiment-widgets-column .widget-card {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sentiment-chart-column {
    height: 100%;
    min-height: 500px;
}

.sentiment-chart-column .chart-card {
    height: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.sentiment-chart-column .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sentiment-chart-column .chart-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive pie chart container */
#sentimentPieChart.sentiment-pie-chart {
    min-height: 300px;
}

@media (max-width: 768px) {
    #sentimentPieChart.sentiment-pie-chart {
        height: 300px !important;
    }
    
    .sentiment-distribution-card {
        min-height: 500px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #sentimentPieChart.sentiment-pie-chart {
        height: 350px !important;
    }
}

@media (min-width: 1025px) {
    #sentimentPieChart.sentiment-pie-chart {
        height: 400px !important;
    }
}

/* Responsive adjustments for sentiment layout */
@media (max-width: 768px) {
    .sentiment-widgets-column .widget-card {
        min-height: 150px;
    }
    
    .sentiment-chart-column {
        min-height: 400px;
    }
    
    .sentiment-chart-column .chart-card {
        min-height: 400px;
    }
}

@media (max-width: 576px) {
    .sentiment-widgets-column .widget-card {
        min-height: 120px;
    }
    
    .sentiment-chart-column {
        min-height: 300px;
    }
    
    .sentiment-chart-column .chart-card {
        min-height: 300px;
    }
}

/* ========================================
   USER BASED METRICS CARD STYLES
   ======================================== */
.user-based-metrics-card {
    /* background: rgba(25, 27, 32, 0.3);  */
    background: #161616;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 400px;
    backdrop-filter: blur(10px);
}

/* Header Styles */
.metrics-header {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-text {
    flex: 1;
}

.header-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    min-width: 90px;
    flex-shrink: 0;
    position: relative;
    cursor: help;
    transition: all 0.2s ease;
}

.header-score:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #04d384;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.score-label {
    font-size: 0.75rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Tooltip Styles */
.header-score::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: 320px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header-score::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.header-score:hover::before,
.header-score:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

.header-score:hover::after {
    transform: translateX(-50%) translateY(100%);
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.header-icon i {
    font-size: 1.2rem;
    color: #ff0084;
}

.metrics-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metrics-description {
    font-size: 1.0rem;
    color: #ffffff;
    margin: 0;
    opacity: 0.9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Metrics List Styles - Row Layout */
.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    position: relative;
    z-index: 1;
    flex: 1;
    justify-content: space-evenly;
}

.metric-item {
    display: grid;
    grid-template-columns: 2fr auto 1fr;
    align-items: center;
    padding: 1rem 0;
    min-height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 2rem;
    transition: all 0.2s ease;
}

.metric-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 0 -0.5rem;
    padding: 1rem 0.5rem;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-info {
    justify-self: start;
}

.metric-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-name i {
    font-size: 1.2rem;
    color: #ff0084;
    opacity: 0.8;
    width: 1.2rem;
    text-align: center;
}

.metric-formula {
    font-size: 0.9rem;
    color: #cccccc;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metric-values {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    justify-self: start;
}

.metric-change {
    justify-self: end;
}

.column-header-current-period {
    justify-self: start;
    font-weight: 600;
    color: #04d384;
    font-size: 0.8rem;
    text-align: center;
    background: rgba(4, 211, 132, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(4, 211, 132, 0.2);
    min-width: 80px;
    transition: all 0.2s ease;
}

.column-header-previous-period {
    justify-self: end;
    font-weight: 600;
    color: #ffc107;
    font-size: 0.8rem;
    text-align: center;
    background: rgba(255, 193, 7, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 193, 7, 0.2);
    min-width: 80px;
    transition: all 0.2s ease;
}

.column-header-current-period:hover,
.column-header-previous-period:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: #04d384;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metric-change {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1da1f2;
    background: #23262f;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 1px 4px 0 rgba(29, 161, 242, 0.08);
}

.metric-change.up {
    color: #04d384;
    background: #23262f;
    box-shadow: 0 2px 8px 0 rgba(4, 211, 132, 0.08);
}

.metric-change.down {
    color: #ff4d4d;
    background: #2a1a1a;
    box-shadow: 0 2px 8px 0 rgba(255, 77, 77, 0.08);
}

.metric-change.neutral {
    color: #ffc107;
    background: #23262f;
    box-shadow: 0 2px 8px 0 rgba(255, 193, 7, 0.08);
}

/* Loading Animation */
.bx-spin {
    animation: spin 1s linear infinite;
}

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

/* Loading State - Row Layout */
.loading-state {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    justify-content: space-evenly;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-based-metrics-card {
        padding: 1.5rem;
        min-height: 300px;
    }
    
    .metrics-title {
        font-size: 1.2rem;
    }
    
    .header-icon {
        width: 36px;
        height: 36px;
    }
    
    .header-icon i {
        font-size: 1.1rem;
    }
    
    .header-score {
        min-width: 80px;
        padding: 0.5rem 0.75rem;
    }
    
    .score-value {
        font-size: 1.3rem;
    }
    
    .score-label {
        font-size: 0.7rem;
    }
    
    .metrics-list {
        gap: 0.75rem;
    }
    
    .loading-state {
        gap: 0.75rem;
    }
    
    .metric-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        min-height: 70px;
        padding: 1rem 0;
        text-align: center;
    }
    
    .metric-info {
        justify-self: center;
    }
    
    .metric-values {
        justify-self: center;
    }
    
    .metric-change {
        justify-self: center;
    }
    
    .metric-name i {
        font-size: 1.1rem;
        width: 1.1rem;
    }
    
    /* Chart responsive fixes */
    .chart-wrapper {
        padding-bottom: 50%;
    }
    
    .gauge-chart-wrapper {
        padding-bottom: 60%;
    }
    
    .chart-card {
        min-height: 300px;
        background: #161616;
    }
    
    .gauge-chart-card {
        min-height: 300px;
    }
    
    /* Multi-metrics card responsive */
    .multi-metrics-card {
        padding: 1rem;
        min-height: 120px;
    }
    
    .multi-metrics-project {
        font-size: 1.2rem;
    }
    
    .multi-metrics-main-metric {
        font-size: 1.5rem;
    }
    
    .multi-metrics-badge {
        font-size: 0.9rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .user-based-metrics-card {
        padding: 1rem;
        min-height: 250px;
    }
    
    .metrics-title {
        font-size: 1.1rem;
    }
    
    .header-icon {
        width: 32px;
        height: 32px;
    }
    
    .header-icon i {
        font-size: 0.9rem;
    }
    
    .header-score {
        min-width: 70px;
        padding: 0.4rem 0.6rem;
    }
    
    .score-value {
        font-size: 1.1rem;
    }
    
    .score-label {
        font-size: 0.65rem;
    }
    
    .metrics-list {
        gap: 0.5rem;
    }
    
    .loading-state {
        gap: 0.5rem;
    }
    
    .metric-item {
        min-height: 50px;
        padding: 0.75rem 0;
    }
    
    .metric-name {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .metric-name i {
        font-size: 1.1rem;
        width: 1.1rem;
    }
    
    .metric-formula {
        font-size: 0.7rem;
    }
    
    .metric-value {
        font-size: 1.1rem;
    }
    
    .metric-change {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
    
    .column-header-current-period,
    .column-header-previous-period {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        min-width: 60px;
    }
    
    /* Chart responsive fixes for small screens */
    .chart-wrapper {
        padding-bottom: 60%;
    }
    
    .gauge-chart-wrapper {
        padding-bottom: 70%;
    }
    
    .chart-card {
        min-height: 250px;
    }
    
    .gauge-chart-card {
        min-height: 250px;
    }
    
    /* Multi-metrics card responsive for small screens */
    .multi-metrics-card {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    .multi-metrics-project {
        font-size: 1rem;
    }
    
    .multi-metrics-main-metric {
        font-size: 1.2rem;
    }
    
    .multi-metrics-badge {
        font-size: 0.8rem;
        padding: 0.15rem 0.5rem;
    }
    
    .multi-metrics-avatar {
        width: 48px;
        height: 48px;
        margin-bottom: 0.75rem;
    }
}



/* Custom Scrollbar Styling */
*::-webkit-scrollbar {
    width: 0px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* DataTable Custom Styles */
.dataTables_wrapper .dropdown-item {
    color: white !important;
}

.dataTables_wrapper .dropdown-item:hover {
    background-color: #ff0084 !important;
}

th {
    color: white !important;
}

.dataTables_wrapper {
    padding: 1rem;
}

.dataTables_wrapper .dataTables_length select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    border-radius: 6px;
}

.dataTables_wrapper .dataTables_filter input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_info {
    color: #888;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    margin: 0 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #1788e4;
    border-color: #1788e4;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

table.dataTable {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-top: 1rem;
    background: rgba(26, 27, 34, 0.95);
    border-radius: 12px;
    overflow: hidden;
}

table.dataTable thead th {
    background: rgba(21, 23, 28, 0.95);
    color: white;
    font-weight: 500;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table.dataTable tbody td {
    padding: 1rem;
    color: #ddd;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

table.dataTable tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

table.dataTable tbody tr:last-child td {
    border-bottom: none;
}

.table>:not(caption)>*>* {
    background-color: #161616 !important;
}

.plane_anchor {
    text-decoration: none !important;
    color: white !important;
}

/* Search Styles */
.search-container {
    position: relative;
    margin: 1rem 0;
    max-width: 600px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: #1788e4;
    box-shadow: 0 0 0 2px rgba(23, 136, 228, 0.1);
}

.search-icon {
    color: #888;
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 0.95rem;
    padding: 0.25rem 0;
    outline: none;
}

.search-input::placeholder {
    color: #888;
}

.search-indicator {
    display: none;
    margin-left: 0.75rem;
}

.htmx-request .search-indicator {
    display: block;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(
        145deg,
        rgba(26, 27, 34, 0.95) 0%,
        rgba(21, 23, 28, 0.95) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    padding: 0.5rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    margin-bottom: 0.25rem;
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-handle {
    color: #888;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.search-no-results i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.htmx-request .search-results {
    display: block;
}

/* Logo Section Styles */
.logo-section {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(90deg, #fff 0%, #1788e4 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Dropdown Styles */
.dropdown-menu .dropdown-item {
    color: #fff !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-item:focus {
    background: #ff0084;
    color: #fff;
}

/* Metrics Navbar */
.matricsNav-container {
    display: flex;
    gap: 10px;
}

.btn-matricsNav {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-matricsNav:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-matricsNav.active {
    background: #ff0084;
    border-color: #ff0084;
    color: #fff;
}

.matricsNav-scroll {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
}

.matricsNav-inline {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.matricsNav-scroll::-webkit-scrollbar {
    height: 0px;
}

.matricsNav .nav-item:active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.matricsNav-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.nav-link.btn.btn-matricsNav {
    white-space: nowrap;
}

.dropdown-menu {
    z-index: 1050;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu:not(:last-child) {
    margin-bottom: 0.75rem;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
    position: absolute;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-submenu.show > .dropdown-menu {
    display: block;
}

/* Navigation Styles */
.top-nav {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.nav-button i {
    font-size: 1.1rem;
}

.nav-profile {
    margin-left: auto;
}

.nav-button.profile {
    background-color: #f0f0f0;
}

.nav-button.profile:hover {
    background-color: #e5e5e5;
}

/* Project Navigation Bar Styles */
.project-nav {
    background: linear-gradient(145deg, rgba(26, 27, 34, 0.95) 0%, rgba(21, 23, 28, 0.95) 100%);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateY(-1px);
    color: white !important;
}

.nav-button.active {
    background: rgba(23, 136, 228, 0.1);
    color: #1788e4;
    border-color: rgba(23, 136, 228, 0.2);
}

.nav-button i {
    font-size: 1.25rem;
}

.nav-button span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Project Avatar Styles */
.project-avatar {
    width: 128px;
    height: 128px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.project-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.nav-dropdown .dropdown-toggle:hover,
.nav-dropdown .dropdown-toggle:focus {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateY(-1px);
}

.nav-dropdown .dropdown-toggle i.bx-chevron-down {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-dropdown .dropdown-toggle[aria-expanded="true"] i.bx-chevron-down {
    transform: rotate(180deg);
}

.nav-dropdown .dropdown-menu {
    background: linear-gradient(145deg, rgba(26, 27, 34, 0.98) 0%, rgba(21, 23, 28, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

.nav-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown .dropdown-item.active {
    background: rgba(23, 136, 228, 0.1);
    color: #1788e4;
}

.nav-dropdown .dropdown-item i {
    font-size: 1.1rem;
}

/* Metrics Grid Layout */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
    height: 100%;
}

.metrics-grid-x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
    height: 100%;
}

.metrics-grid-x4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
    height: 100%;
}

.metrics-grid > * {
    min-height: 200px;
    height: 100%;
}

.metric-widget {
    background: linear-gradient(
        145deg,
        rgba(26, 27, 34, 0.95) 0%,
        rgba(21, 23, 28, 0.95) 100%
    );
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.metric-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.metric-header i {
    font-size: 1.5rem;
    color: #1788e4;
}

.metric-header h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.metric-content {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.metric-value {
    color: #04d384;
    font-size: 2rem;
    font-weight: 600;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.metric-change.positive {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.metric-change.negative {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.metric-change.neutral {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.metric-footer {
    color: #888;
    font-size: 0.85rem;
    margin-top: auto;
}

/* Widget Card Styles */
.widget-card {
    background: #161616;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 180px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1788e4, #ff0084, #04d384);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.widget-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.widget-card:hover::before {
    opacity: 1;
}

/* Enhanced Sentiment Card Styles */
.enhanced-sentiment-card {
    background: linear-gradient(135deg, #ff0084 0%, #ff4da6 25%, #2c1810 75%, #1a0f0a 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: none;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    padding: 1.5rem;
    min-height: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: white;
    margin-bottom: 0;
}

/* Override any card-like styling for the HTMX container */
#enhanced-sentiment-widget.metdfgnt {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.enhanced-sentiment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0.8;
    pointer-events: none;
}

.enhanced-sentiment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Sentiment Card Header */
.sentiment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.sentiment-card-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sentiment-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.sentiment-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
    line-height: 1.2;
}

.sentiment-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.5rem 0 0 0;
    line-height: 1.4;
}

.sentiment-card-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sentiment-category-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sentiment-category-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.sentiment-action-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sentiment-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Sentiment Card Content */
.sentiment-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 2rem 0;
}

.sentiment-main-metric {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60%;
}

.sentiment-score {
    font-size: 6rem;
    font-weight: 800;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    line-height: 1;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.sentiment-trend-indicator {
    font-size: 2rem;
}

.sentiment-description-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 1.5rem 0 0.5rem 0;
    line-height: 1.3;
}

/* Sentiment Label Styles */
.sentiment-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.sentiment-label:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sentiment-label.positive {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sentiment-label.neutral {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sentiment-label.negative {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


.sentiment-detailed-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Sentiment Card Visuals */
.sentiment-card-visuals {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.sentiment-emoji-display {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sentiment-emoji-large {
    font-size: 3rem;
    opacity: 0.9;
    animation: float 3s ease-in-out infinite;
}

.sentiment-emoji-large:nth-child(2) {
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Sentiment Card Footer */
.sentiment-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.sentiment-change-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sentiment-change-positive {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4ade80;
}

.sentiment-change-negative {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f87171;
}

.sentiment-change-period {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.sentiment-pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.pagination-dot.active {
    width: 24px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
}

/* Error State */
.sentiment-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.sentiment-error-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.sentiment-error-text h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.sentiment-error-text p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* AI Sentiment Analysis Styles */
.ai-sentiment-analysis {
    background: #161616;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    height: 100%;
    min-height: 400px;
}

.ai-sentiment-analysis::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1788e4, #ff0084, #04d384);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-sentiment-analysis:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.ai-sentiment-analysis:hover::before {
    opacity: 1;
}

.analysis-header {
    margin-bottom: 2rem;
    text-align: left;
}

.analysis-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.analysis-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

.analysis-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.analysis-summary h4 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.analysis-summary p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.key-insights {
    margin: 1.5rem 0;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #ff0084;
}

.insight-item i {
    font-size: 1.2rem;
}

.insight-item span {
    color: white;
    font-weight: 500;
}

.analysis-recommendation {
    background: rgba(255, 0, 132, 0.1);
    border: 1px solid rgba(255, 0, 132, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: auto;
}

.analysis-recommendation h5 {
    color: #ff0084;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.analysis-recommendation p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

/* Sentiment Distribution Card Styles */
.sentiment-distribution-card {
    background: #161616;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.sentiment-distribution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1788e4, #ff0084, #04d384);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sentiment-distribution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.sentiment-distribution-card:hover::before {
    opacity: 1;
}

.chart-header {
    text-align: left;
    margin-bottom: 1.5rem;
}

.chart-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.chart-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

.pie-chart-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-color.positive {
    background: linear-gradient(135deg, #ff0084, #ff4da6);
}

.legend-color.neutral {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.legend-color.negative {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.legend-label {
    color: white;
    font-weight: 500;
    flex: 1;
}

.legend-value {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Enhanced Sentiment Card Responsive Styles */
@media (max-width: 1200px) {
    .enhanced-sentiment-card {
        padding: 1.25rem;
        min-height: 450px;
    }
    
    .sentiment-score {
        font-size: 5.5rem;
    }
    
    .sentiment-description-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .enhanced-sentiment-card {
        padding: 1rem;
        min-height: 400px;
        margin-bottom: 1.5rem;
    }
    
    .sentiment-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .sentiment-card-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .sentiment-score {
        font-size: 5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sentiment-trend-indicator {
        font-size: 1.5rem;
    }
    
    .sentiment-description-text {
        font-size: 1rem;
    }
    
    .sentiment-detailed-description {
        font-size: 0.9rem;
    }
    
    .sentiment-emoji-large {
        font-size: 2.5rem;
    }
    
    .sentiment-card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .sentiment-pagination {
        align-self: flex-end;
    }
}

@media (max-width: 576px) {
    .enhanced-sentiment-card {
        padding: 0.75rem;
        min-height: 350px;
        margin-bottom: 1rem;
    }
    
    .sentiment-title h3 {
        font-size: 1.25rem;
    }
    
    .sentiment-description {
        font-size: 0.8rem;
    }
    
    .sentiment-score {
        font-size: 4.5rem;
    }
    
    .sentiment-description-text {
        font-size: 0.9rem;
    }
    
    .sentiment-detailed-description {
        font-size: 0.8rem;
    }
    
    .sentiment-emoji-large {
        font-size: 2rem;
    }
    
    .sentiment-emoji-display {
        gap: 0.5rem;
    }
    
    .sentiment-change-positive,
    .sentiment-change-negative {
        font-size: 1rem;
    }
    
    .sentiment-change-period {
        font-size: 0.8rem;
    }
}

.widget-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #23262f;
    background: #23262f;
}

.widget-project {
    font-size: 1.5rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.widget-main-metric {
    font-size: 2.0rem;
    font-weight: 800;
    color: #04d384;
    margin-bottom: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

.topic-widget-main-metric {
    font-size: 1.5rem;
    font-weight: 800;
    color: #04d384;
    margin-bottom: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

.widget-badge {
    display: inline-flex;
    align-items: center;
    background: #23262f;
    color: #1da1f2;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.25rem 0.8rem;
    margin-left: 0.5rem;
    box-shadow: 0 2px 8px 0 rgba(29, 161, 242, 0.08);
}

.widget-badge.negative {
    color: #ff4d4d;
    background: #2a1a1a;
}

.widget-label {
    color: #b0b3b8;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.widget-total {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.2rem;
}

.widget-handle {
    color: #b0b3b8;
    font-size: 0.98rem;
    margin-bottom: 0.5rem;
}

/* Enhanced Metric Widget Styles */
.metric-widget-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}

.metric-widget-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1788e4, #0d6efd);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(23, 136, 228, 0.3);
}

.metric-icon i {
    font-size: 1.25rem;
    color: white;
}

.metric-icon.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.metric-title-section {
    flex: 1;
    min-width: 0;
}

.metric-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.metric-description {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.metric-description:hover {
    opacity: 1;
}

.metric-info-icon {
    font-size: 0.75rem;
    color: #b0b3b8;
    cursor: help;
}

.metric-description-text {
    font-size: 0.75rem;
    color: #b0b3b8;
    line-height: 1.2;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-value-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    justify-content: center;
    gap: 0.75rem;
}

.metric-main-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #04d384;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(4, 211, 132, 0.2);
}

.metric-change-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
}

.change-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.change-badge.positive {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

.change-badge.negative {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.change-badge.neutral {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #212529;
}

.change-badge i {
    font-size: 0.875rem;
}

.metric-footer {
    text-align: center;
    margin-top: auto;
}

.comparison-text {
    font-size: 0.8rem;
    color: #b0b3b8;
    font-weight: 500;
}

.metric-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    gap: 1rem;
}

.error-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(200, 35, 51, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(220, 53, 69, 0.3);
}

.error-icon i {
    font-size: 1.5rem;
    color: #dc3545;
}

.error-message {
    color: #b0b3b8;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* Widget Description Styles */
.widget-description {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.widget-description:hover {
    opacity: 1;
}

.widget-info-icon {
    font-size: 0.75rem;
    color: #b0b3b8;
    cursor: help;
}

.widget-description-text {
    font-size: 0.8rem;
    color: #ffffff;
    line-height: 1.2;
    /*max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; */
}

/* Widget Dropdown Styles */
.widget-dropdown {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
}

.widget-dropdown .btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.widget-dropdown .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.widget-dropdown .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.widget-dropdown .dropdown-menu {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.widget-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.widget-dropdown .dropdown-item:hover {
    background: rgba(255, 0, 132, 0.1);
    color: #ff0084;
}

.widget-dropdown .dropdown-item i {
    font-size: 1rem;
    width: 16px;
}

/* Fade-in starting state */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When HTMX injects the loaded content */
.fade-in.htmx-added {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delays based on card order */
.widget-card:nth-child(1) .fade-in { transition-delay: 10.0s; }
.widget-card:nth-child(2) .fade-in { transition-delay: 0.3s; }
.widget-card:nth-child(3) .fade-in { transition-delay: 0.5s; }
.widget-card:nth-child(4) .fade-in { transition-delay: 0.7s; }
/* add more as needed */


/* ========================================
   MULTI METRICS CARD STYLES
   ======================================== */
.multi-metrics-card {
    background: linear-gradient(135deg, #191b20 100%, #ff0084 100%);
    border-radius: 20px;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.0);
    padding: 1.2rem 1rem 1rem 1rem;
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100px;
}

.multi-metrics-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #23262f;
    background: #23262f;
}

.multi-metrics-project {
    font-size: 1.5rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.multi-metrics-main-metric {
    font-size: 2.0rem;
    font-weight: 800;
    color: #04d384;
    margin-bottom: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

.multi-metrics-badge {
    display: inline-flex;
    align-items: center;
    background: #23262f;
    color: #1da1f2;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.25rem 0.8rem;
    margin-left: 0.5rem;
    box-shadow: 0 2px 8px 0 rgba(29, 161, 242, 0.08);
}

.multi-metrics-badge.negative {
    color: #ff4d4d;
    background: #2a1a1a;
}

.multi-metrics-label {
    color: #b0b3b8;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.multi-metrics-total {
    font-size: 1.rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.2rem;
}

.multi-metrics-handle {
    color: #b0b3b8;
    font-size: 0.98rem;
    margin-bottom: 0.5rem;
}

.multi-metrics-description {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.multi-metrics-description:hover {
    opacity: 1;
}

.multi-metrics-info-icon {
    font-size: 0.75rem;
    color: #b0b3b8;
    cursor: help;
}

.multi-metrics-description-text {
    font-size: 0.75rem;
    color: #b0b3b8;
    line-height: 1.2;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ========================================
   CHART CARD STYLES
   ======================================== */


.chart-card {
    background: transparent !important;
    border-radius: 15px;
    padding: 2px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.0);
    
    transition: border-color 0.3s ease-in-out;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gauge-chart-card {
    background: transparent !important;
    border-radius: 15px;
    padding: 2px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.0);
    transition: border-color 0.3s ease-in-out;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gauge-chart-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}


.chart-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 40%;
    height: 0;
    flex: 1;
}

.chart-wrapper > div {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

.gauge-chart-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    min-height: 0; /* Allow flexbox to control height */
}

.gauge-chart-wrapper > div {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    margin: 0 auto;
    min-height: 0; /* Allow flexbox to control height */
}

#gaugeChart {
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
    max-width: 100%;
    margin: 0 auto;
    min-height: 0; /* Allow flexbox to control height */
}

.line-chart {
    width: 100%;
    height: 100%;
    max-height: 1000px;
}

.custom-card-title {
    font-size: 1.0rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.btn-timeframe {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 0.375rem 0.75rem;
    font-size: 1.0rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-timeframe:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.timeframe-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-timeframe.active {
    background: #ff0084;
    border-color: #ff0084;
    color: #fff;
}

.header-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    align-items: center;
    gap: 10px;
}

/* DataTable Button Styles */
.dt-buttons .btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    margin-right: 0.5rem;
}

.dt-buttons .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Chart Options */
.chart-options {
    display: flex;
    gap: 1rem;
}

.form-select,
.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.form-select:focus,
.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #1788e4;
    color: white;
    box-shadow: 0 0 0 2px rgba(23, 136, 228, 0.1);
}

.form-select option {
    background: #1a1b22;
    color: white;
}

#customMetricChart {
    width: 100%;
    height: 400px;
    margin-top: 1rem;
}

/* ApexCharts Customization */
.apexcharts-gridlines-horizontal line,
.apexcharts-gridlines-vertical line {
    stroke: rgba(255, 255, 255, 0.1);
}

.apexcharts-xaxis-label,
.apexcharts-yaxis-label {
    fill: rgba(255, 255, 255, 0.6);
}

.apexcharts-tooltip {
    background: rgba(26, 27, 34, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px !important;
}

.apexcharts-tooltip-title {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.apexcharts-tooltip-text-y-label,
.apexcharts-tooltip-text-y-value {
    color: white !important;
}

.apexcharts-legend {
    margin-top: 25px !important;
}

/* Analytics Styles */
.advance_analytics h4 {
    color: #ffffff;
}

.advance_analytics .graph_title {
    color: #ffffff;
}

@media (min-width: 1600px) {
    .multi-metrics-project {
        font-size: 1.2rem;
    }
    
    .multi-metrics-main-metric {
        font-size: 1.5rem;
    }
    
    .multi-metrics-badge {
        font-size: 1.0rem;
    }
    
    .multi-metrics-label {
        font-size: 0.8rem;
    }
    
    .multi-metrics-total {
        font-size: 1.2rem;
    }
    
    .multi-metrics-description-text {
        font-size: 0.5rem;
    }
  
    .custom-card-title {
        font-size: 0.8rem;
    }

    #gaugeChart {
        height: 70vh;
        max-height: 1000px;
        max-width: 1000px;
    }
    
    .chart-card {
        height: 100%;
        min-height: 400px;
        background: #161616;
    }

    .gauge-chart-card {
        background: #161616 !important;
        border-radius: 15px;
        padding: 2px;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.0);
        transition: border-color 0.3s ease-in-out;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        height: 96.5%;
        border: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 400px;
    }

    .large-chart-card {
        height: 50%;
        min-height: 500px;
    }
    
    .widget-card {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
        min-height: 150px;
    }
    
    .widget-main-metric {
        font-size: 2.5rem;
    }
    
    .widget-project {
        font-size: 1.0rem;
    }
    
    .widget-badge {
        font-size: 1.2rem;
        padding: 0.3rem 1rem;
    }

    .btn-timeframe {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #888;
        padding: 0.375rem 0.75rem;
        font-size: 0.4rem;
        border-radius: 6px;
        transition: all 0.2s ease;
    }
    
    .metrics-title {
        font-size: 1.0rem;
        font-weight: 600;
        color: #ffffff;
        margin: 0 0 0.5rem 0;
        letter-spacing: 0.3px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .metric-value {
        font-size: 0.8rem;
    }

    .metrics-description {
        font-size: 0.7rem;
        color: #ffffff;
        margin: 0;
        opacity: 0.9;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .metric-name {
        font-size: 0.8rem;
        font-weight: 500;
        color: #ffffff;
        margin: 0 0 0.25rem 0;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .metric-formula {
        font-size: 0.7rem;
        color: #cccccc;
        margin: 0;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        text-overflow: ellipsis;
    }
}


/* Responsive Gauge Chart Sizing */
@media (min-width: 1920px) {
    .custom-card-title {
        font-size: 1.0rem;
        font-weight: 500;
        color: #fff;
        margin-bottom: 0.5rem;
        letter-spacing: 0.5px;
    }

    #gaugeChart {
        height: 70vh;
        max-height: 1000px;
        max-width: 1000px;
    }
    
    .chart-card {
        height: 100%;
        min-height: 400px;
        background: #161616;
    }

    .gauge-chart-card {
        background: #161616 !important;
        border-radius: 15px;
        padding: 2px;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.0);
        transition: border-color 0.3s ease-in-out;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        height: 96.5%;
        border: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 400px;
    }

    .large-chart-card {
        height: 50%;
        min-height: 500px;
    }
    
    .widget-card {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
        min-height: 150px;
    }
    
    .widget-main-metric {
        font-size: 2.5rem;
    }
    
    .widget-project {
        font-size: 1.0rem;
    }
    
    .widget-badge {
        font-size: 1.2rem;
        padding: 0.3rem 1rem;
    }

    .btn-timeframe {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #888;
        padding: 0.375rem 0.75rem;
        font-size: 0.6rem;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .metrics-title {
        font-size: 1.0rem;
        font-weight: 600;
        color: #ffffff;
        margin: 0 0 0.5rem 0;
        letter-spacing: 0.3px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .metrics-description {
        font-size: 0.7rem;
        color: #ffffff;
        margin: 0;
        opacity: 0.9;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .metric-name {
        font-size: 0.8rem;
        font-weight: 500;
        color: #ffffff;
        margin: 0 0 0.25rem 0;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .metric-formula {
        font-size: 0.7rem;
        color: #cccccc;
        margin: 0;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }
    
    
    .column-header-current-period {
        justify-self: start;
        font-weight: 600;
        color: #04d384;
        font-size: 0.6rem;
        text-align: center;
        background: rgba(4, 211, 132, 0.1);
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        border: 1px solid rgba(4, 211, 132, 0.2);
        min-width: 80px;
        transition: all 0.2s ease;
    }
    
    .column-header-previous-period {
        justify-self: end;
        font-weight: 600;
        color: #ffc107;
        font-size: 0.6rem;
        text-align: center;
        background: rgba(255, 193, 7, 0.1);
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        border: 1px solid rgba(255, 193, 7, 0.2);
        min-width: 80px;
        transition: all 0.2s ease;
    }

    .metric-modal-content {
        min-height: 90vh;
        width: 1000px !important;
        max-width: 80vw !important;
        margin: 5% auto;
        padding: 0;
        border: none;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        animation: modalSlideIn 0.3s ease;
        overflow: hidden;
        position: relative;
        transition: all 0.3s ease;
    }

    .sentiment-title h3 {
        font-size: 1.3rem;
        font-weight: 700;
        margin: 0;
        color: white;
        line-height: 1.2;
    }
    
    .sentiment-description {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.8);
        margin: 0.5rem 0 0 0;
        line-height: 1.4;
    }

    .sentiment-card-visuals {
        display: flex;
        justify-content: center;
        margin-bottom: 0rem;
        position: relative;
        z-index: 2;
    }

    .sentiment-card-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        z-index: 2;
        padding: 0rem 0;
    }

    .sentiment-detailed-description {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.4;
    }

    .analysis-title {
        color: white;
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .sentiment-score {
        font-size: 4rem;
        font-weight: 800;
        color: white;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        line-height: 1;
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .analysis-summary h4 {
        color: white;
        font-size: 1.0rem;
        font-weight: 600;
        margin-bottom: 1rem;
    }
    
    .analysis-summary p {
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.6;
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }

    .widget-description-text {
        font-size: 0.65rem;
        color: #ffffff;
        line-height: 1.2;
        /*max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap; */
    }
    
}

@media (min-width: 2560px) {
    .custom-card-title {
        font-size: 1.3rem;
        font-weight: 500;
        color: #fff;
        margin-bottom: 0.5rem;
        letter-spacing: 0.5px;
    }

    #gaugeChart {
        height: 60vh;
        max-height: 1200px;
        max-width: 1200px;
        background: #161616;
    }
    
    .chart-card {
        height: 100%;
        min-height: 500px;
        background: #161616 !important;
    }
    
    .widget-card {
        padding: 2.5rem 2rem 2rem 2rem;
        min-height: 180px;
    }
    
    .widget-main-metric {
        font-size: 3rem;
    }
    
    .widget-project {
        font-size: 1.3rem;
    }
    
    .widget-badge {
        font-size: 1.3rem;
        padding: 0.4rem 1.2rem;
    }
    
    .widget-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }
    
    .metrics-grid {
        gap: 2rem;
    }
    
    .metrics-grid > * {
        min-height: 250px;
    }
    .btn-timeframe {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #888;
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .metrics-title {
        font-size: 1.3rem;
        font-weight: 600;
        color: #ffffff;
        margin: 0 0 0.5rem 0;
        letter-spacing: 0.3px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .metrics-description {
        font-size: 0.8rem;
        color: #ffffff;
        margin: 0;
        opacity: 0.9;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .metric-name {
        font-size: 1.0rem;
        font-weight: 500;
        color: #ffffff;
        margin: 0 0 0.25rem 0;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .metric-formula {
        font-size: 0.9rem;
        color: #cccccc;
        margin: 0;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }   
   
    .metric-value {
        font-size: 0.9rem;
    }

    .metric-change {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.9rem;
        padding: 0.25rem 0.5rem;
        border-radius: 6px;
    }

    .column-header-current-period {
        justify-self: start;
        font-weight: 600;
        color: #04d384;
        font-size: 0.7rem;
        text-align: center;
        background: rgba(4, 211, 132, 0.1);
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        border: 1px solid rgba(4, 211, 132, 0.2);
        min-width: 80px;
        transition: all 0.2s ease;
    }
    
    .column-header-previous-period {
        justify-self: end;
        font-weight: 600;
        color: #ffc107;
        font-size: 0.7rem;
        text-align: center;
        background: rgba(255, 193, 7, 0.1);
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        border: 1px solid rgba(255, 193, 7, 0.2);
        min-width: 80px;
        transition: all 0.2s ease;
    }

    .sentiment-title h3 {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0;
        color: white;
        line-height: 1.2;
    }
    
    .sentiment-description {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
        margin: 0.5rem 0 0 0;
        line-height: 1.4;
    }

    .sentiment-score {
        font-size: 6rem;
        font-weight: 800;
        color: white;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        line-height: 1;
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    
}

@media (min-width: 3400px) {
    .btn-timeframe {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #888;
        padding: 0.375rem 0.75rem;
        font-size: 1.0rem;
        border-radius: 6px;
        transition: all 0.2s ease;
    }
    
    .custom-card-title {
        font-size: 2.5rem;
        font-weight: 500;
        color: #fff;
        margin-bottom: 0.5rem;
        letter-spacing: 0.5px;
    }

    #gaugeChart {
        height: 85vh;
        max-height: 1500px;
        max-width: 1500px;
    }
    
    .chart-card {
        height: 100%;
        min-height: 600px;
    }
    
    .widget-card {
        padding: 3rem 2.5rem 2.5rem 2.5rem;
        min-height: 220px;
    }
    
    .widget-main-metric {
        font-size: 3.5rem;
    }
    
    .widget-project {
        font-size: 1.8rem;
    }
    
    .widget-badge {
        font-size: 1.5rem;
        padding: 0.5rem 1.5rem;
    }
    
    .widget-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 2rem;
    }
    
    .metrics-grid {
        gap: 2.5rem;
    }
    
    .metrics-grid > * {
        min-height: 300px;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1400px) {
    .logo-image {
        height: 100px;
    }
}

@media (max-width: 1200px) {
    .logo-image {
        height: 80px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .logo-section {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-button span {
        display: none;
    }

    .nav-button {
        padding: 0.5rem;
    }

    .nav-button i {
        font-size: 1.3rem;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .metric-widget {
        padding: 1.25rem;
    }

    .metric-value {
        font-size: 1.75rem;
    }

    .widget-description-text {
        max-width: 150px;
        font-size: 0.7rem;
    }

    .nav-buttons {
        gap: 0.5rem;
    }

    .nav-button {
        padding: 0.5rem 0.75rem;
    }

    .nav-button span {
        font-size: 0.85rem;
    }

    .nav-dropdown .dropdown-toggle {
        padding: 0.5rem 0.75rem;
    }

    .nav-dropdown .dropdown-toggle span {
        font-size: 0.85rem;
    }

    .nav-dropdown .dropdown-menu {
        min-width: 180px;
    }

    .project-avatar {
        width: 48px;
        height: 48px;
    }

    /* Enhanced Widget Responsive Styles */
    .widget-card {
        padding: 1rem;
        min-height: 160px;
    }

    .metric-icon {
        width: 32px;
        height: 32px;
    }

    .metric-icon i {
        font-size: 1rem;
    }

    .metric-title {
        font-size: 0.9rem;
    }

    .metric-main-value {
        font-size: 2rem;
    }

    .change-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .metric-description-text {
        max-width: 150px;
        font-size: 0.7rem;
    }
    
    /* Chart responsive improvements */
    .chart-card {
        min-height: 300px;
    }
    
    .gauge-chart-card {
        min-height: 300px;
        background: #161616;
    }
    
    /* Modal responsive improvements */
    .metric-modal-content {
        width: 90%;
        max-height: 80vh;
    }
    
    .modal-chart-container {
        height: 300px;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .nav-button span {
        display: none;
    }

    .nav-button {
        padding: 0.5rem;
    }

    .nav-button i {
        font-size: 1.35rem;
    }

    .widget-description-text {
        max-width: 120px;
        font-size: 0.65rem;
    }

    .nav-dropdown .dropdown-toggle span {
        display: none;
    }

    .nav-dropdown .dropdown-toggle {
        padding: 0.5rem;
    }

    .nav-dropdown .dropdown-toggle i {
        font-size: 1.35rem;
    }

    .nav-dropdown .dropdown-menu {
        min-width: 160px;
    }

    /* Enhanced Widget Mobile Styles */
    .widget-card {
        padding: 0.75rem;
        min-height: 140px;
    }

    .metric-widget-header {
        gap: 0.5rem;
    }

    .metric-icon {
        width: 28px;
        height: 28px;
    }

    .metric-icon i {
        font-size: 0.875rem;
    }

    .metric-title {
        font-size: 0.8rem;
    }

    .metric-main-value {
        font-size: 1.75rem;
    }

    .change-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    .metric-description-text {
        max-width: 120px;
        font-size: 0.65rem;
    }

    .comparison-text {
        font-size: 0.7rem;
    }
    
    /* Chart responsive for very small screens */
    .chart-wrapper {
        padding-bottom: 70%;
    }
    
    .gauge-chart-wrapper {
        padding-bottom: 80%;
    }
    
    .chart-card {
        min-height: 200px;
    }
    
    .gauge-chart-card {
        min-height: 200px;
    }
    
    /* Grid responsive for very small screens */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .metrics-grid-x3 {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid-x4 {
        grid-template-columns: 1fr;
    }
    
    /* Modal responsive for very small screens */
    .metric-modal-content {
        width: 95%;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .modal-chart-container {
        height: 250px;
        margin-bottom: 0.75rem;
    }
}

/* Section Sub-heading Styles */
.section-subheading {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.section-subheading h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.section-subheading .bx {
    font-size: 1.2rem;
    color: #ff0084;
    opacity: 0.9;
}

.section-subheading:hover {
    border-color: rgba(255, 0, 132, 0.3);
    box-shadow: 0 4px 20px rgba(255, 0, 132, 0.1);
    transition: all 0.3s ease;
}

/* Clickable Widget Styles */
.clickable-widget {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clickable-widget:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.clickable-widget:active {
    transform: translateY(-2px);
}

/* Clickable Metric Item Styles */
.metric-item.clickable-widget {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 0.25rem 0;
}

.metric-item.clickable-widget:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.metric-item.clickable-widget:active {
    transform: translateX(2px);
}

/* Metric Modal Styles */
.metric-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(26, 27, 34, 0.8) 100%);
    backdrop-filter: blur(12px);
    animation: modalFadeIn 0.4s ease-out;
}

.metric-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-modal-content {
    background: linear-gradient(145deg, 
        rgba(26, 27, 34, 0.98) 0%, 
        rgba(21, 23, 28, 0.98) 50%,
        rgba(15, 17, 22, 0.98) 100%);
    border: 1px solid rgba(255, 0, 132, 0.3);
    border-radius: 20px;
    width: 80%;
    max-width: 800px;
    max-height: 70vh;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 40px rgba(255, 0, 132, 0.1);
    backdrop-filter: blur(20px);
    animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.metric-modal-content:hover {
    box-shadow: 
        0 30px 100px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 60px rgba(255, 0, 132, 0.2);
    transform: translateY(-2px);
}

.metric-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff0084, #1788e4, #04d384, #ff0084);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

.metric-modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 0, 132, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(23, 136, 228, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 20px;
}

.metric-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 0, 132, 0.2);
    background: linear-gradient(135deg, 
        rgba(255, 0, 132, 0.1) 0%, 
        rgba(23, 136, 228, 0.05) 50%,
        rgba(4, 211, 132, 0.05) 100%);
    position: relative;
    z-index: 1;
}

.metric-modal-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.metric-modal-close {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 0, 132, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.metric-modal-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 0, 132, 0.2) 0%, rgba(23, 136, 228, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.metric-modal-close:hover {
    border-color: #ff0084;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 0, 132, 0.3);
}

.metric-modal-close:hover::before {
    opacity: 1;
}

.metric-modal-close i {
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.metric-modal-body {
    padding: 1.5rem;
    height: calc(70vh - 100px);
    overflow-y: auto;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.02) 0%, 
        rgba(255, 255, 255, 0.01) 100%);
}

.metric-modal-body::-webkit-scrollbar {
    width: 6px;
}

.metric-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.metric-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.metric-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-chart-container {
    width: 100%;
    height: 400px;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    backdrop-filter: blur(5px);
    margin-bottom: 1.5rem;
}

/* Metric Details Section */
.metric-details-section {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.03) 0%, 
        rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(5px);
}

.metric-details-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 0, 132, 0.2);
}

.metric-details-header h4 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.metric-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-stat-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-stat-item:hover {
    background: rgba(255, 0, 132, 0.05);
    border-color: rgba(255, 0, 132, 0.2);
    transform: translateY(-2px);
}

.stat-label {
    color: #b0b3b8;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.metric-description,
.metric-insights {
    margin-bottom: 1.5rem;
}

.metric-description h5,
.metric-insights h5 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.metric-description p {
    color: #b0b3b8;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.metric-insights ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #b0b3b8;
    font-size: 0.9rem;
    line-height: 1.6;
}

.metric-insights li {
    margin-bottom: 0.5rem;
    position: relative;
}

.metric-insights li::marker {
    color: #ff0084;
}

.metric-insights li::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.5rem;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #ff0084, #1788e4);
    border-radius: 50%;
}

.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #b0b3b8;
    gap: 1rem;
    background: linear-gradient(135deg, 
        rgba(255, 0, 132, 0.05) 0%, 
        rgba(23, 136, 228, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-loading i {
    font-size: 2rem;
    color: #ff0084;
    animation: pulse 2s ease-in-out infinite;
}

.chart-loading p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Modal Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .metric-modal-content {
        width: 90%;
        max-height: 80vh;
    }
    
    .metric-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .metric-modal-header h3 {
        font-size: 1.25rem;
    }
    
    .metric-modal-body {
        padding: 1rem;
        height: calc(80vh - 80px);
    }
    
    .modal-chart-container {
        height: 300px;
        margin-bottom: 1rem;
    }
    
    .metric-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .metric-details-section {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .metric-modal-content {
        width: 95%;
        border-radius: 12px;
        max-height: 85vh;
    }
    
    .metric-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .metric-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .metric-modal-close {
        width: 35px;
        height: 35px;
    }
    
    .metric-modal-close i {
        font-size: 1rem;
    }
    
    .metric-modal-body {
        padding: 0.75rem;
        height: calc(85vh - 70px);
    }
    
    .modal-chart-container {
        height: 250px;
        margin-bottom: 0.75rem;
    }
    
    .metric-details-section {
        padding: 0.75rem;
    }
    
    .metric-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .metric-stat-item {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .metric-description h5,
    .metric-insights h5 {
        font-size: 0.9rem;
    }
    
    .metric-description p,
    .metric-insights ul {
        font-size: 0.8rem;
    }
}

/* Bootstrap Modal Override - Ensure modal is visible */
.modal.fade.show {
    display: block !important;
    opacity: 1 !important;
}

.modal-backdrop.show {
    opacity: 0.5 !important;
}

.modal-content {
    background: #1a1b20 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    color: #fff !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.modal-body {
    background: transparent !important;
    color: #fff !important;
}

/* Custom Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.show {
    opacity: 1;
}

.custom-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.custom-modal-dialog {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    z-index: 10000;
}

.custom-modal-content {
    background: #1a1b20;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-height: 80vh;
    overflow-y: auto;
}

.custom-modal-content .modal-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-modal-content .modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
}

.custom-modal-content .btn-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.custom-modal-content .btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.custom-modal-content .modal-body {
    padding: 1.5rem;
    background: transparent;
    color: #fff;
}

/* ========================================
   DATE NAVIGATION STYLES
   ======================================== */
.date-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-navigation .btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.date-navigation .btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.date-navigation .btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.date-navigation .btn i {
    font-size: 16px;
}

.date-navigation span {
    min-width: 80px;
    text-align: center;
    font-weight: 500;
}

.sentiment-date {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Funky viewing text styling */
.viewing-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ff0084;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(45deg, #ff0084, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 8px rgba(255, 0, 132, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 8px rgba(255, 0, 132, 0.5);
    }
    to {
        text-shadow: 0 0 15px rgba(255, 0, 132, 0.8), 0 0 20px rgba(0, 212, 255, 0.4);
    }
}

/* ========================================
   ENHANCED HEADER SECTION STYLES
   ======================================== */
.header-section {
    position: relative;
    margin-bottom: 2rem;
}

.header-container {
    background: rgba(26, 27, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Removed colorful top border */

/* Removed gradient overlay background */

.header-container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.header-text {
    flex: 1;
}

.header-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* Simplified - using solid color instead of gradient */
    position: relative;
}

/* Removed title underline accent */

.header-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
}

/* Section Card Wrapper */
.section-card {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    margin: 3rem 0 2rem 0;
    overflow: hidden;
}

.section-card .card-body {
    padding: 2rem;
}

/* Responsive adjustments for section card */
@media (max-width: 768px) {
    .section-card .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .section-card .card-body {
        padding: 1rem;
    }
}

/* Core Metrics Section Header with Connection */
.core-metrics-header {
    margin: 0.5rem 0 0 0;
    text-align: center;
    position: relative;
}

.core-metrics-header::after {
    content: '';
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.section-title {
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-icon {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 0, 132, 0.1), rgba(23, 136, 228, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.title-icon i {
    font-size: 1.8rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.title-icon:hover {
    background: linear-gradient(135deg, rgba(255, 0, 132, 0.2), rgba(23, 136, 228, 0.2));
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.title-icon:hover i {
    color: #ff0084;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.title-underline {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff0084, #1788e4);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.section-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Responsive adjustments for core metrics header */
@media (max-width: 768px) {
    .core-metrics-header {
        margin: 3rem 0 1.5rem 0;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Removed chevron icon indicator */

/* Enhanced Project Avatar */
.header-section .project-avatar {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-section .project-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 18px;
}

.header-section .project-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.header-section .project-avatar:hover::before {
    opacity: 1;
}

.header-section .project-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.header-section .project-avatar:hover .project-avatar-image {
    transform: scale(1.1);
}

/* Responsive Header Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-title {
        font-size: 2rem;
    }
    
    .header-description {
        font-size: 1rem;
    }
    
    .header-section .project-avatar {
        width: 60px;
        height: 60px;
    }
    
    .header-badge {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .header-title {
        font-size: 1.75rem;
    }
    
    .header-description {
        font-size: 0.95rem;
    }
    
    .header-section .project-avatar {
        width: 50px;
        height: 50px;
    }
    
    .header-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   MAINTENANCE NOTICE BANNER
   ======================================== */
.maintenance-notice {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

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

.maintenance-notice-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    max-width: 100%;
    margin: 0 auto;
}

.maintenance-notice-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.maintenance-notice-icon i {
    color: #ffffff;
}

.maintenance-notice-text {
    flex: 1;
    min-width: 0;
}

.maintenance-notice-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.maintenance-notice-message {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
}

.maintenance-notice-close {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.maintenance-notice-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.maintenance-notice-close:active {
    transform: scale(0.95);
}

.maintenance-notice-close i {
    font-size: 1.25rem;
}

/* Banner is now in document flow, so no padding adjustment needed */

/* Responsive adjustments for maintenance notice */
@media (max-width: 768px) {
    .maintenance-notice-content {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .maintenance-notice-icon {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
    
    .maintenance-notice-title {
        font-size: 1rem;
    }
    
    .maintenance-notice-message {
        font-size: 0.85rem;
    }
    
    .maintenance-notice-close {
        width: 28px;
        height: 28px;
    }
    
    .maintenance-notice-close i {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .maintenance-notice-content {
        padding: 0.75rem 0.875rem;
        gap: 0.625rem;
        flex-wrap: wrap;
    }
    
    .maintenance-notice-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .maintenance-notice-text {
        flex: 1 1 calc(100% - 80px);
        min-width: 200px;
    }
    
    .maintenance-notice-title {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
    }
    
    .maintenance-notice-message {
        font-size: 0.8rem;
    }
    
    .maintenance-notice-close {
        width: 26px;
        height: 26px;
        order: -1;
        margin-left: auto;
    }
    
    .maintenance-notice-close i {
        font-size: 1rem;
    }
}