/* PropertyProAI Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin-right: 20px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.gradient-text {
    background: linear-gradient(135deg, #fff, #e8ecff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Upload Section Styles */
.upload-section {
    margin-bottom: 60px;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-area {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    padding: 80px 40px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 30px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(102, 126, 234, 0.2);
}

.upload-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.upload-icon {
    font-size: 5rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 5px 10px rgba(102, 126, 234, 0.3));
}

.upload-icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.upload-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

.upload-formats {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.format-badge {
    background: #f8f9ff;
    color: #667eea;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

#fileInput {
    display: none;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.15rem;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 1.3rem;
}

/* Features Section */
.features-section {
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 2s infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

.feature-card:nth-child(1) { --i: 1; }
.feature-card:nth-child(2) { --i: 2; }
.feature-card:nth-child(3) { --i: 3; }
.feature-card:nth-child(4) { --i: 4; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.feature-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 60px 40px;
    margin-bottom: 60px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 200px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.step-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.step-content p {
    font-size: 0.95rem;
    color: #666;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    position: relative;
    flex-shrink: 0;
}

.step-connector::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid #764ba2;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* Trust Section */
.trust-section {
    margin-bottom: 40px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.trust-icon {
    font-size: 1.5rem;
}

.trust-text {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

/* Loading Styles */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Section Styles */
.results {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.property-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.property-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.property-header .period {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-left: 5px solid;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card.critical {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff, #fdf2f2);
}

.summary-card.warning {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fff, #fdf9f2);
}

.summary-card.info {
    border-left-color: #3498db;
    background: linear-gradient(135deg, #fff, #f2f8fd);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #666;
}

/* Variance List Styles */
.variance-list {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.variance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.variance-item:hover {
    background: #f8f9ff;
}

.variance-item:last-child {
    border-bottom: none;
}

.variance-description {
    flex: 1;
}

.variance-account {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.variance-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.variance-amounts {
    text-align: right;
    margin-left: 20px;
}

.variance-ytd {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.variance-ptd {
    font-size: 0.9rem;
    color: #666;
}

.unfavorable {
    color: #e74c3c;
}

.favorable {
    color: #27ae60;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.badge-critical {
    background: #e74c3c;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

.badge-moderate {
    background: #3498db;
    color: white;
}

/* Recommendations Styles */
.recommendations {
    background: linear-gradient(135deg, #f8f9ff, #e8ecff);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #667eea;
}

.recommendations h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.recommendation-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.recommendation-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Buttons */
.new-analysis-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto;
}

.new-analysis-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }

    .header-logo {
        flex-direction: column;
        text-align: center;
    }

    .logo-icon {
        margin-right: 0;
        margin-bottom: 15px;
        width: 60px;
        height: 60px;
    }
    
    .upload-section {
        padding: 20px;
    }
    
    .variance-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .variance-amounts {
        margin-left: 0;
        text-align: left;
    }
}

/* Data Visualization Styles */

/* Variance Progress Bars */
.variance-progress {
    margin-top: 8px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.variance-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
    position: relative;
}

.variance-progress-bar.favorable {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.variance-progress-bar.unfavorable {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.variance-progress-bar.critical {
    background: linear-gradient(90deg, #e74c3c, #8b0000);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Visual Severity Indicators */
.severity-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.severity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: glow 2s ease-in-out infinite alternate;
}

.severity-dot.critical {
    background: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.severity-dot.warning {
    background: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.severity-dot.moderate {
    background: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

@keyframes glow {
    from { box-shadow: 0 0 5px currentColor; }
    to { box-shadow: 0 0 15px currentColor; }
}

/* Dashboard Overview */
.dashboard-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.variance-chart {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.chart-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* CSS Pie Chart */
.pie-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    background: conic-gradient(
        #e74c3c 0deg,
        #e74c3c var(--critical-angle, 90deg),
        #f39c12 var(--critical-angle, 90deg),
        #f39c12 var(--warning-angle, 180deg),
        #3498db var(--warning-angle, 180deg),
        #3498db var(--moderate-angle, 270deg),
        #27ae60 var(--moderate-angle, 270deg),
        #27ae60 360deg
    );
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.pie-chart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Variance Bars Chart */
.variance-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.variance-bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.variance-bar-label {
    min-width: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
}

.variance-bar-track {
    flex: 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.variance-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.variance-bar-value {
    min-width: 80px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Enhanced Summary Cards with Visual Elements */
.summary-card-enhanced {
    position: relative;
    overflow: hidden;
}

.summary-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    z-index: 1;
}

.card-icon {
    font-size: 2.5rem;
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0.1;
    z-index: 0;
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 0.8rem;
}

.trend-arrow {
    font-size: 1rem;
}

.trend-up {
    color: #27ae60;
}

.trend-down {
    color: #e74c3c;
}

/* Performance Gauge */
.performance-gauge {
    width: 120px;
    height: 60px;
    margin: 15px auto;
    position: relative;
}

.gauge-arc {
    width: 100%;
    height: 100%;
    border-radius: 120px 120px 0 0;
    border: 8px solid #f0f0f0;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.gauge-fill {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 120px 120px 0 0;
    border: 8px solid;
    border-bottom: none;
    transition: transform 1s ease;
    transform-origin: bottom center;
}

.gauge-fill.good {
    border-color: #27ae60;
}

.gauge-fill.warning {
    border-color: #f39c12;
}

.gauge-fill.critical {
    border-color: #e74c3c;
}

.gauge-label {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
}

/* Mobile Responsive for Data Viz */
@media (max-width: 768px) {
    .dashboard-overview {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pie-chart {
        width: 150px;
        height: 150px;
    }
    
    .chart-legend {
        gap: 10px;
    }
    
    .variance-bar-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .variance-bar-label {
        min-width: auto;
    }
}

/* Animated Loading for Charts */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    flex-direction: column;
    gap: 15px;
}

.chart-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.chart-loading-text {
    color: #666;
    font-size: 0.9rem;
}

/* Modern Variance Groups */
.variance-groups-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.variance-group {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.variance-group:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.variance-group.critical {
    border-left: 5px solid #e74c3c;
}

.variance-group.warning {
    border-left: 5px solid #f39c12;
}

.variance-group.moderate {
    border-left: 5px solid #3498db;
}

.variance-group-header {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9ff, #fff);
    transition: all 0.3s ease;
    user-select: none;
}

.variance-group-header:hover {
    background: linear-gradient(135deg, #f0f2ff, #f8f9ff);
}

.variance-group-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.variance-group-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.variance-group.critical .variance-group-icon {
    background: linear-gradient(135deg, #fee, #fff);
    color: #e74c3c;
}

.variance-group.warning .variance-group-icon {
    background: linear-gradient(135deg, #fff9e6, #fff);
    color: #f39c12;
}

.variance-group.moderate .variance-group-icon {
    background: linear-gradient(135deg, #e6f4ff, #fff);
    color: #3498db;
}

.variance-group-details {
    flex: 1;
}

.variance-group-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2c3e50;
}

.variance-group-subtitle {
    font-size: 0.95rem;
    color: #7f8c8d;
}

.variance-group-stats {
    display: flex;
    align-items: center;
    gap: 25px;
}

.variance-stat {
    text-align: center;
}

.variance-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.variance-stat-label {
    font-size: 0.8rem;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variance-group-toggle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.variance-group-toggle i {
    font-size: 1.2rem;
    color: #7f8c8d;
    transition: transform 0.3s ease;
}

.variance-group.expanded .variance-group-toggle {
    background: rgba(0,0,0,0.1);
}

.variance-group.expanded .variance-group-toggle i {
    transform: rotate(180deg);
}

.variance-group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #fafbfc;
}

.variance-group.expanded .variance-group-content {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f0f2ff;
    scroll-behavior: smooth;
    padding-right: 5px;
}

/* Custom scrollbar for webkit browsers */
.variance-group.expanded .variance-group-content::-webkit-scrollbar {
    width: 8px;
}

.variance-group.expanded .variance-group-content::-webkit-scrollbar-track {
    background: #f0f2ff;
    border-radius: 4px;
}

.variance-group.expanded .variance-group-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.variance-group.expanded .variance-group-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6d42a0);
}

.variance-items-grid {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Modernized Variance Item Cards */
.variance-item-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.variance-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.variance-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.variance-item-card.critical::before {
    color: #e74c3c;
}

.variance-item-card.warning::before {
    color: #f39c12;
}

.variance-item-card.moderate::before {
    color: #3498db;
}

.variance-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.variance-item-info {
    flex: 1;
}

.variance-item-code {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 600;
    margin-bottom: 4px;
}

.variance-item-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.variance-item-metrics {
    display: flex;
    gap: 30px;
    text-align: right;
}

.variance-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.variance-metric-label {
    font-size: 0.75rem;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variance-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.variance-metric-percent {
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 5px;
}

/* Variance Progress Bar Modernized */
.variance-progress-modern {
    margin-top: 12px;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.variance-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
    position: relative;
    background: linear-gradient(90deg, var(--progress-color), var(--progress-color-light));
}

.variance-progress-fill.critical {
    --progress-color: #e74c3c;
    --progress-color-light: #ff6b6b;
}

.variance-progress-fill.warning {
    --progress-color: #f39c12;
    --progress-color-light: #feca57;
}

.variance-progress-fill.moderate {
    --progress-color: #3498db;
    --progress-color-light: #54a0ff;
}

.variance-progress-fill.favorable {
    --progress-color: #27ae60;
    --progress-color-light: #2ed573;
}

/* Empty State */
.variance-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.variance-empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.variance-empty-text {
    font-size: 1.1rem;
}

/* Variance Summary Stats */
.variance-summary-bar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.variance-summary-item {
    text-align: center;
}

.variance-summary-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.variance-summary-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile Responsive for Modern Variances */
@media (max-width: 768px) {
    .variance-group-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .variance-group-info {
        width: 100%;
    }
    
    .variance-group-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .variance-item-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .variance-item-metrics {
        flex-direction: column;
        gap: 10px;
        text-align: left;
    }
    
    .variance-summary-bar {
        flex-direction: column;
        gap: 20px;
    }

    .variance-group.expanded .variance-group-content {
        max-height: 60vh;
    }

    .variance-items-grid {
        padding: 15px;
        gap: 12px;
    }
}

/* Smooth Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.variance-group {
    animation: slideIn 0.5s ease both;
}

.variance-group:nth-child(1) {
    animation-delay: 0.1s;
}

.variance-group:nth-child(2) {
    animation-delay: 0.2s;
}

.variance-group:nth-child(3) {
    animation-delay: 0.3s;
}

/* Modern Export Controls */
.export-controls {
    background: linear-gradient(135deg, #f8f9ff, #fff);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.export-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-subtitle {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.export-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.export-btn {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.export-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.export-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.export-btn:hover::before {
    left: 100%;
}

.export-btn-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.export-btn-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.export-btn-details {
    flex: 1;
}

.export-btn-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.export-btn-desc {
    font-size: 0.85rem;
    color: #7f8c8d;
    line-height: 1.4;
}

.export-btn.pdf .export-btn-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.export-btn.excel .export-btn-icon {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.export-btn.email .export-btn-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* Export Modal */
.export-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.export-modal.active {
    opacity: 1;
    visibility: visible;
}

.export-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.export-modal.active .export-modal-content {
    transform: scale(1);
}

.export-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.export-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.export-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.export-modal-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.export-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff, #e8ecff);
}

.export-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.export-option-label {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.export-option-desc {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.export-form-group {
    margin-bottom: 20px;
}

.export-form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.export-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.export-form-input:focus {
    outline: none;
    border-color: #667eea;
}

.export-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.export-modal-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.export-modal-btn.secondary {
    background: #ecf0f1;
    color: #7f8c8d;
}

.export-modal-btn.secondary:hover {
    background: #d5dbdb;
}

.export-modal-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.export-modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.export-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Export Progress */
.export-progress {
    display: none;
    text-align: center;
    padding: 30px;
}

.export-progress.active {
    display: block;
}

.export-progress-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.export-progress-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.export-progress-subtext {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.export-progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.export-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Export Success/Error States */
.export-result {
    display: none;
    text-align: center;
    padding: 30px;
}

.export-result.active {
    display: block;
}

.export-result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.export-result.success .export-result-icon {
    color: #27ae60;
}

.export-result.error .export-result-icon {
    color: #e74c3c;
}

.export-result-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.export-result.success .export-result-title {
    color: #27ae60;
}

.export-result.error .export-result-title {
    color: #e74c3c;
}

.export-result-text {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.export-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.export-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
    color: white;
}

/* Mobile Responsive for Export */
/* AI Insights Styles */
.ai-insights {
    background: linear-gradient(135deg, #f8f9ff, #e8ecff);
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
}

.ai-insights::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.05), transparent);
    animation: aiShimmer 3s ease-in-out infinite;
}

@keyframes aiShimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.ai-insights h3 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.ai-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.ai-insight-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.ai-insight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.ai-insight-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-insight-content {
    flex: 1;
}

.ai-insight-title {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-insight-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
}

.ai-insight-subtitle {
    font-size: 0.8rem;
    color: #888;
}

.ai-patterns-section,
.ai-next-steps {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.ai-patterns-section h4,
.ai-next-steps h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.ai-patterns-list,
.ai-steps-list {
    margin: 0;
    padding-left: 20px;
}

.ai-patterns-list li,
.ai-steps-list li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.5;
}

/* AI-Enhanced Recommendations */
.recommendation-item.ai-enhanced {
    border-left: 4px solid #667eea;
    background: linear-gradient(135deg, #ffffff, #f8f9ff);
    position: relative;
    overflow: hidden;
}

.recommendation-item.ai-enhanced::before {
    content: '🤖';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    opacity: 0.3;
}

.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-confidence,
.ai-learning {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.ai-learning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.action-items {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 3px solid #667eea;
}

.action-items strong {
    color: #667eea;
    display: block;
    margin-bottom: 10px;
}

.action-items ul {
    margin: 0;
    padding-left: 20px;
}

.action-items li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.4;
}

.action-items li:last-child {
    margin-bottom: 0;
}

/* Mobile Responsiveness for AI Features */
@media (max-width: 768px) {
    .export-buttons {
        grid-template-columns: 1fr;
    }
    
    .export-modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .export-modal-actions {
        flex-direction: column;
    }
    
    .export-modal-btn {
        width: 100%;
    }
    
    .ai-insights {
        padding: 20px;
        margin: 20px 0;
    }
    
    .ai-insights-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ai-insight-card {
        padding: 15px;
    }
    
    .ai-insight-value {
        font-size: 1.5rem;
    }
    
    .recommendation-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ai-confidence,
    .ai-learning {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
}

/* Dig Deeper Modal Styles */
.variance-item-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: flex-end;
}

.dig-deeper-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.dig-deeper-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dig-deeper-icon {
    font-size: 1rem;
}

.dig-deeper-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dig-deeper-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { 
        transform: translateY(30px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.dig-deeper-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.dig-deeper-modal-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dig-deeper-account-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dig-deeper-account-code {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    align-self: flex-start;
}

.dig-deeper-account-code.critical {
    background: rgba(231, 76, 60, 0.3);
}

.dig-deeper-account-code.warning {
    background: rgba(243, 156, 18, 0.3);
}

.dig-deeper-account-code.moderate {
    background: rgba(52, 152, 219, 0.3);
}

.dig-deeper-account-name {
    font-size: 1.4rem;
    font-weight: 600;
}

.dig-deeper-variance-summary {
    text-align: right;
}

.dig-deeper-variance-amount {
    font-size: 1.8rem;
    font-weight: bold;
}

.dig-deeper-variance-amount.favorable {
    color: #2ecc71;
}

.dig-deeper-variance-amount.unfavorable {
    color: #e74c3c;
}

.dig-deeper-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dig-deeper-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.dig-deeper-modal-body {
    padding: 0;
}

.dig-deeper-loading {
    padding: 60px;
    text-align: center;
}

.dig-deeper-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

.dig-deeper-loading-text h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.dig-deeper-loading-text p {
    color: #666;
    font-size: 1.1rem;
}

.dig-deeper-error {
    padding: 60px;
    text-align: center;
    color: #e74c3c;
}

.dig-deeper-error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.dig-deeper-error-text h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.dig-deeper-tabs {
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.dig-deeper-tab-buttons {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.dig-deeper-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 20px 15px;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dig-deeper-tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.dig-deeper-tab-btn.active {
    background: white;
    color: #667eea;
    font-weight: 600;
}

.dig-deeper-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.dig-deeper-tab-content {
    display: none;
    padding: 30px;
    max-height: 500px;
    overflow-y: auto;
}

.dig-deeper-tab-content.active {
    display: block;
}

.dig-deeper-section {
    margin-bottom: 40px;
}

.dig-deeper-section:last-child {
    margin-bottom: 0;
}

.dig-deeper-section h4 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Root Cause Analysis Styles */
.root-cause-analysis {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cause-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.cause-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cause-content {
    flex: 1;
}

.cause-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.cause-description {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.cause-likelihood {
    font-size: 0.9rem;
    font-weight: 500;
}

.likelihood-high {
    color: #e74c3c;
    font-weight: 600;
}

.likelihood-medium {
    color: #f39c12;
    font-weight: 600;
}

.likelihood-low {
    color: #27ae60;
    font-weight: 600;
}

/* Trend Analysis Styles */
.trend-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.trend-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.trend-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 8px;
}

.trend-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.trend-value.worsening {
    color: #e74c3c;
}

.trend-value.improving {
    color: #27ae60;
}

.trend-value.stable {
    color: #667eea;
}

/* Impact Analysis Styles */
.impact-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.impact-metric {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.impact-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 10px;
}

.impact-value {
    font-size: 1.4rem;
    font-weight: bold;
}

.impact-value.favorable {
    color: #27ae60;
}

.impact-value.unfavorable {
    color: #e74c3c;
}

/* Related Accounts Styles */
.related-accounts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.related-account-code {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.related-account-name {
    flex: 1;
    margin-left: 15px;
    color: #333;
}

.related-account-impact {
    font-weight: 600;
}

.related-account-impact.positive {
    color: #27ae60;
}

.related-account-impact.negative {
    color: #e74c3c;
}

.no-related {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 30px;
}

/* Benchmark Comparison Styles */
.benchmark-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.benchmark-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.benchmark-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.benchmark-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.benchmark-value.good {
    color: #27ae60;
}

.benchmark-value.average {
    color: #f39c12;
}

.benchmark-value.poor {
    color: #e74c3c;
}

/* Recommendations Styles */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.recommendation-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border-left: 5px solid #667eea;
}

.recommendation-item.priority-high {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fdf2f2, #f8f9fa);
}

.recommendation-item.priority-medium {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fffaf2, #f8f9fa);
}

.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.recommendation-priority {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.recommendation-item.priority-high .recommendation-priority {
    background: #e74c3c;
}

.recommendation-item.priority-medium .recommendation-priority {
    background: #f39c12;
}

.recommendation-impact {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.recommendation-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.recommendation-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.recommendation-actions {
    margin-bottom: 15px;
}

.recommendation-actions strong {
    color: #333;
    display: block;
    margin-bottom: 10px;
}

.recommendation-actions ol {
    margin-left: 20px;
    color: #666;
}

.recommendation-actions li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.recommendation-timeline {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
}

/* Risk Factors Styles */
.risk-factors {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.risk-factor {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #f39c12;
}

.risk-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.risk-content {
    flex: 1;
}

.risk-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.risk-description {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.risk-level {
    font-size: 0.9rem;
    font-weight: 500;
}

.risk-high {
    color: #e74c3c;
    font-weight: 600;
}

.risk-medium {
    color: #f39c12;
    font-weight: 600;
}

.risk-low {
    color: #27ae60;
    font-weight: 600;
}

/* Forecast Styles */
.forecast-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.forecast-scenario {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.scenario-title {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.scenario-value {
    font-size: 1.4rem;
    font-weight: bold;
}

.scenario-value.positive {
    color: #27ae60;
}

.scenario-value.negative {
    color: #e74c3c;
}

/* Action Priority Styles */
.action-priority {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.priority-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.priority-level {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.priority-indicator.urgent .priority-level {
    background: #e74c3c;
}

.priority-indicator.high .priority-level {
    background: #f39c12;
}

.priority-indicator.medium .priority-level {
    background: #667eea;
}

.priority-description {
    flex: 1;
    color: #666;
    line-height: 1.4;
}

.priority-timeline {
    color: #333;
    font-weight: 500;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .dig-deeper-modal {
        padding: 10px;
    }
    
    .dig-deeper-modal-content {
        max-height: 95vh;
    }
    
    .dig-deeper-modal-header {
        padding: 20px;
    }
    
    .dig-deeper-account-name {
        font-size: 1.2rem;
    }
    
    .dig-deeper-variance-amount {
        font-size: 1.4rem;
    }
    
    .dig-deeper-tab-buttons {
        flex-wrap: wrap;
    }
    
    .dig-deeper-tab-btn {
        flex: 1 1 50%;
        padding: 15px 10px;
        font-size: 0.9rem;
    }
    
    .dig-deeper-tab-content {
        padding: 20px;
        max-height: 400px;
    }
    
    .impact-metrics,
    .trend-analysis,
    .benchmark-comparison,
    .forecast-chart {
        grid-template-columns: 1fr;
    }
    
    .recommendation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .related-account {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .related-account-name {
        margin-left: 0;
    }
}

/* Header Actions Styles */
.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.settings-icon {
    font-size: 1.1rem;
}

/* Settings Modal Styles */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.settings-modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

.settings-modal-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.settings-modal-content.active {
    transform: translateY(0);
    opacity: 1;
}

/* Settings Header */
.settings-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    position: relative;
    border-radius: 24px 24px 0 0;
}

.settings-modal-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

.settings-modal-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.settings-modal-text h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.settings-modal-text p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.settings-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.settings-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Settings Body */
.settings-modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Settings Navigation */
.settings-navigation {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.settings-nav-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.settings-nav-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.settings-nav-icon {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.settings-nav-text {
    font-weight: 500;
    font-size: 1rem;
}

/* Settings Content */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.settings-tab {
    display: none;
    padding: 40px;
    min-height: 100%;
}

.settings-tab.active {
    display: block;
}

.settings-section {
    margin-bottom: 40px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.settings-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Provider Options */
.provider-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.provider-option {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.provider-option:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.provider-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff, #e8ecff);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.provider-option-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.provider-option-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
}

.provider-option-info {
    flex: 1;
}

.provider-option-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.provider-option-subtitle {
    color: #666;
    font-size: 0.9rem;
}

.provider-option-status {
    margin-left: auto;
}

.status-badge {
    background: #6c757d;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background: #28a745;
}

.status-badge.configured {
    background: #667eea;
}

.provider-option-details {
    margin-top: 15px;
}

.provider-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.feature-item {
    color: #27ae60;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* API Key Section */
.api-key-section {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.api-key-section label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.api-key-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.api-key-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.api-key-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.api-key-input.valid {
    border-color: #28a745;
    background: #f8fff9;
}

.api-key-input.invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.test-key-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
}

.test-key-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.test-key-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.test-key-btn.success {
    background: #28a745;
}

.test-key-btn.error {
    background: #dc3545;
}

.api-key-help {
    margin-top: 8px;
}

.api-key-help a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.api-key-help a:hover {
    text-decoration: underline;
}

/* Feature Toggles */
.feature-toggles {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feature-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.feature-toggle-info {
    flex: 1;
}

.feature-toggle-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.feature-toggle-description {
    color: #666;
    font-size: 0.9rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 32px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-input:checked + .toggle-label {
    background-color: #667eea;
}

.toggle-input:checked + .toggle-label:before {
    transform: translateX(28px);
}

/* Advanced Settings */
.advanced-settings {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-group label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

.setting-select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Settings Actions */
.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.settings-action-btn {
    padding: 12px 24px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.settings-action-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.settings-action-btn.secondary {
    background: #f8f9fa;
}

/* Settings Footer */
.settings-modal-footer {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.current-provider {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.settings-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #666;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
}

.status-indicator.error {
    background: #dc3545;
}

.status-indicator.warning {
    background: #ffc107;
}

.settings-footer-actions {
    display: flex;
    gap: 15px;
}

.settings-footer-btn {
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.settings-footer-btn.secondary {
    background: #6c757d;
    color: white;
}

.settings-footer-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.settings-footer-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.settings-footer-btn.primary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-actions {
        position: static;
        margin-top: 20px;
        text-align: center;
    }
    
    .settings-btn {
        display: inline-flex;
    }
    
    .settings-modal {
        padding: 10px;
    }
    
    .settings-modal-content {
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .settings-modal-header {
        padding: 20px;
        border-radius: 16px 16px 0 0;
    }
    
    .settings-modal-text h2 {
        font-size: 1.5rem;
    }
    
    .settings-modal-body {
        flex-direction: column;
    }
    
    .settings-navigation {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .settings-nav-item {
        flex-shrink: 0;
        min-width: 120px;
        justify-content: center;
        padding: 15px 10px;
        border-bottom: none;
        border-right: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .settings-nav-item:last-child {
        border-right: none;
    }
    
    .settings-tab {
        padding: 20px;
    }
    
    .provider-features {
        grid-template-columns: 1fr;
    }
    
    .api-key-input-group {
        flex-direction: column;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-footer-actions {
        flex-direction: column;
    }
    
    .settings-footer-btn {
        width: 100%;
    }
}

/* Mobile Styles for New Upload Page Sections */
@media (max-width: 768px) {
    /* Hero Section - Mobile */
    .hero-section {
        padding: 40px 15px 30px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 10px;
    }

    .stats-row {
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Upload Section - Mobile */
    .upload-area {
        padding: 50px 20px;
        border-radius: 20px;
    }

    .upload-icon {
        font-size: 3.5rem;
    }

    .upload-icon-bg {
        width: 90px;
        height: 90px;
    }

    .upload-title {
        font-size: 1.5rem;
    }

    .upload-description {
        font-size: 1rem;
    }

    .upload-formats {
        flex-wrap: wrap;
    }

    .format-badge {
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    .upload-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }

    /* Features Section - Mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .feature-title {
        font-size: 1.2rem;
    }

    .feature-description {
        font-size: 0.95rem;
    }

    /* How It Works - Mobile */
    .how-it-works {
        padding: 40px 20px;
        border-radius: 20px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .steps-container {
        flex-direction: column;
        gap: 30px;
    }

    .step-item {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
    }

    .step-connector {
        display: none;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .step-content h4 {
        font-size: 1.1rem;
    }

    .step-content p {
        font-size: 0.9rem;
    }

    /* Trust Section - Mobile */
    .trust-badges {
        flex-direction: column;
        gap: 15px;
    }

    .trust-badge {
        padding: 12px 25px;
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .trust-icon {
        font-size: 1.3rem;
    }

    .trust-text {
        font-size: 0.9rem;
    }
}

/* Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations with delays */
.hero-badge {
    animation: fadeIn 0.6s ease-out;
}

.hero-title {
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.stat-item:nth-child(1) {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.stat-item:nth-child(2) {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.stat-item:nth-child(3) {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.upload-container {
    animation: scaleIn 0.8s ease-out 0.6s both;
}

.feature-card:nth-child(1) {
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.feature-card:nth-child(2) {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.feature-card:nth-child(3) {
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

.feature-card:nth-child(4) {
    animation: fadeInUp 0.8s ease-out 1s both;
}

.how-it-works {
    animation: fadeIn 0.8s ease-out 1.1s both;
}

.trust-section {
    animation: fadeIn 0.8s ease-out 1.2s both;
}

/* Hover Enhancements */
.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.trust-badge {
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Gradient Animation for Upload Area */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.upload-area {
    background: linear-gradient(-45deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 255, 0.98), rgba(232, 236, 255, 0.98), rgba(255, 255, 255, 0.98));
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Loading State for Upload */
.upload-area.is-loading {
    pointer-events: none;
}

.upload-area.is-loading .upload-icon {
    animation: spin 1s linear infinite;
}

.upload-area.is-loading .upload-content {
    opacity: 0.5;
}

/* Drag and Drop States */
.upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.02);
}

.upload-area.drag-over .upload-icon-bg {
    transform: translate(-50%, -50%) scale(1.2);
}

/* Success State */
.upload-area.upload-success {
    border-color: #2ecc71;
}

.upload-area.upload-success .upload-icon {
    color: #2ecc71;
}

/* Enhanced Focus States */
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}