/* Google Sign-In Button Customization */
.g_id_signin {
    margin: 20px auto !important;
    display: flex !important;
    justify-content: center !important;
}

/* Status Messages */
.status-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
    text-align: center;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-loading {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #a8d4ff;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* Analytics Cards */
.analytics-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    display: block;
}

.metric-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Dropdown Enhancement */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ---- Report Type Selector ---- */
.report-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.report-type-btn {
    flex: 1;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-family: inherit;
}

.report-type-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.report-type-btn:hover:not(.active) {
    border-color: #a0aec0;
}

.report-type-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.report-type-title { font-weight: 600; font-size: 1.1rem; display: block; color: #333; }
.report-type-desc { font-size: 0.85rem; color: #666; display: block; margin-top: 4px; }

/* ---- Period Buttons ---- */
.period-buttons {
    display: flex;
    gap: 10px;
}

.period-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
}

.period-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.period-btn:hover:not(.active) {
    border-color: #667eea;
}

/* ---- Charts Dashboard ---- */
.charts-dashboard {
    margin-top: 30px;
}

.chart-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.chart-section h3 {
    color: #333;
    margin: 0 0 20px 0;
    font-size: 1.2rem;
}

.chart-table-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
    align-items: start;
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container-small {
    height: 280px;
}

.chart-container-full {
    height: 350px;
}

.table-container {
    max-height: 320px;
    overflow-y: auto;
}

/* ---- Data Tables ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead th {
    background: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
}

.data-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.trend-up { color: #28a745; font-weight: 600; }
.trend-down { color: #dc3545; font-weight: 600; }
.trend-icon-up { color: #28a745; }
.trend-icon-down { color: #dc3545; }
.trend-icon-stable { color: #6c757d; }

/* ---- AI Insights ---- */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.insight-card {
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    background: #f8f9fa;
}

.insight-growth { background: #d4edda; border-left-color: #28a745; }
.insight-decline { background: #f8d7da; border-left-color: #dc3545; }
.insight-opportunity { background: #cce5ff; border-left-color: #007bff; }
.insight-risk { background: #fff3cd; border-left-color: #ffc107; }

.insight-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    color: #555;
}

.insight-segment { font-weight: 600; margin-bottom: 6px; color: #333; }
.insight-text { font-size: 0.9rem; color: #333; margin-bottom: 8px; }
.insight-impact { font-size: 0.8rem; color: #666; }

/* ---- Recommendations Grid ---- */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.rec-card {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 10px;
}

.rec-card h4 { color: #155724; margin: 0 0 12px 0; }
.rec-card ul { padding-left: 18px; color: #155724; margin: 0; }
.rec-card li { margin-bottom: 6px; }

/* ---- Coming Soon Block ---- */
.coming-soon-block {
    background: #f8f9fa;
    padding: 60px 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px dashed #e2e8f0;
    margin-top: 30px;
}

.coming-soon-block h3 { margin: 0 0 10px 0; color: #333; }
.coming-soon-block p { color: #666; margin: 0; }

/* ---- Mobile Improvements ---- */
@media (max-width: 768px) {
    .analytics-preview {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 15px;
    }

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

    .report-type-selector {
        flex-direction: column;
    }

    .period-buttons {
        flex-wrap: wrap;
    }

    .period-btn {
        min-width: 70px;
    }

    .chart-table-row {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .table-container {
        max-height: none;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .recommendations-grid {
        grid-template-columns: 1fr;
    }
}