/* ===================================================================
   stylel.css — Stili CMS Admin per 4dayweek
   Ripristinati dopo razionalizzazione + integrazioni mancanti
   =================================================================== */

/* ===== ICONE MENU LATERALE (menu5) ===== */

ul.menu5 li.cms {
    background-image: url(icone/world-wide-web-wh.png);
}
ul.menu5 li.scontrini {
    background-image: url(icone/receipts.png);
}
ul.menu5 li.concorsi {
    background-image: url(icone/ticketw.png);
}
ul.menu5 li.gestioneemail {
    background-image: url(icone/email-icon.png);
}

/* ===== TAB MENU CMS (da lt.standard.css framework) ===== */

.tabmenu {
    width: 100%;
    background: #495057;
    height: 42px;
    border-top: solid 2px #495057;
    display: flex;
    flex-wrap: wrap;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tabmenuadmin {
    background: #E34A43;
    border-top: solid 2px #E34A43;
}

.tabitem {
    font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    text-align: center;
    padding: 0;
    border-right: solid 1px rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    height: 42px;
    transition: all 0.2s ease;
}

.itmTab {
    padding: 10px 16px;
}

.tabitemon,
.tabitem:hover {
    color: #333;
    background: #ffffff;
    border: solid 1px rgba(0,0,0,0.05);
    font-weight: 600;
}

@media (max-width: 768px) {
    .tabmenu {
        height: auto;
    }
    .tabitem {
        height: auto;
        flex: 1 1 auto;
        min-width: 120px;
    }
}

/* ===== BUTTON REVERSE (cancel/annulla) ===== */

.buttonrev {
    background-color: #ffffff !important;
    border: solid 1px #E34A43;
}

.buttonrev div,
.buttonrev p,
.buttonrev span {
    color: #E34A43 !important;
}

.buttonrev:hover {
    background-color: #fff5f5 !important;
    opacity: 1;
}

/* ===== BOX MESSAGGI ERRORE/SUCCESSO ===== */

.boxerr {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 14px 18px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.boxok {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    color: #166534;
    padding: 14px 18px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== TABELLA ADMIN (form traduzioni/edit) ===== */

.tbladmin {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tbladmin td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.tbladmin_label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    white-space: nowrap;
    padding-right: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* ===== TABELLA LABELS STILE ORDINI ===== */

.labels-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    margin: 20px 0;
}

.labels-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.labels-table thead {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    color: white;
}

.labels-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.labels-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.labels-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.001);
}

.labels-table td {
    padding: 12px 15px;
    vertical-align: middle;
    border: none;
    text-align: left;
}

.label-id {
    font-weight: 500;
    color: #6c757d;
    font-family: monospace;
}

.label-value {
    color: #212529;
}

.label-name {
    color: #495057;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.label-desc {
    color: #6c757d;
    font-size: 13px;
}

/* ===== PULSANTI AZIONE TABELLA (Traduci, Elimina) ===== */

.btn-translate {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    margin: 4px;
}

.btn-translate:hover {
    color: #e34a43;
    border-color: #e34a43;
    text-decoration: none;
}

.btn-translate:hover .btn-icon {
    transform: scale(1.1);
}

.btn-delete {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    margin: 4px;
}

.btn-delete:hover {
    color: #dc3545;
    border-color: #dc3545;
    text-decoration: none;
}

.btn-delete:hover .btn-icon {
    transform: scale(1.1);
}

.btn-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.translate-icon {
    font-size: 14px;
}

@media (max-width: 768px) {
    .labels-table-container {
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .labels-table {
        font-size: 12px;
    }
    
    .labels-table th,
    .labels-table td {
        padding: 10px 8px;
    }
    
    .btn-translate {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .btn-delete {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .translate-text,
    .delete-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .labels-table th:nth-child(3),
    .labels-table td:nth-child(3) {
        display: none;
    }
    
    .labels-table {
        font-size: 11px;
    }
}

/* ===== SLIDER TABLE STYLES ===== */

.slider-title {
    color: #212529;
    font-weight: 500;
}

.slider-count {
    color: #6c757d;
    font-size: 13px;
}

.slider-visible {
    color: #495057;
}

.slider-actions {
    white-space: nowrap;
}

/* ===== STILI PER SURVEY/FORM (importati da bitwall_cloud) ===== */

/* Titoli */
.titolo_big {
    line-height: 160%;
    color: #224C8C;
    font-family: 'Open sans', sans-serif;
    font-size: 26px;
    font-style: normal;
    font-weight: normal;
}

.titolo {
    color: #224C8C;
    font-family: 'Open sans', sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: normal;
}

/* Contenitori */
.box_in {
    max-width: 1200px;
    width: 90%;
}

/* Bottoni */
.button1 {
    background-color: #144e8e;
}

.button2, .button4, .rbutton2, .rbutton4 {
    border-radius: 4px;
}

.rbutton2:hover {
    background-color: #0277eb;
}

.button {
    background-color: #0157ac;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.button:hover {
    background-color: #0277eb;
}

/* Label e legend */
label {
    display: block;
    margin-top: 8px;
    font-weight: bold;
    font-size: 12px;
    color: #333333;
}

legend {
    font-size: 15px;
    font-weight: bold;
    color: #333333;
    padding: 4px;
    margin-bottom: 5px;
}

/* Contenitori form survey */
.fieldcontainer {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 80%;
    display: inline-table;
}

/* Items e boxes */
.item {
    background-color: #0157ac;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 22px;
    line-height: 140%;
}

.item:hover {
    background-color: #0277eb;
}

.boxitem {
    margin: 12px;
    width: 318px;
    height: 258px;
    background: #004282;
    padding: 8px;
    display: inline-grid;
    color: white;
    font-size: 18px;
    overflow: hidden;
}

.boxitemdisabled {
    background: #cccccc;
}

/* Thumbnails */
.thumbcnt {
    float: left;
    width: 220px;
    height: 220px;
    background-color: #dddddd;
    margin: 10px;
    text-align: center;
}

.thumb {
    max-width: 120px;
    max-height: 80px;
    border: 0;
    margin: 0px;
}

.thumbbig, .thumbbigdef, .thumbbigdis {
    width: 318px;
    height: 212px;
    border: 0;
    margin: 0px;
}

.thumbbig {
    background: #004282;
}

.thumbbigdef {
    background: #004282;
}

.thumbbigdis {
    background: #cccccc;
}

/* Library e altre utilities */
#library {
    width: 100%;
    background-color: #efefef;
    padding: 12px;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: scroll;
}

#logoSmall img {
    max-height: 80px;
}

.miniimg {
    float: left;
    margin-left: 4px;
    max-height: 24px;
}

.text-info {
    cursor: pointer;
}

/* Responsive */
@media screen and (max-width: 560px) {
    #logoAzienda {
        display: none;
    }
}

@media screen and (max-width: 590px) {
    .titolo {
        font-size: 16px;
    }
    
    .ico36 {
        width: 28px;
        height: 28px;
    }
    
    #questionario {
        width: 80%;
        margin-left: 10%;
        text-align: center;
    }
}

@media screen and (max-width: 400px) {
    #questionario {
        width: 100%;
        margin: 0px;
        padding: 0px;
        text-align: center;
    }
}

/* ===== TABLEGRID (tabelle dati) ===== */

.tablegrid, table.tablegrid td, table.tablegrid th,
.tablegrid3, table.tablegrid3 td, table.tablegrid3 th {
    border-style: solid;
    border-width: 1px;
    border-color: #e0e0e0;
    border-collapse: collapse;
    text-align: center;
    line-height: 140%;
    font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
    padding: 12px;
}

table.tablegrid3 td.active {
    font-weight: 600;
}
table.tablegrid3 td.inactive {
    font-weight: 300;
}

table.tablegrid, table.tablegrid3 {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    border-width: 0;
    padding: 0px;
    overflow: hidden;
}

table.tablegrid th {
    font-weight: bold;
    color: #004282;
    background-color: #f8f9fa;
    padding: 14px 12px;
    border-bottom: 2px solid #004282;
}

table.tablegrid3 th {
    font-weight: bold;
    color: #ffffff;
    background-color: #0157ac;
    padding: 14px 12px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Colored headers for loss/benefit */
table.tablegrid3 th.th-loss {
    background-color: #dc3545;
    color: #ffffff;
}
table.tablegrid3 th.th-benefit {
    background-color: #28a745;
    color: #ffffff;
}
table.tablegrid3 td.th-loss {
    background-color: #dc3545;
    color: #ffffff;
    font-weight: bold;
}
table.tablegrid3 td.th-benefit {
    background-color: #28a745;
    color: #ffffff;
    font-weight: bold;
}
table.tablegrid3 tr.totals-row td.totals-label {
    font-weight: 600;
    color: #0157ac;
}

/* Rounded top corners */
table.tablegrid3 thead tr th:first-child {
    border-top-left-radius: 8px;
}
table.tablegrid3 thead tr th:last-child {
    border-top-right-radius: 8px;
}
table.tablegrid3 thead tr th {
    border-bottom: 1px solid #e0e0e0;
}

/* Row hover */
table.tablegrid tbody tr:hover,
table.tablegrid3 tbody tr:hover {
    transition: background-color 0.15s ease;
    cursor: pointer;
}
table.tablegrid tbody tr:hover td,
table.tablegrid3 tbody tr:hover td {
    background-color: #eef5ff !important;
}

/* Row selected */
table.tablegrid tbody tr.row-selected,
table.tablegrid3 tbody tr.row-selected {
    background-color: #d7e9ff;
}
table.tablegrid tbody tr.row-selected td,
table.tablegrid3 tbody tr.row-selected td {
    background-color: #d7e9ff !important;
}

table.tablegrid td, table.tablegrid3 td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

table.tablegrid td.evi, table.tablegrid3 td.evi {
    font-weight: 700;
    color: #004282;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
}
