@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap');

body {
    margin: 0;
    margin: 0 20px;
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
    color: #f5f5f5;
    padding-top: 60px; /* Spazio per l'header fisso */
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    padding: 15px 0;
    background-color: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.log-reg {
    min-width: 40%;
    max-width: 90%;
    margin-top: 40px;
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    border: #333 3px solid;
    margin: 10px;
}

.name-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #333;
    color: white;
    transition: border-color 0.3s ease;
}

.name-input:focus {
    border-color: #8bc34a;
    outline: none;
}


#login-form {
    max-width: 90%;
    min-width: 60%;
}

#register-form {
    max-width: 90%;
    min-width: 60%;
}

.log-reg input {
    box-sizing: border-box;
    margin-top: 10px;
}

#list-select {
    margin: 0;
    margin-bottom: 20px;
    margin-top: 10px;
}

.add-inputs {
    margin-top: 10px;
}

.title {
    margin: 0;
    color: #8bc34a;
    font-size: 24px;
}

#main-content {
    max-width: 97%;
}

.green  {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #8bc34a;
}

input[type="email"], input[type="password"], input[type="text"],input[type="number"], select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #333;
    color: white;
    transition: border-color 0.3s ease;
}

input[type="email"]:focus, input[type="password"]:focus, input[type="text"]:focus,input[type="number"]:focus, select:focus, #product-input:focus {
    border-color: #8bc34a;
    outline: none;
}

#product-input {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    margin-bottom: 15px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #333;
    color: white;
    transition: border-color 0.3s ease;
}

button {
    width: 100%;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #7cb342;
}

#logout-button {
    width: 100px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#logout-button:hover {
    background-color: #e53935;
}

.list-item-content {
    margin-top: 20px;
    padding: 20px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    width: calc(100% - 40px);
}

#list-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%; /* Puoi anche regolare la larghezza se necessario */
}


#list-container .item-row {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
}

#list-container .item-row .product {
    word-break: break-word;
    font-size: 1.8em;
    font-weight: 800;
    color: #8bc34a;
}

#list-container .item-row .quantity {
    text-align: right;
    word-break: keep-all;
    width: 80px;
}

#list-container .item-row-bottom .name .email {
    font-size: 1.1em;
    font-weight: 800;
    color: #8bc34a;
}

#list-section {
    display: flex;
    margin-top: 50px;
    margin-bottom: 50px;
    flex-direction: column;
    align-items: center;
    background-color: #1e1e1e;
    color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

.list-item {
    background-color: #1e1e1e;
    color: #f5f5f5;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    font-size: 18px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item .product {
    font-size: 22px;
}

.list-item .name {
    font-size: 18px;
}

.list-item strong {
    color: #8bc34a;
}

#users-container {
    margin-top: 20px;
    text-align: center;
}

.delete-button {
    width: 40px;
    height: 40px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 7px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: auto;
    display: block;
}

.delete-button:hover {
    background-color: #c20300;
}

.delete-button img {
    height: 20px;
    width: auto;
}

.edit-button {
    width: 40px;
    height: 40px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 7px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: auto;
    display: block;
}

.edit-button:hover {
    background-color: #4b4b4b;
}

.edit-button img {
    height: 20px;
    width: auto;}

.add-product {
    padding: 20px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    width: auto;
}

.hidden {
    display: none;
}



/* Stile per il menu hamburger */
.hamburger-icon {
    font-size: 30px;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 20px;
}

/* Stile per la barra laterale */
.sidebar {
    height: 100%;
    width: 350px;
    position: fixed;
    top: 0;
    left: -300px;
    background-color: #1e1e1e;
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 60px; /* Spazio per l'header fisso */
    z-index: 1001;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
}

.sidebar form {
    margin: 10px;
    border: #333 3px solid;
}

.sidebar a {
    padding: 8px 16px;
    text-decoration: none;
    font-size: 25px;
    color: #8bc34a;
    display: block;
    transition: 0.3s;
}

.sidebar a:hover {
    color: #f1f1f1;
}

.sidebar .close-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 36px;
}

.closed {
    left: -350px;
}

.sidebar.open {
    left: 0;
}

/* Effetto sfocato sul contenuto principale quando la sidebar è aperta */
.blur {
    filter: blur(4px);
    pointer-events: none;
    transition: 0.3s;
}

.list-single {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    padding: 10px;
    margin: 10px 0;
}

.buttons {
    display: flex;
    gap: 10px;
}

.save-edit-button {
    width: 60px;
}

/* NUOVE FEATURES */

.custom-checkbox {
    display: inline-block;
    position: relative;
    width: 37px;
    height: 37px;
    cursor: pointer;
    border: 3px solid #333;
    border-radius: 10px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.custom-checkbox .checkmark {
    width: 100%;
    height: 100%;
    border-radius: 7px;
    background-color: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.custom-checkbox input:checked + .checkmark {
    background-color: #8bc34a;
}

.custom-checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 22px;
    font-weight: bold;
}