﻿.data-viewer-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.data-viewer-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    color: #595959;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .back-btn:hover {
        background: #e6f4ff;
        border-color: #91caff;
        color: #0958d9;
    }

.page-title h1 {
    font-size: 24px;
    font-weight: 600;
    color: #262626;
    margin: 0;
    line-height: 1.2;
}

.subtitle {
    font-size: 14px;
    color: #8c8c8c;
    margin: 4px 0 0 0;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    color: #595959;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .header-action-btn:hover {
        background: #f5f5f5;
        border-color: #b7b7b7;
        color: #434343;
    }

.data-viewer-content {
    flex: 1;
    padding: 24px;
    overflow: auto;
}

.data-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: #8c8c8c;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 18px;
    color: #262626;
    font-weight: 600;
}

.full-data-grid {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

    .full-data-grid .streamlit-dataframe-container {
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

.loading-state, .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    margin-bottom: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-state h2 {
    font-size: 20px;
    color: #262626;
    margin-bottom: 8px;
}

.error-state p {
    color: #8c8c8c;
    margin-bottom: 24px;
}

.retry-btn {
    padding: 10px 20px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .retry-btn:hover {
        background: #40a9ff;
    }

/* Responsive Design */
@@media (max-width: 768px) {
    .data-viewer-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .header-left {
        justify-content: space-between;
    }

    .header-actions {
        justify-content: center;
    }

    .data-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .data-viewer-content {
        padding: 16px;
    }
}
