/* =========================================
   1. VARIABILI & COLORI
   ========================================= */
:root {
    --colore-bg: #121212;
    --colore-card: #1E1E1E;
    --colore-bordi: #2D2D2D;
    
    --colore-testo: #EAEAE8;
    --colore-accento: #F1C40F;
    --colore-accento-hover: #D8AB0E;
    
    --colore-successo: #43b581;
    --colore-pericolo: #f04747;
    --colore-warning: #f39c12;
}

/* =========================================
   2. BASE & LAYOUT GLOBALE
   ========================================= */
html {
    scrollbar-width: auto;
    scrollbar-color: var(--colore-accento) var(--colore-bg);
    overflow-y: scroll;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--colore-bg);
    color: var(--colore-testo);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 20px auto 0 auto;
    padding: 20px;
}

h1, h2 {
    color: var(--colore-testo);
    padding-bottom: 5px;
    margin-top: 0;
}

h2 {
    border-bottom: 2px solid var(--colore-accento);
}

/* Scrollbar Webkit Customization */
::-webkit-scrollbar { 
    width: 15px;
    height: 15px;
}
::-webkit-scrollbar-track { 
    background: var(--colore-bg); 
    border-radius: 5px; 
}
::-webkit-scrollbar-thumb { 
    background-color: var(--colore-bordi); 
    border-radius: 5px; 
    border: 2px solid var(--colore-bg); 
}
::-webkit-scrollbar-thumb:hover { 
    background-color: var(--colore-accento); 
}

/* =========================================
   3. HEADER
   ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 20px auto; 
    background-color: var(--colore-card);
    border: 1px solid var(--colore-bordi);
    padding: 12px 20px;
    border-radius: 8px;
}

.logo-title-group {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 86px;
    height: 86px;
    margin-right: 20px;
}

.header-title {
    border-bottom: 2px solid var(--colore-accento);
    padding-bottom: 5px;
    margin: 0;
    line-height: 1; 
}

.user-info {
    font-size: .9em;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================
   4. CARDS & CONTENITORI
   ========================================= */
.card {
    background-color: var(--colore-card);
    border: 1px solid var(--colore-bordi);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card:last-child {
    margin-bottom: 0;
}

.card-totale {
    text-align: center;
    background-color: var(--colore-bg);
}

.card-totale h2 {
    margin-top: 0;
}

.card-totale p {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--colore-accento);
    margin: 0;
}

/* =========================================
   5. TABELLE
   ========================================= */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid var(--colore-bordi);
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--colore-bordi);
    text-align: left;
    vertical-align: middle;
}

th:not(:last-child),
td:not(:last-child) {
    border-right: 1px solid var(--colore-bordi);
}

tr:last-child td {
    border-bottom: 0;
}

/* Arrotondamento angoli tabella */
th:first-child { border-top-left-radius: 8px; }
th:last-child { border-top-right-radius: 8px; }
tr:last-child td:first-child { border-bottom-left-radius: 8px; }
tr:last-child td:last-child { border-bottom-right-radius: 8px; }

th {
    background-color: var(--colore-bg);
}

tr:nth-child(even) {
    background-color: #242424;
}

/* Link ordinamento nell'header */
th a.header-clickable {
    color: var(--colore-testo);
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: color 0.2s;
}

th a.header-clickable:hover {
    color: var(--colore-accento);
}

.sort-arrow {
    font-size: 0.8em;
    margin-left: 5px;
    color: var(--colore-accento);
}

/* Classi Utility per larghezza colonne */
th.col-left, td.col-left { text-align: left; width: auto; white-space: nowrap; }
th.col-fit-left, td.col-fit-left { text-align: left; width: 1%; white-space: nowrap; }
th.col-center, td.col-center { text-align: center; width: 1%; white-space: nowrap; }
td.col-fill-number { text-align: right; width: 100%; }
th.col-fill-number { width: 100%; }

.colonna-operazioni, .cella-operazioni { width: 100%; white-space: nowrap; }
.colonna-rimuovi, .cella-rimuovi { width: 100%; text-align: center; white-space: nowrap; }

/* Stati delle righe (Gildani) */
.gildano-inattivo td { color: #888; font-style: italic; }
.gildano-inattivo td.cella-operazioni, .gildano-inattivo td.cella-rimuovi { font-style: normal; }
.gildano-inattivo td[data-label="Saldo Attuale"], .gildano-inattivo td[data-label="Saldo in Sospeso"] {
    color: var(--colore-testo); font-style: normal; opacity: 0.6;
}

.gildano-ospite td[data-label="Nome Gildano"] { color: #7289da; font-weight: bold; }
.gildano-nuovo td[data-label="Nome Gildano"] { color: var(--colore-successo); font-weight: bold; }
.saldo-sospeso-attivo { color: var(--colore-warning); font-weight: bold; }


/* =========================================
   6. FORM & INPUT
   ========================================= */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea,
select {
    padding: 10px;
    background-color: var(--colore-bg);
    border: 1px solid var(--colore-bordi);
    color: var(--colore-testo);
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    width: 100%;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 30px; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23EAEAE8'%3E%3Cpath d='M8 10.75a.75.75 0 0 1-.53-.22l-4-4a.75.75 0 1 1 1.06-1.06L8 9.44l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-.53.22z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: none; }

textarea { resize: none; overflow-y: hidden; font-family: Arial, sans-serif; }

/* Layout Form Griglia (Registra Loot) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.form-col { display: flex; flex-direction: column; }
.form-grid .form-group label { display: block; font-weight: bold; margin: 15px 0 8px 0; }
.form-grid .form-col label:last-child { margin: 0px; }

/* Footer Form */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--colore-bordi);
}

.quota-display { font-size: 1.2em; }
.quota-display strong { color: var(--colore-accento); }

/* Autocomplete */
#player_suggestions {
    display: none;
    background-color: var(--colore-bg);
    border: 1px solid var(--colore-bordi);
    border-top: none;
    border-radius: 0 0 5px 5px;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
}
.suggestion-item { padding: 10px; cursor: pointer; }
.suggestion-item:hover { background-color: var(--colore-bordi); }

/* Selected Players (Pills) */
#selected_players_list {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 10px; padding: 10px;
    background-color: var(--colore-bg);
    border-radius: 5px; min-height: 40px;
    border: 1px solid var(--colore-bordi);
}
.player-pill {
    background-color: var(--colore-accento);
    color: var(--colore-bg);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    display: flex; align-items: center; gap: 5px;
}
.player-pill button {
    background: none; border: none; color: var(--colore-bg);
    opacity: 0.7; font-size: 1.2em; line-height: 1; padding: 0 2px; cursor: pointer;
}
.player-pill button:hover { opacity: 1; }

/* Custom File Upload */
.input-file-nascosto { display: none; }
.custom-file-label {
    display: flex !important; align-items: center !important; justify-content: space-between;
    padding: 0 10px; height: 42px !important; 
    background-color: var(--colore-bg);
    border: 1px solid var(--colore-bordi);
    border-radius: 5px; cursor: pointer;
    color: var(--colore-testo); width: 100%; box-sizing: border-box;
}
.custom-file-label:hover { border-color: var(--colore-accento); }
#file-name-display {
    margin: 0 !important; padding: 0 !important; line-height: 1; font-size: 0.9em;
    opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%;
}
.btn-sfoglia {
    display: inline-block; margin: 0 !important;
    background-color: var(--colore-card);
    border: 1px solid var(--colore-bordi);
    padding: 5px 10px; border-radius: 4px;
    font-size: 0.9em; font-weight: bold;
    color: var(--colore-testo); line-height: normal;
    transition: background 0.2s;
}
.custom-file-label:hover .btn-sfoglia { background-color: var(--colore-bordi); }

/* Toggle Tax */
.toggle-tax-container {
    display: flex;
    background: var(--colore-bg);
    border: 1px solid var(--colore-bordi);
    border-radius: 5px;
    padding: 3px;
    gap: 5px;
    height: 42px; 
    box-sizing: border-box; 
    width: 100%;
    align-items: stretch;
}

.form-grid .form-group .toggle-tax-option {
    flex: 1;
    display: flex !important; 
    align-items: center;      
    justify-content: center;  
    text-align: center;
    cursor: pointer; 
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: bold; 
    font-size: 0.9em; 
    white-space: nowrap;
    background-color: transparent; 
    color: var(--colore-testo);
    opacity: 0.6; 
    border: 1px solid transparent;
    height: auto; 
    margin: 0 !important;    
    padding: 0 !important;
    line-height: normal; 
}
.form-grid .form-group .toggle-tax-option:hover { 
    background-color: rgba(255, 255, 255, 0.05); 
    opacity: 1; 
}
.form-grid .form-group .toggle-tax-option.active {
    background-color: var(--colore-accento); 
    color: var(--colore-bg);
    opacity: 1; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle-tax-container input[type="radio"] { display: none; }

.header-con-bottone {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    border-bottom: 2px solid var(--colore-accento);
    margin-bottom: 15px;
    padding-bottom: 12px;
}
.header-con-bottone h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
    line-height: 1;
}
.header-con-bottone form { margin: 0; }


/* =========================================
   7. BOTTONI & AZIONI
   ========================================= */
.btn, button {
    padding: 10px 15px;
    border: none; border-radius: 5px;
    cursor: pointer; font-weight: bold; font-size: 1em;
    background-color: var(--colore-accento); color: var(--colore-bg);
    text-decoration: none;
    transition: background-color 0.2s, filter 0.2s;
}
.btn:hover, button:hover { filter: brightness(0.9); }

.btn-sm { padding: 8px 10px; font-size: 0.9em; }
.btn-logout { background-color: var(--colore-pericolo); color: var(--colore-testo); }
.btn-success { background-color: var(--colore-successo); color: var(--colore-testo); }
.btn-danger { background-color: var(--colore-pericolo); color: var(--colore-testo); }
.btn-warning { background-color: var(--colore-warning); color: var(--colore-bg); }

.btn-danger-outline {
    background-color: transparent;
    border: 2px solid var(--colore-pericolo);
    color: var(--colore-pericolo);
    padding: 5px 10px;
    font-size: 0.9em; font-weight: bold;
}
.btn-view-reason {
    background: var(--colore-bordi); color: var(--colore-testo);
    padding: 4px 8px; border-radius: 3px; border: 1px solid var(--colore-bordi);
    cursor: pointer; font-size: 0.8em;
}
.btn-view-reason:hover { background: #333; }
.btn-stats {
    background-color: var(--colore-accento) !important; 
    color: var(--colore-bg) !important; 
    margin-top: 15px; 
    display: inline-block;
}
.btn-stats:hover { filter: brightness(0.9); }


/* =========================================
   8. FILTRI & RICERCA
   ========================================= */
.filtri-container { 
    margin-bottom: 20px; display: flex; gap: 10px; align-items: center;
}
.filtri-container .search-container { width: auto; flex-grow: 1; }
.filtri-container .filtro-btn-group { flex-shrink: 0; }
.search-container input { width: 100%; padding: 12px; font-size: 1.1em; }

.filtro-btn-group { display: flex; gap: 5px; }
.filtro-btn {
    background: var(--colore-card); border: 1px solid var(--colore-bordi);
    color: var(--colore-testo); padding: 8px 12px;
    font-size: 0.9em; border-radius: 5px;
    cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.filtro-btn:hover { border-color: var(--colore-accento); }
.filtro-btn.filtro-active {
    background: var(--colore-accento); color: var(--colore-bg);
    font-weight: bold; border-color: var(--colore-accento);
}

.filtri-transazioni { background-color: var(--colore-card); padding: 20px; }
.filtri-transazioni h2 {
    border-bottom: 2px solid var(--colore-accento); margin: 0 0 5px 0;
    padding-bottom: 5px; font-size: 1.5em;
}
.filtri-transazioni p { margin: 0; font-size: 0.9em; opacity: 0.7; }
.filtri-transazioni .controlli-wrapper {
    display: flex; flex-grow: 1; align-items: center; gap: 20px;
}
.filtri-transazioni .search-container { flex-grow: 1; }
.filtri-transazioni .filtro-btn-group { flex-shrink: 0; }

.filtri-log-container {
    display: flex; justify-content: flex-start; align-items: center;
    gap: 20px; padding: 20px;
    background-color: var(--colore-card);
    border: 1px solid var(--colore-bordi);
    border-radius: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.filtri-log-container .titolo-wrapper { flex-basis: 100%; margin-bottom: 0; }
.filtri-log-container h2 { 
    margin: 0 0 10px 0;
    border-bottom: 2px solid var(--colore-accento);
    padding-bottom: 5px; 
    font-size: 1.5em;
    width: 100%;
}
.titolo-wrapper p { margin: 0; font-size: 0.9em; opacity: 0.7; }
.filtri-log-container .search-container { flex-grow: 1; }

/* =========================================
   9. ADMIN REVIEW & LOGS
   ========================================= */
.centered-title { text-align: center; border: none; margin-bottom: 20px; }
.submission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)); gap: 20px; align-items: start; }
.submission-card { display: flex; flex-direction: column; }
.submission-details .valore { color: var(--colore-accento); font-weight: bold; }
.submission-details p { margin: 8px 0; }
.participant-list { list-style-type: disc; padding-left: 20px; margin: 15px 0; column-count: 2; }
.participant-list li { padding: 3px; }
.submission-screenshots > div { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 10px 0; }
.screenshot-thumb {
    width: 100px; height: 100px; object-fit: cover;
    border-radius: 5px; border: 2px solid var(--colore-bordi);
    transition: transform 0.2s, border-color 0.2s;
}
.screenshot-thumb:hover { transform: scale(1.05); border-color: var(--colore-accento); }
.submission-actions {
    padding-top: 15px; border-top: 1px solid var(--colore-bordi);
    display: flex; justify-content: space-between; gap: 10px;
}
.submission-actions form { flex-grow: 1; }
.submission-actions button { width: 100%; }

.log-section { margin-bottom: 50px; }
.log-table td { font-size: 0.9em; }
.badge { padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 0.8em; text-transform: uppercase; margin-right: 10px; }
.badge-approve { background: rgba(67, 181, 129, 0.2); color: #43b581; border: 1px solid #43b581; }
.badge-reject { background: rgba(240, 71, 71, 0.2); color: #f04747; border: 1px solid #f04747; }
.badge-add { color: #43b581; }
.badge-sub { color: #f04747; }
.badge-warning { color: #f39c12; }

.log-table th.col-fit, .log-table td.col-fit { width: auto; white-space: nowrap; text-align: left; }
.log-table th.col-motivo, .log-table td.col-motivo { width: 1%; white-space: nowrap; text-align: center; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #111; padding: 10px; border-radius: 5px; margin-top: 10px; }
.log-card { border-left: 4px solid var(--colore-bordi); }
.log-card.approved { border-left-color: var(--colore-successo); }
.log-card.rejected { border-left-color: var(--colore-pericolo); }
.mini-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 3px; border: 1px solid #333; }
.gallery-row { display: flex; gap: 5px; margin-top: 5px; }


/* =========================================
   10. MODAL & FEEDBACK
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-box {
    background-color: var(--colore-card);
    border: 1px solid var(--colore-bordi);
    border-radius: 8px; padding: 20px;
    width: 90%; max-width: 450px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}
.modal-box h2 { margin-top: 0; color: var(--colore-accento); border-bottom: none; }
.modal-box p { font-size: 1.1em; }
.modal-bottoni { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
#modalTesto { margin: 10px 0 10px 0; }
#modalInputMotivo { max-height: 150px; overflow-y: auto; resize: none; }
p#modalMotivoTesto {
    white-space: pre-wrap; max-height: 400px; overflow-y: auto;
    background: var(--colore-bg); padding: 10px; border-radius: 5px; word-wrap: break-word;
}

/* Toast Messages */
#toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
    pointer-events: none;
}

.errore, .feedback, .warning, .success, .error {
    font-weight: bold; 
    padding: 15px 20px;
    border-radius: 5px; 
    margin-bottom: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-width: 350px; 

    opacity: 0; 
    transform: translateX(100%);
    
    pointer-events: auto;
    color: #fff;
    display: flex; 
    align-items: center;
}

.feedback, .success { background-color: #43b581; border-left: 5px solid #2ecc71; }
.errore, .error     { background-color: #f04747; border-left: 5px solid #c0392b; }
.warning            { background-color: #f39c12; border-left: 5px solid #e67e22; }

.toast-show { 
    opacity: 1 !important; 
    transform: translateX(0) !important; 
}

/* =========================================
   11. LOGIN PAGE
   ========================================= */
body.login-page {
    --colore-bg: #09090B; --colore-card: #191919; --colore-bordi: #222222;
    padding: 0; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-sizing: border-box; padding: 20px 0;
}
.login-container {
    max-width: 450px; width: 80vw; margin: 0; 
    background-color: var(--colore-card);
    border: 1px solid var(--colore-bordi);
    border-radius: 8px; padding: 30px;
    box-sizing: border-box; position: relative;
}
.logo-login-container { position: static; width: 100%; text-align: center; }
.logo-login { width: 200px; height: 200px; margin-bottom: 20px; }
.login-container h1 { margin-top: 0; text-align: center; }
.login-hyphen { display: inline; }
.login-container .form-group { margin-bottom: 15px; }
.login-container button { width: 100%; padding: 12px; font-size: 1.1em; }
.login-container ::placeholder { color: var(--colore-testo); opacity: 0.6; }


/* =========================================
   12. TAB NAVIGATION
   ========================================= */
.tab-nav {
    display: flex; border-bottom: 2px solid var(--colore-bordi); margin-bottom: 25px;
}
.tab-nav-link {
    padding: 10px 20px; text-decoration: none; color: #888; font-weight: bold;
    border-bottom: 3px solid transparent; margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.tab-nav-link:hover { color: var(--colore-testo); }
.tab-nav-link.tab-active { color: var(--colore-accento); border-bottom-color: var(--colore-accento); }


/* =========================================
   13. HELPER & UTILITY
   ========================================= */
.form-operazione { 
    display: flex; 
    flex-wrap: wrap; /* Fondamentale per andare a capo */
    gap: 5px; 
    width: 100%; 
}

/* L'input prende tutta la prima riga */
.form-operazione input[type="number"] { 
    flex: 1 1 100%; /* Basis 100% forza l'a capo */
    width: 100%; 
    padding: 8px; 
    margin: 0 0 5px 0;
    min-width: 0; 
}

/* I bottoni si dividono la seconda riga */
.form-operazione button { 
    flex: 1; 
    margin: 0; 
    text-align: center; 
    white-space: nowrap; 
    padding: 8px 5px;
    font-size: 0.85em;
}

.form-inline { margin: 0; }

.aggiungi-gildano-container { padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid var(--colore-bordi); }
.aggiungi-gildano-container h2 { margin-top: 0; border: none; }
.aggiungi-ospite-container { padding-top: 25px; margin-top: 25px; border-top: 1px solid var(--colore-bordi); }

.form-aggiungi { display: flex; align-items: center; }
.form-aggiungi input[type="text"] { flex-grow: 1; }
.form-aggiungi button { flex-shrink: 0; margin-left: 25px; }

.motivo-nascosto {
    display: none !important;
}

/* =========================================
   14. RESPONSIVE
   ========================================= */
.desktop-content { display: block; }
.mobile-warning { display: none; }

@media (max-width: 500px) {
    .desktop-content { display: none; }
    body { padding: 0; }
    .mobile-warning {
        display: flex; align-items: center; justify-content: center;
        text-align: center; font-size: 1.5em; font-weight: bold;
        color: var(--colore-testo); min-height: 100vh;
        padding: 20px; box-sizing: border-box;
    }
}

@media (max-width: 490px) {
    .login-container { width: 90vw; }
    .login-hyphen { display: none; }
}

/* =========================================
   15. STATISTICHE (Stili SPA)
   ========================================= */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.stats-grid .big-number { font-size: 2em; font-weight: bold; color: var(--colore-accento); margin: 10px 0; }
.stats-grid .stat-label { font-size: 0.9em; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; }
.rank-table { width: 100%; }
.rank-table td { padding: 8px; border-bottom: 1px solid #222; }
.rank-pos { width: 30px; font-weight: bold; color: #666; }
.rank-1 { color: #FFD700; } 
.rank-2 { color: #C0C0C0; } 
.rank-3 { color: #CD7F32; } 
.progress-bar-bg { background: #333; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.progress-bar-fill { height: 100%; background: var(--colore-accento); }

/* =========================================
   16. FILE UPLOAD & PREVIEW
   ========================================= */
.custom-file-label.drag-over {
    border-color: var(--colore-accento);
    background-color: rgba(241, 196, 15, 0.1); /* Giallo trasparente */
    border-style: dashed;
}

.screenshots-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    transition: margin-top 0.2s; 
}

.screenshots-preview-grid:not(:empty) {
    margin-top: 10px;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--colore-bordi);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(240, 71, 71, 0.8); /* Rosso semitrasparente */
    color: white;
    border: none;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border-bottom-left-radius: 5px;
}

.preview-remove-btn:hover {
    background: rgba(240, 71, 71, 1);
}