/* Enhanced Overview Dashboard Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: white;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

.hero-content {
    flex: 1;
    z-index: 2;
    position: relative;
}

.company-branding {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.company-avatar {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.company-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(45deg, #ffffff, #f1f3f4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.company-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0 0 1rem 0;
    font-weight: 400;
}

.period-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.hero-action-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.hero-action-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-action-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.btn-icon {
    font-size: 1.2rem;
}

.hero-visual {
    flex: 0 0 400px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.animated-chart-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
}

/* Executive Summary */
.executive-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.summary-card.primary-metric {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.summary-card.secondary-metric {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.summary-card.health-metric {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.metric-icon {
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.metric-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

.metric-status.positive .status-indicator {
    background: #10b981;
}

.metric-status.warning .status-indicator {
    background: #f59e0b;
}

.metric-status.negative .status-indicator {
    background: #ef4444;
}

.metric-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    opacity: 0.9;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.metric-context {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.change-indicator {
    font-weight: 600;
}

.change-indicator.positive {
    color: #10b981;
}

.change-indicator.negative {
    color: #ef4444;
}

.metric-sparkline {
    height: 50px;
    margin-top: 1rem;
    opacity: 0.8;
    position: relative;
}

.metric-sparkline canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Health Score Ring */
.health-score-ring {
    width: 50px;
    height: 50px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: #10b981;
    stroke-width: 2.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Insights Section */
.insights-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.section-icon {
    font-size: 1.3rem;
}

.section-subtitle {
    color: #6b7280;
    margin: 0;
    font-size: 0.95rem;
}

.insights-filters {
    display: flex;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 12px;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.filter-btn.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.insight-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

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

.insight-card.opportunity {
    border-left-color: #10b981;
}

.insight-card.risk {
    border-left-color: #ef4444;
}

.insight-card.trend {
    border-left-color: #8b5cf6;
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.insight-icon {
    font-size: 1.25rem;
}

.insight-priority {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.insight-priority.high {
    background: #fef2f2;
    color: #dc2626;
}

.insight-priority.medium {
    background: #fef3c7;
    color: #d97706;
}

.insight-priority.low {
    background: #f0f9ff;
    color: #2563eb;
}

.insight-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.insight-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Performance Overview */
.performance-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

.overview-chart-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: auto;
}

.overview-chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.overview-chart-card.featured {
    grid-row: span 2;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 0.25rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 8px;
}

.chart-control-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.chart-control-btn.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-container {
    height: 200px;
    position: relative;
    padding: 0.5rem;
    box-sizing: border-box;
}

.chart-container.compact {
    height: 140px;
    padding: 0.25rem;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

.chart-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.trend-indicators {
    display: flex;
    gap: 1rem;
}

.trend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.trend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.trend-dot.revenue {
    background: #3b82f6;
}

.trend-dot.profit {
    background: #10b981;
}

.trend-dot.margin {
    background: #8b5cf6;
}

/* Ratios Display */
.ratios-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ratio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
}

.ratio-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.ratio-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.ratio-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.ratio-status.warning {
    background: #f59e0b;
}

.ratio-status.danger {
    background: #ef4444;
}

/* Cash Overview */
.cash-overview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cash-metric {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cash-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.cash-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.cash-trend {
    height: 80px;
    position: relative;
    margin-top: 0.5rem;
}

.cash-trend canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Account Summary */
.account-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    flex: 1;
}

.account-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
    overflow: hidden;
    min-height: 40px;
}

.account-type-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
    flex: 1;
    margin-right: 0.5rem;
}

.account-type-count {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    background: #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.account-type-total {
    font-size: 0.85rem;
    font-weight: 600;
    color: #059669;
    flex-shrink: 0;
    text-align: right;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Data Coverage */
.data-coverage {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    flex: 1;
}

.coverage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f0f9ff;
    border-radius: 6px;
    border-left: 3px solid #0ea5e9;
}

.coverage-label {
    font-size: 0.9rem;
    color: #0369a1;
    font-weight: 500;
}

.coverage-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e40af;
}

/* Next Steps */
.next-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    flex: 1;
}

.next-steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem;
    border-radius: 8px;
}

.timeline-step:hover {
    background: #f9fafb;
    transform: translateX(4px);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3182ce, #667eea);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.step-description {
    font-size: 0.875rem;
    color: #718096;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.step-time {
    font-size: 0.75rem;
    color: #3182ce;
    font-weight: 500;
    background: rgba(49, 130, 206, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #fef3c7;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
    transition: all 0.2s ease;
    cursor: pointer;
}

.step-item:hover {
    background: #fef9c3;
    transform: translateX(2px);
}

.step-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.9rem;
    color: #92400e;
    font-weight: 500;
}

/* Quick Actions Section */
.quick-actions-section {
    margin-bottom: 2rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.action-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.action-description {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .performance-overview {
        grid-template-columns: 1fr 1fr;
    }
    
    .overview-chart-card.featured {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .hero-visual {
        flex: none;
        width: 100%;
        margin-top: 1.5rem;
    }
    
    .company-branding {
        flex-direction: column;
        text-align: center;
    }
    
    .company-name {
        font-size: 2rem;
    }
    
    .performance-overview {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .insights-filters {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .executive-summary {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading States */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .summary-card:not(.primary-metric):not(.secondary-metric):not(.health-metric) {
        background: #1f2937;
        color: white;
        border-color: #374151;
    }

    .overview-chart-card {
        background: #1f2937;
        color: white;
        border-color: #374151;
    }

    .section-title {
        color: white;
    }

    .quick-action-card {
        background: #1f2937;
        color: white;
        border-color: #374151;
    }
}

/* ============================================
   APPLE-QUALITY ENHANCED COMPONENTS
   Following Apple design principles:
   - Minimalism & generous white space
   - Refined typography
   - Sophisticated micro-interactions
   - Progressive disclosure
   ============================================ */

/* Enhanced Insights Section */
.insights-section-enhanced {
    margin: 3rem 0;
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.insights-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.insights-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
}

.insights-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1f2937;
    margin: 0;
}

.insights-subtitle {
    font-size: 0.95rem;
    color: #718096;
    margin: 0.25rem 0 0 0;
}

.insights-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.insights-score .score-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.insights-score .score-circle {
    width: 100%;
    height: 100%;
}

.score-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.score-fill {
    fill: none;
    stroke: #10b981;
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}

.insights-score .score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    z-index: 10;
}

.insights-score .score-label {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

.section-header-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.section-icon-svg {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(49, 130, 206, 0.1);
    color: #3182ce;
}

.section-title-clean {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1f2937;
    margin: 0;
}

/* Filter Chips */
.insights-filters,
.filter-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.filter-chip {
    padding: 0.625rem 1.25rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: #3182ce;
    color: #3182ce;
    transform: translateY(-1px);
}

.filter-chip.active {
    background: #3182ce;
    border-color: #3182ce;
    color: white;
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-chip.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Enhanced Insights Grid */
.insights-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .insights-grid-enhanced {
        grid-template-columns: 1fr;
    }
}

/* Empty Insights State */
.empty-insights {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: #f9fafb;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.empty-insights-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

.empty-insights h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.empty-insights p {
    font-size: 0.95rem;
    color: #718096;
    margin: 0;
}

/* Enhanced Insight Card */
.insight-card-enhanced {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    position: relative;
}

.insight-card-enhanced.category-opportunity {
    border-left-color: #38a169;
}

.insight-card-enhanced.category-risk {
    border-left-color: #c53030;
}

.insight-card-enhanced.category-action {
    border-left-color: #3182ce;
}

.insight-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Insight Header */
.insight-card-header,
.insight-header-enhanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.insight-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.insight-card-enhanced:hover .insight-icon-circle {
    transform: scale(1.1);
}

.chip-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.insight-icon-circle.category-opportunity {
    background: rgba(56, 161, 105, 0.1);
    color: #38a169;
}

.insight-icon-circle.category-risk {
    background: rgba(197, 48, 48, 0.1);
    color: #c53030;
}

.insight-icon-circle.category-action {
    background: rgba(49, 130, 206, 0.1);
    color: #3182ce;
}

.insight-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-category-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #718096;
    font-weight: 600;
}

.insight-priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.insight-priority-badge.priority-critical {
    background: #c53030;
    color: white;
    animation: pulse-urgent 2s ease-in-out infinite;
}

.insight-priority-badge.priority-high {
    background: #dd6b20;
    color: white;
}

.insight-priority-badge.priority-medium {
    background: #3182ce;
    color: white;
}

.insight-priority-badge.priority-low {
    background: #38a169;
    color: white;
}

@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Insight Content */
.insight-content-enhanced {
    flex: 1;
}

.insight-title-enhanced {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.insight-description-enhanced {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

/* Score Display */
.insight-score-display {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 12px;
    margin: 1rem 0;
}

.score-circle {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.score-ring {
    position: relative;
    width: 100px;
    height: 100px;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    z-index: 10;
}

.score-label {
    text-align: center;
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
    margin-top: 0.5rem;
}

.score-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.score-label {
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
}

.score-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3182ce, #667eea);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Data Points */
.insight-data-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 12px;
    margin: 1rem 0;
}

.data-point {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-point-label {
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
}

.data-point-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

/* Impact Statement */
.insight-impact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(56, 161, 105, 0.1);
    border-radius: 8px;
    margin: 1rem 0;
}

.impact-icon {
    display: flex;
    color: #38a169;
    flex-shrink: 0;
}

.impact-text {
    font-size: 0.875rem;
    color: #2f855a;
    font-weight: 500;
    line-height: 1.5;
}

/* Recommendations List */
.insight-recommendations {
    margin: 1rem 0;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 12px;
}

.recommendations-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
}

.recommendations-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.5;
}

.recommendation-item::before {
    content: '→';
    color: #3182ce;
    font-weight: 600;
    flex-shrink: 0;
}

/* Insight Footer */
.insight-action,
.insight-footer-enhanced {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.insight-action-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    background: #f7fafc;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.insight-action-btn:hover {
    background: rgba(49, 130, 206, 0.1);
    color: #3182ce;
}

.insight-action-btn:active {
    transform: scale(0.98);
}

.insight-action-btn.urgent {
    background: #c53030;
    color: white;
}

.insight-action-btn.urgent:hover {
    background: #9b2c2c;
}

.action-text {
    font-weight: 600;
}

.insight-timeframe {
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    background: #f7fafc;
    border-radius: 12px;
    white-space: nowrap;
}

.action-timeframe {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: 0.5rem;
}

/* Professional Next Steps Timeline */
.next-steps-enhanced {
    margin: 3rem 0;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.next-steps-header {
    margin-bottom: 2rem;
    text-align: center;
}

.next-steps-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.next-steps-subtitle {
    font-size: 1rem;
    color: #718096;
    margin: 0;
}

/* Timeline */
.steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-item-enhanced {
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-item-enhanced:hover {
    transform: translateX(4px);
}

.step-item-enhanced[data-locked="true"] {
    opacity: 0.6;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.step-number-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3182ce, #667eea);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
    position: relative;
}

.step-number-circle.locked {
    background: #e2e8f0;
    color: #a0aec0;
    box-shadow: none;
}

.step-connector {
    width: 2px;
    flex: 1;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

.step-item-enhanced:last-child .step-connector {
    display: none;
}

/* Step Content */
.step-content {
    flex: 1;
    padding: 0.5rem 0;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.step-duration {
    font-size: 0.875rem;
    color: #718096;
    padding: 0.25rem 0.75rem;
    background: #f7fafc;
    border-radius: 12px;
}

.step-description {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

/* Step Progress */
.step-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3182ce, #667eea);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

/* Step Actions */
.step-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.step-action-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-action-btn.primary {
    background: #3182ce;
    color: white;
}

.step-action-btn.primary:hover {
    background: #2c5aa0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.step-action-btn.primary:active {
    transform: translateY(0);
}

.step-action-btn.secondary {
    background: #f7fafc;
    color: #1f2937;
}

.step-action-btn.secondary:hover {
    background: #e2e8f0;
}

/* Step Preview */
.step-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.preview-badge {
    padding: 0.5rem 0.75rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

/* Sparkline Styles */
.metric-sparkline {
    margin-top: 1rem;
    height: 40px;
    position: relative;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
}

.sparkline-line {
    vector-effect: non-scaling-stroke;
}

.sparkline-area {
    transition: opacity 0.3s ease;
}

.sparkline-dot {
    transition: r 0.2s ease;
    cursor: pointer;
}

.summary-card:hover .sparkline-dot {
    r: 4;
}

.sparkline-dot-last {
    filter: drop-shadow(0 0 3px currentColor);
}

.sparkline-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
}

.sparkline-empty line {
    opacity: 0.3;
}

/* SVG Icon Styles */
.section-icon-svg svg,
.insight-icon-circle svg,
.step-action-btn svg,
.insight-action-btn svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .section-header-minimal {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .insights-filters {
        flex-wrap: wrap;
        width: 100%;
    }

    .filter-chip {
        flex: 1;
        justify-content: center;
        min-width: fit-content;
    }

    .step-item-enhanced {
        flex-direction: column;
    }

    .step-indicator {
        flex-direction: row;
        width: 100%;
    }

    .step-connector {
        width: auto;
        height: 2px;
        flex: 1;
        margin: 0 0.5rem;
    }

    .step-actions {
        flex-direction: column;
    }

    .step-action-btn {
        width: 100%;
        justify-content: center;
    }

    .insight-data-points {
        grid-template-columns: 1fr;
    }

    .next-steps-enhanced {
        padding: 1.5rem 1rem;
    }
}