/* ===========================
   DARK MODE STYLES
=========================== */
body {
    font-family: Arial, sans-serif;
    background: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-container {
    margin-top: 40px;
    text-align: center;
}

.upload-btn {
    padding: 14px 28px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    background-color: #1f8eed;
    color: white;
    cursor: pointer;
    transition: 0.3s ease;
}

.upload-btn:hover {
    background-color: #1976c2;
}

#csvFileInput {
    display: none;
}

#metrics-container {
    margin-top: 30px;
    width: 95%;
    max-width: 1400px; /* wider layout */
}

/* =========================
   PROFESSIONAL METRICS DASHBOARD
========================= */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 cards per row */
    gap: 18px;
}

@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 800px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 16px;
    transition: 0.2s ease;
}

.metric-card:hover {
    border-color: #1f8eed;
    transform: translateY(-2px);
}

.metric-card.primary {
    background: #111c26;
    border: 1px solid #1f8eed;
}

.metric-title {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.metric-value.positive {
    color: #4caf50;
}

.metric-value.negative {
    color: #e53935;
}

#column-selector {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* changed */
    gap: 12px;
    width: 90%;
    max-width: 1200px; /* optional increase */
}

.checkbox-item {
    background: #1e1e1e;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #333;
    font-size: 14px;
    color: #e0e0e0;
}

#table-container {
    margin: 40px 0;
    width: 90%;
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    background: #1e1e1e;
    color: #e0e0e0;
}

th, td {
    border: 1px solid #333;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #1f8eed;
    color: white;
}

tr:nth-child(even) {
    background-color: #1a1a1a;
}

.show-more-btn {
    margin: 10px 0 30px;
    padding: 8px 16px;
    cursor: pointer;
    background: #1f8eed;
    color: white;
    border: none;
    border-radius: 6px;
}

.show-more-btn:hover {
    background-color: #1976c2;
}

#calendar-container {
    width: 90%;
    margin-bottom: 60px;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 20px;
}

.day {
    min-height: 80px;
    padding: 6px;
    border-radius: 6px;
    font-size: 14px;
    background: #1e1e1e;
    color: #e0e0e0;
    text-align: center;
}

.day strong {
    font-size: 13px;
}

.heat-1 { background: #2e7d32; color: #e0e0e0; } /* green shades */
.heat-2 { background: #388e3c; color: #e0e0e0; }
.heat-3 { background: #43a047; color: #e0e0e0; }
.heat-4 { background: #66bb6a; color: #e0e0e0; }

.weekday-header {
    font-weight: bold;
    text-align: center;
}

.month-title {
    margin-top: 50px;
    color: #ffffff;
}

.day-metrics {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.85;
    line-height: 1.3;
}

.month-wrapper {
    width: 100%;
    margin-bottom: 20px;
}

.month-header {
    font-size: 20px;
    font-weight: bold;
    padding: 12px;
    background: #1f8eed;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

.month-header:hover {
    background: #1976c2;
}

.month-content {
    margin-top: 15px;
}

.month-content.collapsed {
    display: none;
}

.calendar-controls {
    margin-top: 10px;
    margin-bottom: 25px;
}

.calendar-controls button {
    padding: 8px 14px;
    margin-right: 10px;
    border: none;
    border-radius: 6px;
    background: #1f8eed;
    color: white;
    cursor: pointer;
}

.calendar-controls button:hover {
    background: #1976c2;
}

.export-btn {
    padding: 14px 28px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #43a047, #2e7d32);
    color: white;
    cursor: pointer;
    margin-left: 10px;
    transition: 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.export-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4caf50, #388e3c);
}

/* OPTIONAL: disabled export button */
.export-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.metric-value.split {
    font-size: 20px;
    letter-spacing: 1px;
}
