* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background: #f4f5f7;
    color: #222;
}

header {
    height: 80px;
    background: #8f0707;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

    header h1 {
        font-size: 32px;
        font-weight: 700;
    }

.logo {
    height: 40px;
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 25px;
}

.card {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

    .card h2 {
        color: #d35400;
        margin-top: 0;
        margin-bottom: 20px;
    }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d5d7da;
    border-radius: 6px;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

.table-data {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

    .table-data th {
        background: #f5824e;
        color: white;
        padding: 12px;
        text-align: left;
    }

    .table-data td {
        border: 1px solid #e5e5e5;
        padding: 10px;
    }

.btn-add {
    background: #4a8fe7;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
}

.actions {
    text-align: right;
    margin-bottom: 50px;
}

.btn-save {
    background: #d35400;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
    align-content: center;
}

/* ===================================== */
/* MODAL */
/* ===================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.45);
    z-index: 9999;
}

.modal-content {
    width: 1000px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    text-align: right;
}

.btn-close {
    border: none;
    background: none;
    font-size: 34px;
    cursor: pointer;
}

/* ===================================== */
/* LISTA COMPETENZE */
/* ===================================== */

.lista-competenze {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
    margin-top: 20px;
}

.competenza-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
}

.filters {
    margin-bottom: 15px;
}

.toolbar {
    margin-bottom: 15px;
}

/* ===================================== */
/* SLIDER */
/* ===================================== */

.slider-livello {
    width: 200px;
}