@font-face {
    font-family: 'Exo 2';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/Exo2-latin.woff2') format('woff2');
}

* { box-sizing: border-box; }

body {
    background: #13131e;
    font-family: 'Exo 2', sans-serif;
    color: #F0F0F8;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 30px;
    color: #F0F0F8;
    margin: 0;
}

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.icon svg {
    width: 100%;
    height: 100%;
}

/* --- LOGIN --- */

.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: #1a1a28;
    border: 1px solid #24243a;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.login-box h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
}

.login-box label {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 13px;
    color: #c0c0d0;
    margin-bottom: 6px;
}

.login-box input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 20px;
    background: #0d0d18;
    border: 1px solid #24243a;
    border-radius: 6px;
    color: #F0F0F8;
    font-family: 'Exo 2', sans-serif;
    font-size: 15px;
    transition: border-color 0.15s ease;
}

.login-box input:focus {
    outline: none;
    border-color: #2979FF;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #2979FF;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease, transform 0.1s ease;
}

.login-box button .icon {
    margin-right: 0;
}

.login-box button:hover {
    background: #3d87ff;
}

.login-box button:active {
    transform: scale(0.98);
}

.errore {
    color: #FF1744;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
}

/* --- AREA CLIENTE --- */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.badge-count {
    display: inline-block;
    padding: 4px 12px;
    background: #24243a;
    color: #8888a8;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.banner-supervisore {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #24243a;
    border: 1px solid #7C4DFF;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #c0c0d0;
}

.banner-supervisore a {
    display: inline-flex;
    align-items: center;
    color: #7C4DFF;
    text-decoration: none;
    font-weight: 500;
}

.banner-supervisore a:hover {
    text-decoration: underline;
}

.azioni {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.azioni a {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    background: #1a1a28;
    border: 1px solid #24243a;
    border-radius: 6px;
    color: #F0F0F8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.azioni a.primario {
    background: #00BFA5;
    border-color: #00BFA5;
    color: #0a0a14;
}

.azioni a:hover {
    border-color: #2979FF;
    transform: translateY(-1px);
}

.azioni a.primario:hover {
    border-color: #00BFA5;
    background: #00d9bb;
}

.search-wrap {
    position: relative;
    margin-bottom: 16px;
}

.search-wrap .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8888a8;
    margin-right: 0;
}

input#filtro {
    width: 100%;
    padding: 10px 12px 10px 38px;
    background: #1a1a28;
    border: 1px solid #24243a;
    border-radius: 6px;
    color: #F0F0F8;
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
    transition: border-color 0.15s ease;
}

input#filtro:focus {
    outline: none;
    border-color: #2979FF;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a28;
    border-radius: 8px;
    overflow: hidden;
}

th {
    background: #24243a;
    text-align: left;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #c0c0d0;
}

td {
    padding: 10px 14px;
    font-size: 14px;
    border-top: 1px solid #24243a;
}

tr:nth-child(even) td {
    background: #1e1e2e;
}

tr:hover td {
    background: #24243a;
}

td a {
    display: inline-flex;
    align-items: center;
    color: #2979FF;
    text-decoration: none;
    font-weight: 500;
}

td a .icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
}

td a:hover {
    text-decoration: underline;
}

.nd {
    display: inline-block;
    padding: 3px 10px;
    background: #24243a;
    color: #8888a8;
    border-radius: 4px;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.logo {
    display: block;
    margin: 0 auto 24px auto;
    width: 140px;
    height: auto;
}

.logo-area {
    width: 60px;
    height: auto;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8888a8;
    text-decoration: none;
    border: 1px solid #24243a;
    padding: 5px 12px;
    border-radius: 20px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-toggle .icon {
    width: 18px;
    height: 12px;
    margin-right: 0;
    border-radius: 2px;
    overflow: hidden;
}

.lang-toggle:hover {
    color: #2979FF;
    border-color: #2979FF;
}

.form-upload-extra {
    background: #1a1a28;
    border: 1px solid #24243a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.form-upload-extra label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #c0c0d0;
    font-size: 13px;
}

.form-upload-extra input[type="file"] {
    flex: 1;
    color: #c0c0d0;
    font-size: 13px;
    background: #0d0d18;
    border: 1px solid #24243a;
    border-radius: 6px;
    padding: 8px;
}

.form-upload-extra button {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    background: #00BFA5;
    color: #0a0a14;
    border: none;
    border-radius: 6px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    cursor: pointer;
}

.form-upload-extra button:hover {
    background: #00d9bb;
}

.esito-upload {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.esito-ok {
    background: rgba(0, 200, 83, 0.15);
    border: 1px solid #00C853;
    color: #00C853;
}

.esito-errore {
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid #FF1744;
    color: #FF1744;
}

.btn-elimina {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #24243a;
    color: #FF1744;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-elimina .icon {
    margin-right: 0;
}

.btn-elimina:hover {
    border-color: #FF1744;
    background: rgba(255, 23, 68, 0.1);
}

/* --- SUPERVISORE: form selezione cliente --- */

.form-supervisore label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #c0c0d0;
    font-size: 13px;
}

.form-supervisore input {
    flex: 1;
    padding: 10px 12px;
    background: #0d0d18;
    border: 1px solid #24243a;
    border-radius: 6px;
    color: #F0F0F8;
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
}

.form-supervisore input:focus {
    outline: none;
    border-color: #7C4DFF;
}

.form-supervisore button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #7C4DFF;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    cursor: pointer;
}

.form-supervisore button:hover {
    background: #8f66ff;
}

/* --- BANNER INFORMATIVO --- */

.banner-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: rgba(41, 121, 255, 0.12);
    border: 1px solid #2979FF;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: #c0c0d0;
}

.banner-info a {
    color: #2979FF;
    font-weight: 500;
    text-decoration: none;
}

.banner-info a:hover {
    text-decoration: underline;
}

.banner-info button {
    background: transparent;
    border: none;
    color: #8888a8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.banner-info button:hover {
    color: #F0F0F8;
}

/* --- SCROLLBAR --- */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #13131e;
}

::-webkit-scrollbar-thumb {
    background: #24243a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2979FF;
}

/* --- RESPONSIVE --- */

@media (max-width: 640px) {
    h1 {
        font-size: 22px;
    }
    .azioni a {
        padding: 8px 12px;
        font-size: 12px;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        display: none;
    }
    td {
        border: none;
        border-bottom: 1px solid #24243a;
        position: relative;
        padding-left: 45%;
    }
    td:before {
        position: absolute;
        left: 14px;
        width: 40%;
        white-space: nowrap;
        color: #8888a8;
        font-size: 11px;
        text-transform: uppercase;
    }
}