/*
 * Plik: styles.css
 * Zoptymalizowany, responsywny i wzbogacony wizualnie arkusz stylów.
 *
 * POPRAWKA: .0034 - Naprawiono błąd blokujący wyświetlanie formularza (.meta, .form-grid).
 * Przyczyna: Błędnie odkomentowany blok ukrywający elementy interfejsu użytkownika (prawdopodobnie dla widoku raportu) został ponownie zakomentowany.
 */

/* --- RESET I BAZA --- */
html {
  min-height: 100%;
  position: relative;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ecf0f1; /* Jasnoszary tło */
  color: #34495e; /* Ciemny szary tekst */
  margin: 0;
  padding-bottom: 120px; /* Przestrzeń na stopkę */
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- NAGŁÓWKI STRONY (NOWE) --- */
.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* BLOK LOGO - NIE WYŚWIETLAĆ NA FRONCIE, TYLKO NA TYŁACH (DODAJ TĘ KLASĘ DO #header-logo) */
/*
.header-logo {
    display: none;
}
*/
.header-logo-container {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

/* TYMCZASOWY FIX, GDYŻ KLASA W HTMLU JEST INNA */
/*
.header-logo-container {
    display: none;
}
*/
#header-logo.hidden-on-front {
    display: none; /* To jest dla logo na tyłach */
}

/* --- BLOK Z BŁĘDEM (Pola formularza były ukryte przez odkomentowanie poniższego bloku) --- */
/*
.meta, .form-grid {
    display: none; 
}
*/
/* Upewnienie się, że powyższy blok (jeśli istniał) jest zakomentowany */

/* --- REKLAMY --- */
.ad-container-top, .ad-container-bottom {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.sms-banner-placeholder, .google-ads-placeholder-top, .google-ads-placeholder-bottom {
    border: 1px dashed #c0392b; /* Nowy kolor krawędzi dla banerów */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: #c0392b;
    font-size: 0.8em;
    text-align: center;
    padding: 5px;
}

.sms-banner-placeholder {
    height: 90px;
    width: 100%;
    max-width: 728px;
}

.google-ads-placeholder-top {
    height: 60px; /* Mała reklama */
    width: 100%;
    max-width: 468px; 
}

.google-ads-placeholder-bottom {
    height: 90px; /* Większa reklama */
    width: 100%;
    max-width: 728px; 
}

/* --- FORMULARZ I TABELA --- */
.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-grid div {
  display: flex;
  flex-direction: column;
}

label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #2c3e50;
}

input, textarea, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #bdc3c7;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-size: 1em;
}

input:focus, textarea:focus, select:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 5px rgba(26, 188, 156, 0.5);
    outline: none;
}

input[type="number"] {
  /* Minimalny styl dla input number */
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button.primary {
  background-color: #27ae60; /* Szmaragdowy zielony */
  color: white;
}

button.primary:hover {
  background-color: #2ecc71;
}

button.danger {
  background-color: #c0392b; /* Czerwony */
  color: white;
}

button.danger:hover {
  background-color: #e74c3c;
}

button:not(.primary):not(.danger) {
  background-color: #ecf0f1; /* Jasnoszary */
  color: #34495e;
  border: 1px solid #bdc3c7;
}

button:not(.primary):not(.danger):hover {
  background-color: #dbe4e9;
}


/* --- TABELA STYLIZACJA --- */
.table-section {
    margin-top: 40px;
    overflow-x: auto;
}

.table-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.entries {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  background-color: white;
}

.entries th, .entries td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ecf0f1; /* Bardzo jasna linia */
}

.entries th {
  background-color: #34495e; /* Ciemny nagłówek */
  color: white;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 0.9em;
}

.entries tr:hover {
  background-color: #f4f4f9; /* Lekkie podświetlenie wiersza */
}

.entries .action-cell button {
    padding: 5px 10px;
    font-size: 0.8em;
    background-color: #c0392b;
}

.entries .action-cell button:hover {
    background-color: #e74c3c;
}

/* --- STOPKA --- */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100px; /* Wysokość stopki */
    background-color: #34495e;
    color: white;
    padding: 10px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
    font-size: 0.9em;
}

.footer-logo {
    font-size: 1.2em;
    font-weight: bold;
}

.footer-rights {
    margin-top: 5px;
}

.footer-links a {
    color: #1abc9c;
    text-decoration: none;
    margin: 0 5px;
    border-bottom: 1px dotted transparent;
    transition: border-bottom 0.3s;
}

.footer-links a:hover {
    border-bottom: 1px solid #1abc9c;
    color: #1abc9c;
}

.language-selector select {
    background-color: #34495e;
    color: white;
    border: 1px solid #1abc9c;
    padding: 5px 8px;
    border-radius: 4px;
}

/* --- OGÓLNE STYLIZACJE --- */
h1, h2, h3 {
  color: #2c3e50;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 10px;
}

.notes h3 {
    border: none;
}

.muted {
    color: #95a5a6;
    font-size: 0.9em;
    margin-left: 10px;
}

/* --- RESPONSIVE / MOBILE --- */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
        border-radius: 0;
    }
    
    .header-top {
        padding: 10px;
        justify-content: center;
    }

    .header-logo-container {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .sms-banner-placeholder, .ad-container-bottom {
        max-width: 100%;
    }

    .meta, .form-actions, .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .table-controls button {
        margin-bottom: 5px;
    }
    
    .entries th, .entries td {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 10px 20px;
    }
    
    .footer-links {
        order: 2;
        margin-top: 10px;
    }
    
    .language-selector {
        order: 1;
        margin-bottom: 5px;
    }
}