@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans/OpenSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans/OpenSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans/OpenSans-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans/OpenSans-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans/OpenSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans/OpenSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Lobster';
    src: url('fonts/Lobster/Lobster-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}




*,
*::before,
*::after {
    box-sizing: border-box;
    transition: 0.3s ease-in-out;
}

body {
    /* Background pattern from subtlepatterns.com */
    font-size: 12px;
    font-family: 'Open Sans', sans-serif;
    color: #fff;
    background-image: url("img/beillu-150x150.webp");
    background-color: #000;
    min-height: 100vh;
    /* Zmiana z height na min-height */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0;
    /* Dodanie marginesu 0 */
}

body::before {
    content: '';
    position: fixed;
    /* Zmiana z absolute na fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    /* Możesz zmienić kolor i przezroczystość nakładki */
    z-index: -1;
}

@media (max-width: 767px) {
    body {
        background-size: 20% auto;
    }
}

a:link,
a:visited,
a:active {
    color: #c7ae7b;
    text-decoration: none;
}

a:hover {
    color: #c7ae7b;
    text-decoration: underline;
}

h1 {
    font-size: 30px;
    font-weight: 400;
    text-align: center;
    letter-spacing: 0px;
    margin-top: 0px;
    margin-bottom: 20px;
}

p {
    text-align: center;
    margin: 8px 0px;
}

.container,
.container_entry {
    background-color: #000;
    width: auto;
    padding: 32px;
    margin: auto;
    -webkit-box-shadow: 3px 3px 30px 5px rgba(204, 204, 204, 0.9);
    -moz-box-shadow: 3px 3px 30px 5px rgba(204, 204, 204, 0.9);
    box-shadow: 3px 3px 30px 5px rgba(204, 204, 204, 0.9);
    text-align: center;
    margin-top: 32px;
    margin-bottom: 32px;
    /* Dodanie odstępu na dole */
    border-radius: 16px;
    box-sizing: border-box;
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
input[type=file],
select {
    width: 300px;
    background-color: #fff;
    color: #000;
    border: 2px solid #c7ae7b;
    border-radius: 5px;
    font-size: 16px;
    padding: 10px;
    outline: none;
    margin-top: 10px;
    margin-bottom: 10px;
}

input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=number]:focus,
input[type=date]:focus,
input[type=file]:focus,
select:focus {
    -webkit-box-shadow: 0px 0px 10px 2px #c7ae7b;
    -moz-box-shadow: 0px 0px 10px 2px #c7ae7b;
    box-shadow: 0px 0px 10px 2px #c7ae7b;
    border: 2px solid #c7ae7b;
    background-color: #e9f3e9;
    color: #000;
}

input[type=submit] {
    width: 300px;
    background-color: #c7ae7b;
    font-size: 20px;
    color: white;
    padding: 15px 10px;
    margin-top: 10px;
    margin-bottom: 20px;
    /* Dodanie marginesu na dole */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    letter-spacing: 2px;
    outline: none;
}

@media (max-width: 480px) {

    input[type=text],
    input[type=email],
    input[type=password],
    input[type=number],
    input[type=submit],
    input[type=date],
    input[type=file],
    select {
        width: 240px;
    }

    .container,
    .container_entry {
        width: 90%;
        padding: 16px;
    }
}

input[type=submit]:focus {
    -webkit-box-shadow: 0px 0px 15px 5px rgba(204, 204, 204, 0.9);
    -moz-box-shadow: 0px 0px 15px 5px rgba(204, 204, 204, 0.9);
    box-shadow: 0px 0px 15px 5px rgba(204, 204, 204, 0.9);
}

input[type=submit]:hover {
    color: #000;
}

form {
    margin: 16px 0px;
}

.raport_data {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

table {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    border-collapse: collapse;
    margin: 8px 0px;
}

th,
td {
    padding: 8px;
}

@media (max-width: 768px) {

    th,
    td {
        padding: 2px;
    }

    .container {
        padding: 16px 8px;
    }
}

@media (max-width: 480px) {
    table {
        font-size: 12px;
    }
}

tr {
    border: 1px solid #fff;
}

tr td:first-child,
tr th:first-child {
    border-right: 1px solid #fff;
    /* Obramowanie z prawej strony */
}

tr td:last-child,
tr th:last-child {
    border-left: 1px solid #fff;
    /* Obramowanie z prawej strony */
}

.table_header {
    font-size: 16px;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    max-width: 100%;
}

.popup img {
    max-width: 100%;
    height: auto;
}

.popup .close-btn {
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 25px;
    font-weight: 400;
    color: #fff;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

thead tr:last-child th {
    color: #c7ae7b;
}

#year,
#day {
    width: 100px;
    margin: 10px 4px;
}


#month,
#quarter,
#company_id,
#nr,
#select_activity {
    width: 150px;
    margin: 10px 4px;
}

.set-data {
    display: flex;
    justify-content: space-around;
}

.set-one {
    display: flex;
    flex-direction: column;
}

.set-data-2 {
    display: flex;
    justify-content: space-around;
}

@media (max-width:450px) {
    .set-data-2 {
        flex-direction: column;
    }
}


/* 1) Usuwamy domyślny wygląd checkboxa */
input[type="checkbox"] {
    -webkit-appearance: none;
    /* Safari/Chrome */
    -moz-appearance: none;
    /* Firefox */
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #c7ae7b;
    /* ta sama ramka, co dla innych inputów */
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
    background-color: #000;
    /* tło czarne, jeżeli wolisz inny kolor, zmień */
    transition: all 0.15s ease;
}

/* 2) Checkbox w stanie nie-zaznaczonym – po najechaniu zmieniamy odrobinę obramowanie */
input[type="checkbox"]:hover {
    border-color: #ddd;
}

/* 3) Gdy checkbox zostanie zaznaczony – tło i obramowanie na zielono */
input[type="checkbox"]:checked {
    background-color: #4caf50;
    border-color: #4caf50;
}

/* 4) Rysujemy biały „ptaszek” wewnątrz, ale tylko gdy jest checked */
input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 5) Drobne dopasowanie, jeżeli chcesz, aby cały element był wyśrodkowany względem tekstu */
input[type="checkbox"] {
    margin-right: 6px;
    margin-bottom: 2px;
}

td {
    border: 1px solid #fff;
}

button.delete_invoice {
    background-color: #c7ae7b;
    font-size: 14px;
    color: white;
    padding: 4px 8px;
    /* Dodanie marginesu na dole */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    outline: none;
}


button.delete_invoice:focus {
    -webkit-box-shadow: 0px 0px 15px 5px rgba(204, 204, 204, 0.9);
    -moz-box-shadow: 0px 0px 15px 5px rgba(204, 204, 204, 0.9);
    box-shadow: 0px 0px 15px 5px rgba(204, 204, 204, 0.9);
}

button.delete_invoice:focus {
    color: #000;
}

/* Modal overlay */
#modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

/* Modal box */
#delete-confirmation-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    padding: 20px;
    border-radius: 8px;
    z-index: 1001;
    width: fit-content;
    color: #fff;
}

#delete-confirmation-modal h3 {
    margin: 0 0 10px;
    font-size: 20px;
    text-align: center;
}

#delete-confirmation-modal p {
    margin: 0 0 10px;
    text-align: center;
}

#delete-confirmation-modal input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #c7ae7b;
    border-radius: 4px;
    background: #fff;
    color: #000;
}

#delete-confirmation-modal .error-msg {
    display: none;
    color: #f44336;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

#delete-confirmation-modal button {
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#delete-confirmation-modal button.confirm-btn {
    background: #c7ae7b;
    color: #000;
    margin-right: 8px;
}

#delete-confirmation-modal button.close-btn {
    background: #444;
    color: #fff;
}

.popup_confirm {
    text-align: center;
}

#delete-confirmation-modal {
    text-align: center;    
    background-color: #000;
    width: auto;
    padding: 32px;
    margin: auto;
    -webkit-box-shadow: 3px 3px 30px 5px rgba(204, 204, 204, 0.9);
    -moz-box-shadow: 3px 3px 30px 5px rgba(204, 204, 204, 0.9);
    box-shadow: 3px 3px 30px 5px rgba(204, 204, 204, 0.9);
    text-align: center;
    margin-top: 32px;
    margin-bottom: 32px;
    /* Dodanie odstępu na dole */
    border-radius: 16px;
    box-sizing: border-box;
}

.invoice-row--due {
  background-color: rgba(255, 0, 0, 0.5) !important;
}

.date-form {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.data-change {
    display: flex;
    flex-direction: column;
}

.actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.kwota_do_zaplaty {
    text-align: right;
}

.company-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}