/* dashboard.css - Styles for CORS Proxy Monitoring Dashboard */

/* Base styles and resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 0;
    margin: 0;
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

header h1 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
}

select, input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #fff;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2980b9;
}

/* Main content styles */
main {
    padding: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    overflow: hidden;
}

.dashboard-card h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 0.5rem;
}

/* Summary stats styles */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 6px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart styles */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Table styles */
.table-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    background-color: #f8fafc;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f1f1;
}

tr:nth-child(even) {
    background-color: #f8fafc;
}

tr:hover {
    background-color: #f1f7fb;
}

/* Status color indicators */
.status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

.status-success {
    background-color: #e6f7ee;
    color: #27ae60;
}

.status-error {
    background-color: #fde9e9;
    color: #e74c3c;
}

.status-redirect {
    background-color: #fff5e6;
    color: #f39c12;
}

/* Footer styles */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #fff;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #f1f1f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    header {
        padding: 1rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    main {
        padding: 1rem;
    }
}