/* Reset base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #AEB0D9;
    padding: 20px;
    color: #462678;
}

/* Titoli */
h2, h3 {
    margin-bottom: 15px;
    color: #462678;
    text-align: center;
}

/* Container principale */
.container {
    max-width: 600px;
    margin: 0 auto;
}

/* Contenitore autocomplete */
.autocomplete-container {
    position: relative;
    margin-bottom: 25px;
}

#search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid #6B478D;
    box-shadow: 0 2px 6px rgba(107, 71, 141, 0.2);
    transition: all 0.3s;
}

#search-input:focus {
    border-color: #462678;
    box-shadow: 0 2px 12px rgba(70, 38, 120, 0.3);
    outline: none;
}

/* Lista autocomplete */
.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border-radius: 0 0 12px 12px;
    border: 1px solid #6B478D;
    border-top: none;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(70, 38, 120, 0.2);
    z-index: 100;
}

.autocomplete-items div {
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.autocomplete-items div:hover {
    background-color: #6B478D;
    color: #fff;
}

/* Form in card */
.form {
    background-color: #fff;
    border-radius: 15px;
    padding: 25px 20px;
    box-shadow: 0 6px 15px rgba(107, 71, 141, 0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Labels e input */
.form label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #462678;
}

.form input {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #6B478D;
    font-size: 15px;
    transition: all 0.3s;
}

.form input:focus {
    border-color: #462678;
    box-shadow: 0 2px 8px rgba(70, 38, 120, 0.3);
    outline: none;
}

.form input[readonly] {
    background-color: #AEB0D9;
    color: #462678;
}

/* Pulsante salva */
button#save {
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #462678, #6B478D);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

button#save:hover {
    background: linear-gradient(135deg, #6B478D, #462678);
    box-shadow: 0 4px 12px rgba(70, 38, 120, 0.4);
}

/* Responsive */
@media screen and (max-width: 600px) {
    body {
        padding: 15px;
    }

    .container {
        max-width: 100%;
    }

    #search-input, .form input, button#save {
        font-size: 14px;
        padding: 10px;
    }
}
