/* Monthly Insights Page Styles - Matching Vrid Theme */

/* Hero Section */
.insights-hero {
    background: url("../img/bg/banner-bg.webp") bottom center no-repeat;
    background-size: cover;
    margin: 110px 5% 0;
    padding: 80px 0 60px;
    position: relative;
    z-index: 1;
    border-radius: 20px;
}

.hero-header {
    text-align: center;
    margin-bottom: 50px;
}

.hero-header h1 {
    font-size: 56px;
    color: #fff;
    margin-bottom: 12px;
}

.hero-header .subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

/* Month Selector */
.month-selector-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.month-label {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.custom-select-wrapper {
    position: relative;
    background: rgba(47, 49, 66, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 10px 20px 10px 45px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.custom-select-wrapper:hover {
    border-color: #FFD500;
}

.custom-select-wrapper.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.select-icon {
    position: absolute;
    left: 15px;
    color: #FFD500;
}

.dropdown-arrow {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.5);
}

/* Month Navigation Buttons */
.month-nav-btn {
    background: rgba(47, 49, 66, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.month-nav-btn:hover:not(:disabled) {
    border-color: #FFD500;
    color: #FFD500;
    transform: scale(1.05);
}

.month-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.latest-badge-container {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.latest-nav-btn {
    background: rgba(255, 213, 0, 0.1);
    color: #FFD500;
    border: 1px solid rgba(255, 213, 0, 0.3);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.latest-nav-btn i {
    font-size: 16px;
}

.latest-nav-btn:hover {
    background: rgba(255, 213, 0, 0.2);
    border-color: #FFD500;
    transform: translateY(-2px);
}

/* Custom Modal Overlay for Month Picker */
.month-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 17, 30, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.month-picker-content {
    background: #2F3142;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    animation: slideUp 0.3s forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.month-picker-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #2F3142;
    z-index: 2;
}

.month-picker-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.close-modal-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s;
}

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

.month-picker-body {
    padding: 24px;
}

.year-group {
    margin-bottom: 24px;
}

.year-group:last-child {
    margin-bottom: 0;
}

.year-title {
    font-size: 14px;
    color: #FFD500;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.year-title::after {
    content: '';
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    flex-grow: 1;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.month-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 12px;
    padding: 12px 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.month-pill:hover:not(.disabled) {
    background: rgba(255, 213, 0, 0.15);
    border-color: #FFD500;
    color: #FFD500;
    transform: translateY(-2px);
}

.month-pill.active {
    background: linear-gradient(135deg, #FFD500, #FFA500);
    color: #181B2E;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255, 213, 0, 0.3);
}

.month-pill.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* States */
.loading-state,
.error-state {
    text-align: center;
    padding: 40px;
    background: rgba(47, 49, 66, 0.9);
    border-radius: 16px;
    margin-top: 20px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #FFD500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.error-icon {
    font-size: 3rem;
    color: #ff7675;
    margin-bottom: 10px;
}

.retry-btn {
    background: linear-gradient(135deg, #FFD500 0%, #FFA500 100%);
    color: #181B2E;
    border: none;
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.retry-btn:hover {
    transform: translateY(-2px);
}

/* Content Area */
.highlights-section {
    background: rgba(47, 49, 66, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 40px;
}

.highlights-section h2 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.highlights-section h2 i {
    color: #FFD500;
}

/* Collapsible Highlights */
.highlights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.highlights-header h2 {
    margin-bottom: 0 !important;
}

.toggle-icon {
    color: #fff;
    font-size: 28px;
    transition: transform 0.3s ease;
}

.highlights-section.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.highlights-content {
    margin-top: 20px;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.highlights-section.collapsed .highlights-content {
    max-height: 0;
    margin-top: 0;
}

/* Highlights Container */
.highlights-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Highlight Category Groups */
.highlight-group {
    padding: 24px 0 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.highlight-group:first-child {
    padding-top: 0;
    border-top: none;
}

.highlight-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 213, 0, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
    padding-left: 2px;
}

.highlight-group-label i {
    font-size: 16px;
    opacity: 0.8;
}

.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlights-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    line-height: 1.6;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s ease;
}

.highlights-list li:last-child {
    margin-bottom: 0;
}

.highlights-list li::before {
    content: 'stop_circle';
    font-family: 'Material Icons';
    flex-shrink: 0;
    line-height: 1;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
}

/* Importance Levels */
.highlights-list li.hl-lvl-high {
    color: #fff;
    font-weight: 500;
}

.highlights-list li.hl-lvl-high::before {
    content: 'stars';
    color: #FFD500;
}

.highlights-list li.hl-lvl-medium {
    color: rgba(255, 255, 255, 0.9);
}

.highlights-list li.hl-lvl-medium::before {
    content: 'check_circle';
    color: #00b894;
}

.highlights-list li.hl-lvl-low {
    color: rgba(255, 255, 255, 0.6);
}

.highlights-list li.hl-lvl-low::before {
    content: 'info';
    color: rgba(255, 255, 255, 0.3);
}

/* Inline Emphasis */
.hl-value {
    color: #FFD500;
    font-weight: 700;
}

.hl-trend {
    font-weight: 600;
    color: #fff;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: rgba(47, 49, 66, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 28px;
    color: #fff;
}

.sip-card .stat-icon {
    background: linear-gradient(135deg, #FFD500 0%, #FFA500 100%);
}

.equity-card .stat-icon {
    background: linear-gradient(135deg, #9a20bc 0%, #5a136d 100%);
}

.debt-card .stat-icon {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.accounts-card .stat-icon {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    font-family: "Poppins", sans-serif;
    white-space: nowrap;
    letter-spacing: 0.5px;
    background: none;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    -webkit-background-clip: initial;
}

.sip-card .stat-value {
    background: linear-gradient(135deg, #FFD500, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.equity-card .stat-value {
    background: linear-gradient(135deg, #e056fd, #be2edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.debt-card .stat-value {
    background: linear-gradient(135deg, #00cec9, #55efc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.accounts-card .stat-value {
    background: linear-gradient(135deg, #a29bfe, #74b9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.stat-change i {
    font-size: 14px;
}

.stat-change.positive {
    color: #00b894;
}

.stat-change.negative {
    color: #ff7675;
}

.stat-trend-link {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    transition: color 0.3s ease;
}

a.stat-card:hover .stat-trend-link {
    color: #FFD500;
}

/* Charts Section */
.charts-section {
    padding: 60px 0;
}

.charts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
}

.chart-card {
    background: #2F3142;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.half-width {
    flex: 1 1 calc(50% - 16px);
    min-width: 300px;
}

.full-width {
    width: 100%;
}

.chart-header {
    margin-bottom: 24px;
}

.chart-header h2 {
    font-size: 24px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.chart-header h2 i {
    color: #FFD500;
    font-size: 28px;
}

.chart-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.chart-container {
    height: 350px;
    width: 100%;
    position: relative;
}

.chart-container.horizontal-bar {
    height: 400px;
}

/* AUM Grid Styling */
.aum-grid-container {
    overflow-x: auto;
    width: 100%;
    margin-top: 16px;
}

.aum-grid {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.aum-grid th {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aum-grid td {
    padding: 16px;
    color: #fff;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.aum-grid tbody tr:last-child td {
    border-bottom: none;
}

.grid-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    min-width: 75px;
}

.grid-pill.positive {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

.grid-pill.negative {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.grid-pill.neutral {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Source Section */
.data-source-section {
    padding: 40px 0;
}

.source-card {
    background: rgba(47, 49, 66, 0.6);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: none;
    margin: 0;
}

.source-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.source-icon i {
    font-size: 28px;
    color: #fff;
}

.source-content h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 8px;
}

.source-content p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

.source-content a {
    color: #FFD500;
    font-weight: 600;
    text-decoration: none;
}

.source-content a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .insights-hero {
        margin: 100px 3% 0;
        padding: 60px 0 40px;
    }

    .hero-header h1 {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .insights-hero {
        margin: 90px 2% 0;
        padding: 40px 0 30px;
    }

    .hero-header h1 {
        font-size: 32px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 22px;
    }

    .half-width {
        flex: 1 1 100%;
    }

    .chart-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .chart-header h2 {
        font-size: 20px;
    }

    .source-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-header h1 {
        font-size: 28px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-icon i {
        font-size: 24px;
    }

    .stat-value {
        font-size: 20px;
    }

    .chart-container {
        height: 250px;
    }

    .chart-container.horizontal-bar {
        height: 350px;
    }
}