* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.control-group {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

input[type="text"],
input[type="file"] {
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Czerwone placeholdery */
::placeholder {
    color: red !important;
    opacity: 1;
}

:-ms-input-placeholder {
    color: red !important;
}

::-ms-input-placeholder {
    color: red !important;
}

input[type="text"]:focus {
    outline: none;
    border-color: #5FCBA1;
    box-shadow: 0 0 0 2px rgba(95, 203, 161, 0.2);
}

/* Specjalne szerokości pól */
#myCallsign {
    width: 150px;
}

#globalBandInput {
    width: 100px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

button {
    padding: 5px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Zielone przyciski */
#addRowBtn,
#exportBtn,
#fillBandBtn {
    background-color: #5FCBA1;
    color: white;
}

#addRowBtn:hover,
#exportBtn:hover,
#fillBandBtn:hover {
    background-color: #4ab88d;
}

/* Czerwony przycisk Delete */
#deleteBtn {
    background-color: #007bff !important;
    color: white;
}

#deleteBtn:hover {
    background-color: #007bff !important;
    color: white;
}

#tableContainer {
    margin-top: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th {
    background-color: #5FCBA1;
    color: white;
    padding: 5px 8px;
    font-weight: 600;
    font-size: 14px;
    position: sticky;
    top: 0;
}

td {
    padding: 1px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

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

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

input[type="checkbox"] {
    transform: scale(1.2);
}

/* Inputy w tabeli z ograniczoną szerokością */
#logTable td input[type="text"] {
    box-sizing: border-box;
    max-width: 100%;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

/* Specjalne szerokości dla konkretnych inputów w tabeli */
#logTable td:nth-child(1) input[type="text"] {
    width: 110px;
    /* Data - YYYY-MM-DD */
}

#logTable td:nth-child(2) input[type="text"] {
    width: 70px;
    /* Czas - HH:MM */
}

#logTable td:nth-child(3) input[type="text"] {
    width: 130px;
    /* Callsign */
}

#logTable td:nth-child(4) input[type="text"] {
    width: 100px;
    /* Name */
}

#logTable td:nth-child(5) input[type="text"] {
    width: 90px;
    /* Report Sent */
}

#logTable td:nth-child(6) input[type="text"] {
    width: 90px;
    /* Report Received */
}

#logTable td:nth-child(7) input[type="text"] {
    width: 60px;
    /* Band */
}

/* Przyciski POD tabelą */
.table-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

/* Szerokości kolumn tabeli */
#logTable {
    table-layout: fixed;
    width: 100%;
}

#logTable th:nth-child(1),
#logTable td:nth-child(1) {
    width: 100px;
    min-width: 100px;
}

#logTable th:nth-child(2),
#logTable td:nth-child(2) {
    width: 70px;
    min-width: 70px;
}

#logTable th:nth-child(3),
#logTable td:nth-child(3) {
    width: 130px;
    min-width: 130px;
}

#logTable th:nth-child(4),
#logTable td:nth-child(4) {
    width: 100px;
    min-width: 100px;
}

#logTable th:nth-child(5),
#logTable td:nth-child(5) {
    width: 90px;
    min-width: 90px;
}

#logTable th:nth-child(6),
#logTable td:nth-child(6) {
    width: 90px;
    min-width: 90px;
}

#logTable th:nth-child(7),
#logTable td:nth-child(7) {
    width: 60px;
    min-width: 60px;
}

#logTable th:nth-child(8),
#logTable td:nth-child(8) {
    width: 60px;
    min-width: 60px;
}

/* Wyśrodkowanie zawartości */
#logTable td:nth-child(1),
#logTable td:nth-child(2),
#logTable td:nth-child(5),
#logTable td:nth-child(6),
#logTable td:nth-child(7),
#logTable td:nth-child(8),
#logTable th:nth-child(1),
#logTable th:nth-child(2),
#logTable th:nth-child(5),
#logTable th:nth-child(6),
#logTable th:nth-child(7),
#logTable th:nth-child(8) {
    text-align: center;
}

#logTable td:nth-child(3),
#logTable td:nth-child(4),
#logTable th:nth-child(3),
#logTable th:nth-child(4) {
    text-align: left;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .button-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 8px 4px;
    }

    .table-buttons {
        flex-direction: column;
    }

    /* Mniejsze szerokości inputów na mobile */
    #logTable td:nth-child(1) input[type="text"] {
        width: 90px;
    }

    #logTable td:nth-child(2) input[type="text"] {
        width: 60px;
    }

    #logTable td:nth-child(3) input[type="text"] {
        width: 110px;
    }

    #logTable td:nth-child(4) input[type="text"] {
        width: 80px;
    }

    #logTable td:nth-child(5) input[type="text"],
    #logTable td:nth-child(6) input[type="text"] {
        width: 70px;
    }

    #logTable td:nth-child(7) input[type="text"] {
        width: 50px;
    }
}

/* Header section with image and text */
.header-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.header-image {
    flex-shrink: 0;
}

.header-text {
    flex: 1;
    min-width: 300px;
}

.header-text h1 {
    margin: 0 0 10px 0;
    text-align: left;
    color: #2c3e50;
    font-size: 1.5em;
}

.subtitle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #666;
    font-size: 0.9em;
}

.subtitle button {
    padding: 5px 15px;
    background-color: #5FCBA1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.subtitle button:hover {
    background-color: #4ab88d;
}

/* Responsive design for header */
@media (max-width: 768px) {
    .header-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-text h1 {
        text-align: center;
    }

    .header-text {
        min-width: auto;
    }

    .subtitle {
        justify-content: center;
    }
}
