:root {
    --primary-color: #007BFF;
    --secondary-color: #6C757D;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --success-color: #28a745;
    --error-color: #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

body {
    background-color: var(--background-color);
    line-height: 1.6;
    color: #333;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2em;
    margin-bottom: 5px;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- NOWA SEKCJA: PASEK NAWIGACYJNY ZAKŁADEK --- */
.tabs-nav {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ccc;
}

.nav-button {
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--secondary-color);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-button:hover {
    color: var(--primary-color);
}

.nav-button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Ukrywanie/Pokazywanie zawartości zakładki */
.tab-content {
    display: none;
    padding-top: 10px;
}

.tab-content.active {
    display: block;
}
/* ------------------------------------------------ */


/* --- Sekcja z najnowszymi danymi (Karty) --- */
.current-data-grid {
    display: grid;
    /* Domyślny widok desktopowy */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card h2 {
    font-size: 1.1em;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.card span {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #000;
}

/* --- Sekcja wykresów --- */
.charts-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.chart-container {
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* --- NOWA SEKCJA: USTAWIENIA FORMULARZ --- */
.settings-form-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 25px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#station-settings-form h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

#save-settings-button {
    width: 100%;
    padding: 12px;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

#save-settings-button:hover {
    background-color: #1e7e34;
}

.status-message {
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: bold;
}

.status-message.success {
    background-color: #d4edda;
    color: var(--success-color);
}

.status-message.error {
    background-color: #f8d7da;
    color: var(--error-color);
}

.info-box {
    margin-top: 25px;
    padding: 15px;
    border: 1px solid #ffc107;
    background-color: #fff3cd;
    color: #856404;
    border-radius: 4px;
    font-size: 0.9em;
}

.info-box i {
    margin-right: 8px;
    color: #ffc107;
}
/* ------------------------------------------- */


/* --- Responsywność dla urządzeń mobilnych --- */
@media (max-width: 768px) {
    .current-data-grid {
        /* Na małych ekranach 2 karty na wiersz */
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 480px) {
    .current-data-grid {
        /* Na bardzo małych ekranach 1 karta na wiersz */
        grid-template-columns: 1fr; 
    }
    header h1 {
        font-size: 1.5em;
    }
    .tabs-nav {
        flex-direction: column;
    }
    .nav-button {
        width: 100%;
        margin-bottom: 5px;
    }
}

footer {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    border-top: 1px solid #ccc;
    color: var(--secondary-color);
}

.station-selector {
    margin: 15px auto 5px auto;
    text-align: center;
}

.station-selector label {
    display: block;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.select-wrapper {
    position: relative;
    width: 260px;
    margin: 0 auto;
}

.select-wrapper select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border-radius: 8px;
    border: none;
    background: #ffffff;
    font-size: 1em;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    appearance: none;
    cursor: pointer;
    transition: 0.25s;
}

.select-wrapper select:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.select-wrapper select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.4);
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1em;
    color: var(--primary-color);
}
.current-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px;
    margin-bottom: 10px; /* było 30px – minimalnie zmniejszyłem */
}

.last-update-row {
    margin-bottom: 30px;
    text-align: right;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.last-update-row span {
    font-weight: bold;
}
