/* API Data Tabs Styles */
.api-tabs-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.api-tabs-error {
    padding: 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 4px;
    margin: 20px 0;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #e1e5e9;
    background-color: #f8f9fa;
    padding: 0;
    margin: 0 0 20px 0;
    border-radius: 6px 6px 0 0;
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 100px;
}

.tab-button:hover {
    background-color: #e9ecef;
    color: #495057;
}

.tab-button.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background-color: #fff;
}

/* Tab Content */
.tab-content {
    position: relative;
    min-height: 300px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Content Styling */
.content {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.user-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-card h4 {
    margin: 0 0 10px 0;
    color: #212529;
    font-size: 16px;
}

.user-card p {
    margin: 5px 0;
    color: #6c757d;
    font-size: 14px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.product-card h4 {
    margin: 0 0 12px 0;
    color: #212529;
    font-size: 18px;
    font-weight: 600;
}

.product-card p {
    margin: 8px 0;
    font-size: 14px;
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #007cba;
    border-radius: 6px;
    padding: 20px;
    transition: box-shadow 0.2s ease;
}

.order-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.order-item h4 {
    margin: 0 0 10px 0;
    color: #007cba;
    font-size: 16px;
    font-weight: 600;
}

.order-item p {
    margin: 5px 0;
    color: #495057;
    font-size: 14px;
}

/* Analytics Dashboard */
.analytics-dashboard {
    padding: 10px;
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Error Message */
.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-nav {
        flex-wrap: nowrap;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        min-width: 120px;
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .users-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .analytics-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .tab-button {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 12px;
    }
}