/* Sticky table header for comment table */
.comment-table thead.table-sticky-header th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 2;
}

/* Show borders for all cells in the comment table */
.comment-table {
    border-collapse: collapse; /* join borders so lines are continuous */
}
.comment-table th,
.comment-table td {
    border: 1px solid #dee2e6; /* match Bootstrap table border color */
    vertical-align: middle;
}

/* Pagina Dashboard */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4facfe;
    --warning-color: #f6d365;
    --danger-color: #fa709a;
    --dark-bg: #2d3748;
    --light-bg: #f7fafc;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --fixed-offset: 80px;
    /* dimensione base riquadri thumbs (modificabile) */
    --thumb-size: 200px;
}

/* Comment Viewer page (scoped per evitare impatti su altre schermate) */
.comment-viewer-page .thumb-cell { width: 40px; }
.comment-viewer-page .thumb {
    width: 30px; height: 30px;
    object-fit: cover; border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.15);
    background: #222;
}
.comment-viewer-page .filename-cell,
.comment-viewer-page .tag-cell {
    max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.comment-viewer-page .message-cell {
    white-space: pre-line;
    overflow: visible;
    text-overflow: initial;
    max-width: none;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.comment-viewer-page .table thead th { white-space: nowrap; }
.comment-viewer-page .table-sm td,
.comment-viewer-page .table-sm th { vertical-align: middle; }
.comment-viewer-page .days-badge {
    background: #263238; border-radius: 6px; padding: 2px 6px; display: inline-block;
}
.comment-viewer-page mark {
    background: #ffeb3b; padding: 1px 3px; border-radius: 2px;
}
.comment-viewer-page .filters-help {
    white-space: pre-line; /* mantiene i ritorni a capo del markup */
}

/* Messaggio più leggibile su mobile: occupa lo spazio libero */
@media (max-width: 575.98px) {
  .comment-viewer-page td.message-cell {
    width: auto;
    min-width: 240px;
  }
  .comment-viewer-page th.message-cell {
    min-width: 240px;
  }
}

/* Select foto responsive dentro Comment Viewer */
.comment-viewer-page .photo-filter-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
@media (min-width: 576px) {
    .comment-viewer-page .photo-filter-select {
        width: auto;
    }
}

.favorite-thumb {
    height: 200px;
    object-fit: cover;
}

/* Layout statistiche e badge - favorites_stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.days-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: #17a2b8;
    color: #fff;
    border-radius: 12px;
    font-size: 0.9em;
}

.complete-view-controls {
    /* usa layout Bootstrap; questo aggiunge solo spaziatura coerente */
    margin-bottom: 12px;
}

.filename-cell,
.tag-cell {
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Fine sezione favorites_stats */

/* Sfondo globale della dashboard */
body {
    background-image: url('../sfondoDashboard.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    padding: 8px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.white-text, .white-textTitoli {
    color: white !important;
    text-shadow: 2px 2px 4px rgb(0, 0, 0);
}
.white-textTitoli {
    text-align: left;
    display: block;
}

.gallery-container { text-align: center; }
/* Contenitore del titolo "Galleria Immagini" (testo bianco con ombra) */
.textTitoloGalleria {
    color: white !important;
    text-shadow: 2px 2px 4px rgb(0, 0, 0);
    /*background-image: url('../sfondoTitoloGalleria.webp');*/
    background-size: cover;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    /*backdrop-filter: blur(5px);*/
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.nav-btn { border-radius: .5rem; }
.edit-mode-button { border-radius: .5rem; }

.filter-form { margin-bottom: 12px; }

#tag-suggestions {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

.loader-container { position: relative; }

/* === Toggle visibilità pannelli (necessari per funzionamento dei pulsanti) === */
/* Filtri: nascosti di default, visibili quando body ha .filter-mode */
.filter-form.control-panel {
    display: none !important;
}
.filter-mode .filter-form.control-panel {
    display: flex !important;
}

/* Controlli selezione: nascosti di default, visibili quando body ha .edit-mode */
.selection-controls.control-panel {
    display: none !important;
}
.edit-mode .selection-controls.control-panel {
    display: flex !important;
}

.control-panel .form-select,
.control-panel .form-control {
    height: 35px;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 11px;
    box-sizing: border-box;
    background-color: #fff;
}
.control-panel .btn {
    min-height: 35px;
    line-height: 1.2;
    border-radius: 20px;
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

nav.control-panel {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.control-panel.navbar {
    padding: 8px 15px;
    min-height: 45px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(61,100,116,0.90);
    overflow: visible;
}

.navbar-toggler {
    position: relative;
    z-index: 1101;
}

.control-panel .navbar-collapse.show {
    margin-top: 8px;
}

.control-panel .navbar-nav {
    gap: 10px;
}

.control-panel .navbar-nav .btn, .control-panel .btn {
    height: 35px;
    margin: 0;
    line-height: 1.2;
    border-radius: 20px;
}

.fixed-controls-container {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 15px 8px;
    background: rgba(255,255,255,0.5);
    transition: background 0.3s ease;
    border-radius: 0 0 15px 15px;
    min-height: 70px;
}
.fixed-controls-container.scrolled { background: rgba(255,255,255,0.9); }

/* === Dashboard overrides (migrati da dashboard.php) === */
.control-panel {
    background: rgba(61,100,116,0.90);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}
nav.control-panel, .filter-form.control-panel, .selection-controls.control-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-container {
    margin-top: var(--fixed-offset) !important;
}

.upload-form {
    margin: 0 auto 6px auto;
}

/* Overlay dietro il titolo galleria (se presente un wrapper) */
.gallery-container { margin-top: 0 !important; }

.selection-controls .d-flex { flex-wrap: wrap; }
/* Navbar: logout sempre a destra e visibile */
.control-panel.navbar .logout-btn {
    margin-left: auto; /* desktop: spingi a destra */
}

@media (max-width: 992px) {
    .selection-controls .btn { font-size: 0.9rem; padding: .375rem .5rem; }
    .control-panel.navbar {
        position: relative;
    }
    .control-panel.navbar .container-fluid {
        padding: 0 10px;
    }
    .control-panel.navbar .logout-btn {
        margin-left: auto;
    }
    .navbar-toggler {
        padding: 4px 8px;
        margin-right: 10px;
    }
    .control-panel.navbar .navbar-collapse {
        margin-top: 10px;
    }
}

/* Ensure the navbar container behaves as a single flex row so the spacer can
   push the logout button to the right on all viewports. The .nav-spacer
   will take available space when the collapsed menu is hidden. */
.control-panel .container-fluid {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-spacer {
    flex: 1 1 auto;
    min-width: 0; /* allow proper shrinking on small devices */
}

/* File upload: contenitore/label base */
.custom-file-upload { position: relative; display: inline-block; margin: 0; }
.file-input { position: absolute; left: -9999px; opacity: 0; width: 0.1px; height: 0.1px; }
.file-count { background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 20px; font-size: 0.8em; margin-left: 0; }

input[type="text"].nav-btn {
    height: 35px; padding: 0 15px; background: linear-gradient(45deg, #3498db, #2c3e50);
    color: white; border: none; font-size: 14px; font-weight: bold; border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: all 0.3s ease; margin: 5px 0; opacity: 1;
}
input[type="text"].nav-btn::placeholder { color: rgba(255,255,255,0.9); }
input[type="text"].nav-btn:focus::placeholder { color: transparent; transition: color 0.2s ease; }
input[type="text"].nav-btn:focus { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,0.5); transform: translateY(-2px); }

.selection-info {
    font-weight: bold; padding: 5px 10px; border-radius: 20px; font-size: 14px;
}

/* Rimuovere !important: l’override avviene con la classe .filter-mode più specifica */
.filter-form.control-panel {
    display: none;
    margin-top: 0;
}
.filter-mode .filter-form.control-panel {
    display: flex;
}

#download_selected_images:enabled, #delete-selected-btn:enabled { opacity: 1; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size), 1fr));
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    justify-items: center;
}
.gallery-item {
    position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 12px;
    width: 100%; max-width: var(--thumb-size); margin: 0 auto;
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease;
    border-radius: 12px; display: block; margin: 0 auto;
}
.image-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.7); color: white; padding: 8px; font-size: 0.8em;
    border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; opacity: 0; transition: opacity 0.3s ease;
    text-align: center;
}
.gallery-item:hover .image-info { opacity: 1; }

/* Sezione upload: sfondo e overlay sotto i controlli */
.upload-form {
    position: relative; padding: 5px; margin: 4px auto 8px auto; border-radius: 8px; width: 100%;
    min-height: 40px; box-sizing: border-box; color: white; max-width: 1000px; z-index: 1;
}
/* Sezione upload: overlay */
.upload-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /*background: url('../sfondoUpload.webp') center center/cover no-repeat;*/
    background: rgba(61, 100, 116, 0.90);
    opacity: 1;
    border-radius: 8px;
    z-index: -1;
}
.upload-form > *, .upload-form input, .upload-form button, .upload-form label { position: relative; z-index: 1; }

.upload-btn {
    background: transparent;
    color: #0bc16d;
    border: 1px solid #0bc16d;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 35px;
    box-shadow: none;
}
.upload-btn:hover {
    background-color: #0bc16d;
    color: white;
    transform: none;
    box-shadow: none;
}
.upload-btn:active {
    transform: none;
    box-shadow: none;
}
.upload-btn { background-image: none !important; }
.upload-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: rgba(25, 135, 84, 0.4);
    color: rgba(25, 135, 84, 0.4);
}

.delete-button {
    position: absolute; top: 5px; right: 5px; background-color: rgba(255,0,0,0.32); color: white;
    border: 2px solid white; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 20px;
    font-weight: bold; display: none; align-items: center; justify-content: center; z-index: 9999;
    text-decoration: none; padding: 0; margin: 0; line-height: 1;
}
.delete-button:hover { background-color: #cc0000; }

.lightboxOverlay {
    position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important;
    z-index: 9999 !important; background-color: black !important; opacity: 0.8 !important;
}
.lightbox {
    position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important;
    z-index: 10000 !important; text-align: center; line-height: 0; font-weight: normal; outline: none;
}
.lightbox .lb-image {
    display: block; height: auto; max-width: inherit; max-height: none; border-radius: 3px; border: 4px solid white; margin: 0 auto;
}
.lb-image {
    max-height: 88vh !important; max-width: 95vw !important; width: auto !important; height: auto !important; margin: 0 auto !important;
    display: block !important; border-radius: 8px; position: static !important; left: auto !important; transform: none !important;
}
.lb-outerContainer {
    display: flex !important; align-items: center !important; justify-content: center !important; min-height: 90vh !important; height: auto !important;
    max-height: 90vh !important; margin: 0 auto !important; top: 7 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    position: fixed !important; background: transparent !important; border-radius: 8px !important; flex-direction: column !important; width: 100% !important;
}
.lb-container { display: flex !important; align-items: flex-start !important; justify-content: center !important; width: 100% !important; padding-top: 10px !important; text-align: center !important; }
.lb-dataContainer {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; width: 100% !important; height: auto !important; max-height: 80px !important;
    margin: 0 !important; background: rgba(0,0,0,0.8) !important; color: white !important; font-size: 0.9em !important; border-radius: 0 !important;
    box-sizing: border-box !important; z-index: 10005 !important; overflow-y: auto !important; backdrop-filter: blur(5px) !important; display: flex !important;
    flex-direction: column !important; justify-content: center !important;
}
.lb-data .lb-details { width: auto !important; margin: 0 !important; text-align: center !important; line-height: 1.1em; float: none !important; display: block !important; flex: 0 0 auto !important; }
.lb-data .lb-close {
    position: absolute !important; right: 10px !important; top: 10px !important; width: 30px !important; height: 30px !important;
    background: url('../../lightbox2/images/close.png') no-repeat !important; background-size: 20px 20px !important; background-position: center !important;
    opacity: 0.7 !important; z-index: 10006 !important; border-radius: 50% !important; background-color: rgba(0,0,0,0.3) !important; float: none !important; margin-left: 180px !important;
}
.lb-data .lb-close:hover { opacity: 1 !important; background-color: rgba(0,0,0,0.5) !important; }

body.lightbox-open { overflow: hidden !important; position: fixed !important; width: 100% !important; height: 100% !important; }
body.lightbox-open .lb-dataContainer { position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; z-index: 10005 !important; }

/* Campo tag dell'upload: stile pill coerente e senza gradient */
.upload-form #imageTag {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background-color: rgba(255,255,255,0.95);
    background-image: none;
    color: #333;
    font-size: 13px;
}

/* Label e pulsante file (pill outline bianco) */
.upload-form .custom-file-upload,
.upload-form input[type="file"] + label,
.upload-form label {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.25);
    background-color: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 13px; /* questa rendeva la label più piccola */
    box-shadow: none;
}

/* Pulsanti upload coerenti con gli altri (outline bianco, pill) */
.upload-form .upload-btn,
.upload-form .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.6);
    background: transparent;
    color: #fff;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.upload-form .upload-btn:hover,
.upload-form .btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
/* Variante danger coerente (se presente) */
.upload-form .btn-danger,
.upload-form .upload-btn.btn-danger {
    border-color: rgba(220,53,69,0.6);
    color: rgba(220,53,69,0.95);
}
.upload-form .btn-danger:hover,
.upload-form .upload-btn.btn-danger:hover {
    background: rgba(220,53,69,0.15);
}

.delete-button {
    position: absolute; top: 5px; right: 5px; background-color: rgba(255,0,0,0.32); color: white;
    border: 2px solid white; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 20px;
    font-weight: bold; display: none; align-items: center; justify-content: center; z-index: 9999;
    text-decoration: none; padding: 0; margin: 0; line-height: 1;
}
.delete-button:hover { background-color: #cc0000; }

.lightboxOverlay {
    position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important;
    z-index: 9999 !important; background-color: black !important; opacity: 0.8 !important;
}
.lightbox {
    position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important;
    z-index: 10000 !important; text-align: center; line-height: 0; font-weight: normal; outline: none;
}
.lightbox .lb-image {
    display: block; height: auto; max-width: inherit; max-height: none; border-radius: 3px; border: 4px solid white; margin: 0 auto;
}
.lb-image {
    max-height: 88vh !important; max-width: 95vw !important; width: auto !important; height: auto !important; margin: 0 auto !important;
    display: block !important; border-radius: 8px; position: static !important; left: auto !important; transform: none !important;
}
.lb-outerContainer {
    display: flex !important; align-items: center !important; justify-content: center !important; min-height: 90vh !important; height: auto !important;
    max-height: 90vh !important; margin: 0 auto !important; top: 7 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    position: fixed !important; background: transparent !important; border-radius: 8px !important; flex-direction: column !important; width: 100% !important;
}
.lb-container { display: flex !important; align-items: flex-start !important; justify-content: center !important; width: 100% !important; padding-top: 10px !important; text-align: center !important; }
.lb-dataContainer {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; width: 100% !important; height: auto !important; max-height: 80px !important;
    margin: 0 !important; background: rgba(0,0,0,0.8) !important; color: white !important; font-size: 0.9em !important; border-radius: 0 !important;
    box-sizing: border-box !important; z-index: 10005 !important; overflow-y: auto !important; backdrop-filter: blur(5px) !important; display: flex !important;
    flex-direction: column !important; justify-content: center !important;
}
.lb-data .lb-details { width: auto !important; margin: 0 !important; text-align: center !important; line-height: 1.1em; float: none !important; display: block !important; flex: 0 0 auto !important; }
.lb-data .lb-close {
    position: absolute !important; right: 10px !important; top: 10px !important; width: 30px !important; height: 30px !important;
    background: url('../../lightbox2/images/close.png') no-repeat !important; background-size: 20px 20px !important; background-position: center !important;
    opacity: 0.7 !important; z-index: 10006 !important; border-radius: 50% !important; background-color: rgba(0,0,0,0.3) !important; float: none !important; margin-left: 180px !important;
}
.lb-data .lb-close:hover { opacity: 1 !important; background-color: rgba(0,0,0,0.5) !important; }

body.lightbox-open { overflow: hidden !important; position: fixed !important; width: 100% !important; height: 100% !important; }
body.lightbox-open .lb-dataContainer { position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; z-index: 10005 !important; }

/* Label “Seleziona immagini” con stesso stile del pulsante “Carica Immagini” */
.upload-form .select-images-btn {
    font-family: Arial, sans-serif;
    font-size: 1rem;     /* uguale ai .btn Bootstrap e al bottone Carica */
    font-weight: 500;    /* uguale a .upload-form .btn */
    line-height: 1.2;
}
/* Nasconde l'input file reale, rimuovendolo dal flusso del layout */
.file-input {
    display: none;
}

/* Pulsante submit disabilitato: visivamente non cliccabile */
.upload-form button[type="submit"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.4);
}

/* Checkbox delle immagini: visibili solo in modalità Modifica */
.gallery .image-checkbox { display: none; }
.edit-mode .gallery .image-checkbox { display: inline-block; }

body.lightbox-open { overflow: hidden !important; position: fixed !important; width: 100% !important; height: 100% !important; }
body.lightbox-open .lb-dataContainer { position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; z-index: 10005 !important; }

/* Loader: nascosto di default */
.loader-text {
    display: none;
}

/* Stelline preferiti: grigio non selezionato, giallo selezionato */
.favorite-star {
    display: inline-block;
    cursor: pointer;          /* mostra la manina su hover */
    user-select: none;        /* evita selezione testo / cursore I-beam */
}
.favorite-star .star-icon {
    color: #9aa1a6;
    font-size: 20px;
    line-height: 1;
    transition: transform .15s ease, color .15s ease;
    cursor: pointer;          /* assicura manina anche sull'icona */
}
.favorite-star .star-icon.favorited { color: #f1c40f; }
.favorite-star:hover .star-icon { transform: scale(1.08); }

/* Icona commenti accanto alla stellina */
.comment-icon {
    display: inline-block;
    cursor: pointer;
    margin-left: 8px;
    color: #3498db;
    user-select: none;
    transition: transform 0.1s ease-in-out;
    font-size: 1.2rem;
    line-height: 1;
}
.comment-icon:hover { transform: scale(1.08); }
/* In lightbox, allineo con le info foto */
.lightbox .lb-data .lb-details .comment-icon { margin-left: 12px; }

.lightbox .lb-data .lb-details .favorite-star-lightbox {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px; /* spazio prima della didascalia */
    cursor: pointer;
}
.lightbox .lb-data .lb-details .favorite-star-lightbox .star-icon {
    display: inline-block;
}

/* Pulsante verde per stato con file selezionati (outline come Modifica) */
.upload-form .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.upload-form .btn-outline-success:hover,
.upload-form .btn-outline-success:focus,
.upload-form .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}

/* Pulsanti nella sezione Tag suggeriti: stessi stili degli altri */
.tag-suggestions .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.6);
    background: transparent;
    color: #fff;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.tag-suggestions .btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
/* Variante outline-success per "Applica Tag suggeriti", identica a Carica Immagini */
.tag-suggestions .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.tag-suggestions .btn-outline-success:hover,
.tag-suggestions .btn-outline-success:focus,
.tag-suggestions .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
                                                                            /* Pagina Cambio Password */
body.change-password-page {
    background-image: url('../sfondoLogin.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
}
/* Card contenitore */
.change-password-container.card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #3498db;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 40px auto;
}
/* Pulsante indietro */
.back-button {
    width: fit-content;
    margin-bottom: 10px;
    border-radius: 20px;
}
/* Password toggle: posizionata a destra dentro il campo */
.password-container { position: relative; }
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    padding: 0;
}
/* Indicatore forza password */
.password-strength {
    margin-top: 8px;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.strength-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin: 5px 0;
    overflow: hidden;
    border: 1px solid #ccc;
}
.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
    border-radius: 2px;
}
.password-feedback { margin-top: 5px; font-size: 11px; color: #555; }
.password-feedback ul { margin: 5px 0; padding-left: 15px; }
.password-feedback li { margin: 2px 0; color: #666; }

/* Coerenza con “Carica Immagini” per il pulsante submit */
.change-password-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.change-password-container .btn-outline-success:hover,
.change-password-container .btn-outline-success:focus,
.change-password-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
/* Pulsanti in Cambio Password: uniformi agli altri (pill outline) */
.change-password-container .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.change-password-container .btn:hover {
    background: rgba(0,0,0,0.08);
    color: #2c3e50;
}
/* Back-button speculare: outline-light adattato su card bianca */
.change-password-container .btn-outline-light {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}
.change-password-container .btn-outline-light:hover,
.change-password-container .btn-outline-light:focus,
.change-password-container .btn-outline-light:active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
/* Submit “Cambia Password” identico a “Carica Immagini” */
.change-password-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.change-password-container .btn-outline-success:hover,
.change-password-container .btn-outline-success:focus,
.change-password-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}


/* Pagina Registrazione */
body.register-page {
    background-image: url('../sfondoLogin.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
}
.register-container.card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #3498db;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 40px auto;
}
/* Pulsanti registrazione: uniformi agli altri (pill outline) */
.register-container .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.register-container .btn:hover {
    background: rgba(0,0,0,0.08);
    color: #2c3e50;
}
/* Back-button su card bianca (outline-light adattato) */
.register-container .btn-outline-light {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}
.register-container .btn-outline-light:hover,
.register-container .btn-outline-light:focus,
.register-container .btn-outline-light:active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
/* Submit “Registrati” identico a “Carica Immagini” */
.register-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.register-container .btn-outline-success:hover,
.register-container .btn-outline-success:focus,
.register-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
/* reCAPTCHA: cornice e raggio coerenti (supporta render esplicito su #recaptcha) */
.register-container .g-recaptcha,
.register-container #recaptcha {
    border-radius: 12px;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
    margin-top: 8px;
}

/* Wrapper per allineamento (desktop: proporzioni originali, mobile: compatto) */
.register-container .recaptcha-wrapper {
    display: flex;
    justify-content: flex-start; /* usa center se preferisci */
}

/* Tweak extra per device molto stretti */
@media (max-width: 420px) {
    .register-container .g-recaptcha,
    .register-container #recaptcha {
        transform: scale(0.96);
        transform-origin: left center;
    }
}
/* Pagina Login */
body.login-page {
    background-image: url('../sfondoLogin.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
}
.login-container.card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #3498db;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 40px auto;
}
/* Pulsanti login: uniformi agli altri (pill outline) */
.login-container .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.login-container .btn:hover {
    background: rgba(0,0,0,0.08);
    color: #2c3e50;
}
/* Link Registrati: outline-light su card bianca */
.login-container .btn-outline-light {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}
.login-container .btn-outline-light:hover,
.login-container .btn-outline-light:focus,
.login-container .btn-outline-light:active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
/* Submit “Accedi” identico al verde usato altrove */
.login-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.login-container .btn-outline-success:hover,
.login-container .btn-outline-success:focus,
.login-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
                                          /* Pagina Cambio Password */
body.change-password-page {
    background-image: url('../sfondoDashboard.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
}
/* Card contenitore */
.change-password-container.card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #3498db;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 40px auto;
}
/* Pulsante indietro */
.back-button {
    width: fit-content;
    margin-bottom: 10px;
}
/* Password toggle: posizionata a destra dentro il campo */
.password-container { position: relative; }
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    padding: 0;
}
/* Indicatore forza password */
.password-strength {
    margin-top: 8px;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.strength-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin: 5px 0;
    overflow: hidden;
    border: 1px solid #ccc;
}
.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
    border-radius: 2px;
}
.password-feedback { margin-top: 5px; font-size: 11px; color: #555; }
.password-feedback ul { margin: 5px 0; padding-left: 15px; }
.password-feedback li { margin: 2px 0; color: #666; }

/* Coerenza con “Carica Immagini” per il pulsante submit */
.change-password-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.change-password-container .btn-outline-success:hover,
.change-password-container .btn-outline-success:focus,
.change-password-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
/* Pulsanti in Cambio Password: uniformi agli altri (pill outline) */
.change-password-container .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.change-password-container .btn:hover {
    background: rgba(0,0,0,0.08);
    color: #2c3e50;
}
/* Back-button speculare: outline-light adattato su card bianca */
.change-password-container .btn-outline-light {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}
.change-password-container .btn-outline-light:hover,
.change-password-container .btn-outline-light:focus,
.change-password-container .btn-outline-light:active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
/* Submit “Cambia Password” identico a “Carica Immagini” */
.change-password-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.change-password-container .btn-outline-success:hover,
.change-password-container .btn-outline-success:focus,
.change-password-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}


/* Pagina Registrazione */
body.register-page {
    background-image: url('../sfondoLogin.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
}
.register-container.card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #3498db;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 40px auto;
}
/* Pulsanti registrazione: uniformi agli altri (pill outline) */
.register-container .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.register-container .btn:hover {
    background: rgba(0,0,0,0.08);
    color: #2c3e50;
}
/* Back-button su card bianca (outline-light adattato) */
.register-container .btn-outline-light {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}
.register-container .btn-outline-light:hover,
.register-container .btn-outline-light:focus,
.register-container .btn-outline-light:active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
/* Submit “Registrati” identico a “Carica Immagini” */
.register-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.register-container .btn-outline-success:hover,
.register-container .btn-outline-success:focus,
.register-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
/* reCAPTCHA: cornice e raggio coerenti (supporta render esplicito su #recaptcha) */
.register-container .g-recaptcha,
.register-container #recaptcha {
    border-radius: 12px;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
    margin-top: 8px;
}

/* Wrapper per allineamento (desktop: proporzioni originali, mobile: compatto) */
.register-container .recaptcha-wrapper {
    display: flex;
    justify-content: flex-start; /* usa center se preferisci */
}

/* Tweak extra per device molto stretti */
@media (max-width: 420px) {
    .register-container .g-recaptcha,
    .register-container #recaptcha {
        transform: scale(0.96);
        transform-origin: left center;
    }
}
/* Pagina Login */
body.login-page {
    background-image: url('../sfondoLogin.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
}
.login-container.card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #3498db;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 40px auto;
}
/* Pulsanti login: uniformi agli altri (pill outline) */
.login-container .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.login-container .btn:hover {
    background: rgba(0,0,0,0.08);
    color: #2c3e50;
}
/* Link Registrati: outline-light su card bianca */
.login-container .btn-outline-light {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}
.login-container .btn-outline-light:hover,
.login-container .btn-outline-light:focus,
.login-container .btn-outline-light:active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
/* Submit “Accedi” identico al verde usato altrove */
.login-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.login-container .btn-outline-success:hover,
.login-container .btn-outline-success:focus,
.login-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
                                          /* Pagina Cambio Password */
body.change-password-page {
    background-image: url('../sfondoEditPwd.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
}
/* Card contenitore */
.change-password-container.card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #3498db;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 40px auto;
}
/* Pulsante indietro */
.back-button {
    width: fit-content;
    margin-bottom: 10px;
}
/* Password toggle: posizionata a destra dentro il campo */
.password-container { position: relative; }
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    padding: 0;
}
/* Indicatore forza password */
.password-strength {
    margin-top: 8px;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.strength-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin: 5px 0;
    overflow: hidden;
    border: 1px solid #ccc;
}
.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
    border-radius: 2px;
}
.password-feedback { margin-top: 5px; font-size: 11px; color: #555; }
.password-feedback ul { margin: 5px 0; padding-left: 15px; }
.password-feedback li { margin: 2px 0; color: #666; }

/* Coerenza con “Carica Immagini” per il pulsante submit */
.change-password-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.change-password-container .btn-outline-success:hover,
.change-password-container .btn-outline-success:focus,
.change-password-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
/* Pulsanti in Cambio Password: uniformi agli altri (pill outline) */
.change-password-container .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.change-password-container .btn:hover {
    background: rgba(0,0,0,0.08);
    color: #2c3e50;
}
/* Back-button speculare: outline-light adattato su card bianca */
.change-password-container .btn-outline-light {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}
.change-password-container .btn-outline-light:hover,
.change-password-container .btn-outline-light:focus,
.change-password-container .btn-outline-light:active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
/* Submit “Cambia Password” identico a “Carica Immagini” */
.change-password-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.change-password-container .btn-outline-success:hover,
.change-password-container .btn-outline-success:focus,
.change-password-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
/* Centramento verticale/orizzontale dei container sulle pagine di autenticazione */
body.login-page,
body.register-page,
body.change-password-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Le card centrano senza margine superiore */
.login-container.card,
.register-container.card,
.change-password-container.card {
    margin: 0 auto;
}
/* Background generico per pagine Bootstrap */
.page-bg {
  background-image: url('../sfondoEditPwd.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

/* Sfondo blocco pulsanti Impostazioni: identico alla Dashboard */
.settings-nav-bg {
  background-color: rgba(61, 100, 116, 0.90);
}

/* Bottoni responsive: testo a capo, centrato, senza overflow */
.btn-responsive,
.control-panel .navbar-nav .btn {
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.2;
  padding: .375rem .75rem; /* padding standard Bootstrap */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Su mobile, i bottoni nella navbar occupano tutta la larghezza e non tagliano il testo */
@media (max-width: 576px) {
  .control-panel .navbar-collapse .navbar-nav .btn {
    width: 100%;
  }
}

/* Card statistiche con bordo a sinistra */
.card-stat {
  /*border-left: 4px solid #2c3e50;*/
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  border-radius : 20px;
}

/* Card-body con bordo come Cambio Password */
.card-bordered .card-body {
  border: 2px solid #3498db;
  border-radius: 20px;
}

/* Big stat senza sfondo o bordi extra */
.big-stat-card {
  border-left: none;
  box-shadow: none;
}
.big-stat-card .card-body {
  background: transparent;
  border: none;
}

/* Lista scrollabile per dettagli sessioni */
.log-scroll {
  max-height: 300px;
  overflow-y: auto;
}

/* Bottoni di navigazione */
.btn.nav-button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Varianti gradient coerenti con pagine migrate */
.btn.nav-button.users {
  background: linear-gradient(135deg, #FFB6C1, #FFA0B4);
  color: #333;
}
.btn.nav-button.preferiti {
  background: linear-gradient(135deg, rgb(229,203,182), rgb(85,204,131));
  color: #333;
}
.btn.nav-button.logs {
  background: linear-gradient(135deg, #B6E5D8, #A0D4C7);
  color: #333;
}
.btn.nav-button.email {
  background: linear-gradient(135deg, #DDA0DD, #D8BFD8);
  color: #333;
}
.btn.nav-button.upload {
  background: linear-gradient(135deg, #FAD6A5, #F9B572);
  color: #333;
}
.btn.nav-button.version {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
}

.btn.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Navbar logo styling: match .control-panel border-radius and look */
.navbar-logo {
        height: 45px;
        margin-right: 15px;
        border-radius: 8px; /* same radius as .control-panel */
        padding: 6px; /* small inner padding so the background is visible */
        background: rgba(61,100,116,0.90); /* harmonizes with control-panel */
        box-shadow: 0 4px 6px rgba(0,0,0,0.12);
        object-fit: contain;
        display: inline-block;
        transition: all 0.3s ease; /* transizione fluida per tutti gli effetti */
}

/* Effetto hover sul logo */
.navbar-logo:hover {
        transform: scale(1.10); /* leggero zoom */
        box-shadow: 0 6px 12px rgba(0,0,0,0.4); /* ombra più pronunciata */
        cursor: pointer; /* cursore a manina per indicare che è cliccabile */
}

/* Mobile tweaks */
@media (max-width: 576px) {
    .page-bg { background-attachment: fixed; }
    .btn.nav-button { padding: 14px 16px; }
    .navbar-logo { height: 35px !important; margin-right: 10px !important; padding: 4px !important; }
}
                                                                            /* Pagina Cambio Password */
body.change-password-page {
    background-image: url('../sfondoDashboard.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
}
/* Card contenitore */
.change-password-container.card {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #3498db;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 40px auto;
}
/* Pulsante indietro */
.back-button {
    width: fit-content;
    margin-bottom: 10px;
}
/* Password toggle: posizionata a destra dentro il campo */
.password-container { position: relative; }
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    padding: 0;
}
/* Indicatore forza password */
.password-strength {
    margin-top: 8px;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.strength-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin: 5px 0;
    overflow: hidden;
    border: 1px solid #ccc;
}
.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
    border-radius: 2px;
}
.password-feedback { margin-top: 5px; font-size: 11px; color: #555; }
.password-feedback ul { margin: 5px 0; padding-left: 15px; }
.password-feedback li { margin: 2px 0; color: #666; }

/* Coerenza con “Carica Immagini” per il pulsante submit */
.change-password-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.change-password-container .btn-outline-success:hover,
.change-password-container .btn-outline-success:focus,
.change-password-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
/* Pulsanti in Cambio Password: uniformi agli altri (pill outline) */
.change-password-container .btn {
    min-height: 35px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: #2c3e50;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}
.change-password-container .btn:hover {
    background: rgba(0,0,0,0.08);
    color: #2c3e50;
}
/* Back-button speculare: outline-light adattato su card bianca */
.change-password-container .btn-outline-light {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}
.change-password-container .btn-outline-light:hover,
.change-password-container .btn-outline-light:focus,
.change-password-container .btn-outline-light:active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
/* Submit “Cambia Password” identico a “Carica Immagini” */
.change-password-container .btn-outline-success {
    background-color: transparent;
    color: #0bc16d;
    border-color: #0bc16d;
}
.change-password-container .btn-outline-success:hover,
.change-password-container .btn-outline-success:focus,
.change-password-container .btn-outline-success:active {
    background-color: #0bc16d;
    color: #fff;
    border-color: #0bc16d;
}
/* Centramento verticale/orizzontale dei container sulle pagine di autenticazione */
body.login-page,
body.register-page,
body.change-password-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Le card centrano senza margine superiore */
.login-container.card,
.register-container.card,
.change-password-container.card {
    margin: 0 auto;
}

/* Increase main content container max-width on large screens
     Keeps Bootstrap responsive behavior but widens the central layout
     to better fit large monitors. Targets pages using the standard
     `body.page-bg .container` pattern used across the app. */
@media (min-width: 1200px) {
    body.page-bg .container {
        max-width: 1450px;
    }
}