/* =====================================
   Verifica Pazienti IFO
   Stile generale applicazione
===================================== */


/* Corpo pagina */

body {
    background-color: #f5f7fb;
    font-family:
        "Titilium Web",
        "Segoe UI",
        "Tahoma",
        "Geneva",
        "Verdana",
        "sans-serif";
    color: #333;
}



/* =====================================
   Navbar
===================================== */


.navbar {

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.15);

}


.navbar-brand {

    font-weight: 600;

    display: flex;

    align-items: center;

}


.navbar-brand img {

    border-radius: 20px;

}



.nav-link {

    font-weight: 500;

    transition:
        all .2s ease;

}


.nav-link:hover {

    opacity: .8;

}


.nav-link.active {

    font-weight: 700;

    border-bottom:
        2px solid white;

}



/* =====================================
   Container principali
===================================== */


.container {

    max-width: 1400px;

}

/* =====================================================
   SHELL: NAVBAR (alto) + SIDEBAR (sinistra)
   Verifica Pazienti IFO
   Incolla in fondo a css/style.css.
   Puoi eliminare le vecchie regole .navbar / .nav-link.
   ===================================================== */

:root {
    --tb-height: 60px;
    /* altezza navbar */
    --sb-width: 230px;
    /* larghezza sidebar */
    --brand-blue: #004e9c;
    /* blu logo IRCCS */
    --sb-bg: #e8f1fb;
    /* sidebar azzurra chiara */
    --sb-border: #d4e4f5;
    --sb-text: #1e496f;
    --sb-hover: #d8e8f8;
}

/* =========================
   NAVBAR in alto (bianca)
   ========================= */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--tb-height);
    background: #ffffff;
    border-bottom: 1px solid #e6e9ef;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    z-index: 1050;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.topbar-brand img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.topbar-brand span {
    font-weight: 700;
    font-size: 18px;
    color: var(--brand-blue);
}

/* Solo il titolo, centrato nella navbar e blu */
.topbar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
    font-size: 18px;
    color: var(--brand-blue);
    white-space: nowrap;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  color: #475569;
  text-decoration: none;          
  padding: 5px 10px;
  border-radius: 8px;
  transition: background-color .15s ease, color .15s ease;
}
.topbar-user i {
    font-size: 1.25rem;
    color: #94a3b8;
}
.topbar-user:hover {
  background: #f0f6fd;           
  color: var(--brand-blue);      
}
.topbar-logout {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    font-weight: 500;
    color: #a01d1d;
    text-decoration: none;
    padding: 7px 12px;
    border: 1px solid #c42d2d;
    border-radius: 8px;
    transition: background-color .15s ease;
}

.topbar-logout:hover {
    background: #fdf0ee;
    color: #a92626;
}

.topbar-logout i {
    font-size: 1.05rem;
}

.topbar-toggle {
    background: none;
    border: none;
    color: var(--brand-blue);
    font-size: 1.6rem;
    line-height: 1;
    padding: 2px 6px;
    cursor: pointer;
}

/* =========================
   SIDEBAR a sinistra
   ========================= */
.sb-sidebar {
    position: fixed;
    top: var(--tb-height);
    left: 0;
    width: var(--sb-width);
    height: calc(100vh - var(--tb-height));
    background: var(--sb-bg);
    border-right: 1px solid var(--sb-border);
    padding: 16px 12px;
    padding-top: 32px;
    z-index: 1040;
    overflow-y: auto;
    transition: transform .25s ease;
}

.sb-menu-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #7a97b5;
    padding: 0 13px 8px;
    margin: 0;
}

.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sb-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 8px;
    color: var(--sb-text);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.sb-link i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sb-link:hover {
    background: var(--sb-hover);
    color: var(--brand-blue);
}

.sb-link.active {
    background: var(--brand-blue);
    color: #ffffff;
}

/* =========================
   Contenuto pagina: spinto
   sotto la navbar e a destra
   della sidebar
   ========================= */
body.has-shell {
    padding-top: var(--tb-height);
}

body.has-shell .container {
    margin-left: var(--sb-width);
    max-width: calc(1400px - var(--sb-width));
}

/* =========================
   Overlay mobile
   ========================= */
.sb-overlay {
    display: none;
    position: fixed;
    inset: var(--tb-height) 0 0 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1035;
}

.sb-overlay.show {
    display: block;
}

/* =========================
   Responsive < 992px
   ========================= */
@media (max-width: 991.98px) {
    .sb-sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 16px rgba(0, 0, 0, .2);
    }

    .sb-sidebar.open {
        transform: translateX(0);
    }

    body.has-shell .container {
        margin-left: 0;
        max-width: 1400px;
    }

    /* su mobile abbrevia il nome software se serve */
    .topbar-brand span {
        font-size: 14px;
    }
}

/* =====================================
   Card
===================================== */


.card {

    border: none;

    border-radius: 14px;

    overflow: hidden;

}



.card.shadow {

    box-shadow:
        0 5px 25px rgba(0, 0, 0, .08) !important;

}



.card-header {

    background-color: white;

    border-bottom:
        1px solid #eee;

    font-weight: 600;

}



/* =====================================
   Titoli pagina
===================================== */


h3,
h4,
h5 {

    font-weight: 600;

}



/* =====================================
   Form
===================================== */


.form-control {

    border-radius: 8px;

    border:
        1px solid #d8dce5;

    padding: 10px 12px;

}



.form-control:focus {

    border-color:
        #0d6efd;

    box-shadow:
        0 0 0 .2rem rgba(13, 110, 253, .15);

}



/* =====================================
   Pulsanti
===================================== */


.btn {

    border-radius: 8px;

    font-weight: 500;

    padding-left: 18px;

    padding-right: 18px;

}


.btn-primary {

    box-shadow:
        0 3px 8px rgba(13, 110, 253, .25);

}



.btn-danger {

    box-shadow:
        0 3px 8px rgba(220, 53, 69, .25);

}



/* =====================================
   Tabelle
===================================== */


.table {

    background-color: white;

    vertical-align: middle;

}



.table thead th {

    white-space: nowrap;

    font-size: .9rem;

}



.table tbody tr {

    transition:
        background-color .15s ease;

}


.table tbody tr:hover {

    background-color:
        #f8f9fa;

}



/* =====================================
   Alert messaggi
===================================== */


.alert {

    border-radius: 10px;

}



/* =====================================
   Logo header pagine
===================================== */


.container>.text-center img {

    margin-top: 10px;

}


.container>.text-center h3 {

    margin-top: 15px;

}



/* =====================================
   Progress bar upload
===================================== */


.progress {

    height: 22px;

    border-radius: 10px;

    overflow: hidden;

}


.progress-bar {

    font-weight: 600;

}



/* =====================================
   Mobile
===================================== */


@media(max-width:768px) {


    .navbar-brand {

        font-size: .95rem;

    }


    .card {

        border-radius: 10px;

    }


    .table {

        font-size: .85rem;

    }

}

/* =====================================
 LOGIN PAGE
===================================== */
.login-page {
    background-color: #ffffff;
}

.login-page .col-md-4 {
    max-width: 460px;
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 900px;
    max-width: 100%;
    height: auto;
    margin-bottom: 2.5rem;
}

.login-header h3 {
    margin-top: 0;
}

.login-card {
    background-color: #eaf2fc;
    border: 1.5px solid #bcd4ee !important;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04),
        0 10px 28px rgba(37, 99, 235, .10) !important;
}

.login-card .card-body {
    padding: 2rem !important;
}

.login-card .card-title {
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: 1.5rem !important;
}

.login-card .form-label {
    font-weight: 500;
    color: #475569;
    font-size: 16px;
    margin-bottom: 8px;
}

.login-card .field {
    position: relative;
}

.login-card .field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.2rem;
    pointer-events: none;
}

.login-card .form-control {
    height: 52px;
    padding-left: 48px;
    background-color: #ffffff;
    border: 1px solid #e2ecf7;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color .15s ease,
        background-color .15s ease,
        box-shadow .15s ease;
}

.login-card .form-control::placeholder {
    color: #cbd5e1;
}

.login-card .form-control:focus {
    background-color: #ffffff;
    border-color: #6d9fd0;
    box-shadow: 0 0 0 3px rgba(0, 78, 156, .12);
}

.login-card .form-control.has-toggle {
    padding-right: 48px;
}

.login-card .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    font-size: 1.15rem;
    border-radius: 8px;
    transition: color .15s ease, background-color .15s ease;
}

.login-card .toggle-password:hover {
    color: #475569;
    background-color: #e8f1fb;
}

.login-card .btn-accedi {
    height: 52px;
    margin-top: 1rem;
    background-color: #004e9c;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 16px;
    transition: background-color .15s ease, transform .05s ease;
}

.login-card .btn-accedi:hover {
    background-color: #003d7a;
}

.login-card .btn-accedi:active {
    transform: scale(.99);
}

/* =====================================================
   ELENCO FILE 
   ===================================================== */

body.has-shell[data-page="files"] .container {
    margin-left: var(--sb-width);
    width: calc(100% - var(--sb-width));
    max-width: none;
    padding-left: 14px;
    padding-right: 14px;
}

body[data-page="files"] .card {
    width: 100%;
}

body[data-page="files"] .table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Tabella files compatta, dentro il container */
body[data-page="files"] .files-table {
    table-layout: fixed;
    width: 100%;
    font-size: 14px;
}

body[data-page="files"] .files-table td {
    padding: 16px 3px;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.1;
}

body[data-page="files"] .files-table thead th {
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.1;
}

body[data-page="files"] .files-table td:nth-child(10) .btn {
    font-size: 14px;
    padding: 5px 8px;
    width: 100%;
}

body[data-page="files"] .files-table td:nth-child(3),
body[data-page="files"] .files-table td:nth-child(12) {
    white-space: normal;
}

body[data-page="files"] .card-body {
    padding-left: 10px;
    padding-right: 10px;
}

body[data-page="files"] .files-table tbody tr:hover {
    background-color: #eef5fd;
}

body[data-page="files"] .card-header .btn-primary {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}

body[data-page="files"] .card-header .btn-primary:hover {
    background-color: #003d7a;
    border-color: #003d7a;
}

/* Larghezze colonne — tabella a 10 colonne */
body[data-page="files"] .files-table th:nth-child(1),
body[data-page="files"] .files-table td:nth-child(1) {
    width: 8%;
    text-align: left;
}

/* Utente */
body[data-page="files"] .files-table th:nth-child(2),
body[data-page="files"] .files-table td:nth-child(2) {
    width: 12%;
}

/* Data invio */
body[data-page="files"] .files-table th:nth-child(3),
body[data-page="files"] .files-table td:nth-child(3) {
    width: 10%;
}

/* Nota */
body[data-page="files"] .files-table th:nth-child(4),
body[data-page="files"] .files-table td:nth-child(4) {
    width: 10%;
}

/* Stato */
body[data-page="files"] .files-table th:nth-child(5),
body[data-page="files"] .files-table td:nth-child(5) {
    width: 10%;
}

/* Record iniziali */
body[data-page="files"] .files-table th:nth-child(6),
body[data-page="files"] .files-table td:nth-child(6) {
    width: 10%;
}

/* Record finali */
body[data-page="files"] .files-table th:nth-child(7),
body[data-page="files"] .files-table td:nth-child(7) {
    width: 10%;
}

/* Pazienti deceduti */
body[data-page="files"] .files-table th:nth-child(8),
body[data-page="files"] .files-table td:nth-child(8) {
    width: 12%;
}

/* Scadenza */
body[data-page="files"] .files-table th:nth-child(9),
body[data-page="files"] .files-table td:nth-child(9) {
    width: 8%;
}

/* Notifica */
body[data-page="files"] .files-table th:nth-child(10),
body[data-page="files"] .files-table td:nth-child(10) {
    width: 10%;
}

/* Download */

body.has-shell[data-page="users"] .container {
    margin-left: var(--sb-width);
    width: calc(100% - var(--sb-width));
    max-width: none;
    padding-left: 14px;
    padding-right: 14px;
}

body[data-page="users"] .table {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

/* Colonne tabella utenti: più strette e ordinate */
body[data-page="users"] .table th:nth-child(1),
body[data-page="users"] .table td:nth-child(1) {
    width: 20%;
}

body[data-page="users"] .table th:nth-child(2),
body[data-page="users"] .table td:nth-child(2) {
    width: 45%;
    text-align: center;
}

body[data-page="users"] .table th:nth-child(3),
body[data-page="users"] .table td:nth-child(3) {
    width: 15%;
    text-align: center;
}

body[data-page="users"] .card-body {
    min-height: 600px;
}

body[data-page="files"] .card-body {
    min-height: 600px;
}

/* Informativa sulla conservazione dei file */
/* Badge avviso conservazione file */
.retention-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #eaf2fc 0%, #f3f8ff 100%);
    border: 1px solid #cfe0f2;
    border-left: 4px solid var(--brand-blue);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 78, 156, 0.06);
}

.retention-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--brand-blue);
    line-height: 1;
}

.retention-text {
    font-size: 13px;
    color: #1e496f;
    line-height: 1.5;
}

.retention-text strong {
    color: var(--brand-blue);
    font-weight: 700;
}

/* =====================================================
   CARICA FILE — layout + restyling (versione pulita)
===================================================== */

/* Container: occupa lo spazio dopo la sidebar, con box-sizing corretto */
body[data-page="upload"] .container {
    max-width: none;
    width: calc(100% - var(--sb-width));
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* ===== BASE: schermi molto grandi (≥1400px, xxl) — versione "protagonista" ===== */
body[data-page="upload"] .upload-layout {
    display: flex;
    gap: 70px; 
    align-items: flex-start; 
    margin: 20px auto 0;
    max-width: 1250px;
    padding-left: 200px;    
    box-sizing: border-box;
}

body[data-page="upload"] .upload-card .card-body {
    padding: 24px 30px;
}

/* Card upload: protagonista, più larga, con fondo tenue */
body[data-page="upload"] .upload-card {
    flex: 1 1 62%;
    min-width: 0;
    margin: 0;
    width: auto;
    border-radius: 18px;
    background: #ffffff;
    border: 2px solid #cfe0f2;
    box-shadow: 0 8px 30px rgba(0, 78, 156, 0.10) !important;
}

/* Card requisiti: più stretta e defilata, di supporto */
body[data-page="upload"] .upload-specs-card {
    flex: 0 1 34%;
    transform: translateY(30px);
    min-width: 0;
    border-radius: 16px;
    background: #ffffff;      /* grigio chiaro */
    align-self: flex-start;
    margin-top: 80px;
    margin-left: 50px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.05) !important;
}

body[data-page="upload"] .upload-specs-card .card-body {
    padding: 24px 24px;
}

body[data-page="upload"] .upload-specs-list {
    font-size: 13px;
}

body[data-page="upload"] .upload-specs-title {
    font-size: 15px;
}

/* Intestazione form */
.upload-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #eef1f6;
}

.upload-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 14px;
    background: #eaf2fc;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
}

.upload-title {
    margin: 0;
    font-size: 1.35rem;
    color: #0f172a;
}

.upload-subtitle {
    margin: 2px 0 0;
    font-size: 14px;
    color: #7a8aa0;
}

/* Campi */
.upload-label {
    font-weight: 600;
    color: #334155;
    font-size: 15px;
    margin-bottom: 8px;
}

.upload-input {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.upload-input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 78, 156, .12);
}

/* textarea nota: altezza fissa, niente stiramenti */
body[data-page="upload"] #note {
    height: 120px;
    min-height: 120px;
    resize: vertical;
}

.upload-input::file-selector-button {
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    margin-right: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease;
}

.upload-input::file-selector-button:hover {
    background: #003d7a;
}

.upload-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #94a3b8;
}

.btn-upload {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    padding: 11px 26px;
    font-size: 15px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-upload:hover {
    background: #003d7a;
    border-color: #003d7a;
}

/* Lista requisiti con spunte verdi */
.upload-specs-title {
    font-weight: 700;
    color: var(--brand-blue);
    font-size: 16px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef4fb;
}

.upload-specs-list {
    margin: 0 0 18px;
    padding-left: 0;
    list-style: none;
    color: #475569;
    font-size: 14px;
}

.upload-specs-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 9px;
    line-height: 1.4;
}

.upload-specs-list li::before {
    content: "\F26E";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: 1px;
    color: #16a34a;
    font-size: 15px;
}

.upload-specs code {
    background: #e4edf8;
    color: #003d7a;
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
}

/* Riquadro esempio formato */
.code-example {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #cfe0f2;
    margin-top: 6px;
}

.code-example-title {
    background: #cfe0f2;
    color: #1e496f;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.code-example-body {
    background: #eef4fb;
    padding: 10px 0;
}

.code-line {
    display: flex;
    align-items: center;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 12.5px;
    color: #1e496f;
    padding: 2px 14px;
    white-space: nowrap;
}

.code-line:hover {
    background: #e2ecf7;
}

.code-num {
    color: #9db8d4;
    width: 22px;
    flex-shrink: 0;
    user-select: none;
    text-align: right;
    margin-right: 14px;
}

/* =====================================================
   RESPONSIVE A SCALA
===================================================== */
/* xl e sotto (<1400px) */
@media (max-width: 1399.98px) {
    body[data-page="upload"] .upload-layout {
        gap: 30px;
        padding-left: 0;
        max-width: 1150px;
    }
}

/* lg (<1200px) */
@media (max-width: 1199.98px) {
    body[data-page="upload"] .upload-layout {
        flex-direction: column;
        max-width: 760px;
        gap: 24px;
    }

    body[data-page="upload"] .upload-card,
    body[data-page="upload"] .upload-specs-card {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* ===== md/sotto lg (<992px): sidebar a scomparsa, container pieno ===== */
@media (max-width: 991.98px) {
    body[data-page="upload"] .container {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    body[data-page="upload"] .upload-layout {
        margin-top: 16px;
        max-width: 100%;
    }
}

/* ===== sm (<576px): tutto compatto per telefoni ===== */
@media (max-width: 575.98px) {

    body[data-page="upload"] .upload-card .card-body,
    body[data-page="upload"] .upload-specs-card .card-body {
        padding: 20px 18px;
    }

    body[data-page="upload"] .upload-layout {
        gap: 18px;
        margin-top: 12px;
    }

    .upload-head {
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .upload-icon {
        width: 46px;
        height: 46px;
        font-size: 1.4rem;
    }

    .upload-title {
        font-size: 1.15rem;
    }
}

/* =====================================================
   CAMBIA PASSWORD
   ===================================================== */

body[data-page="change-password"] .card {
    max-width: 560px;
    margin-left: 0;
}

/* =====================================================
   ID ABBREVIATO CON ...
   ===================================================== */

body[data-page="files"] .file-id-link {
    display: inline-block;
    max-width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0d6efd;
    text-decoration: none;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
}

body[data-page="files"] .file-id-link:hover {
    text-decoration: underline;
}

body[data-page="files"] .file-id-link:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 4px;
}


/* Email: una riga con ... */
body[data-page="files"] .files-table td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Date: forziamo due righe */
body[data-page="files"] .files-table td:nth-child(4),
body[data-page="files"] .files-table td:nth-child(13) {
    white-space: normal;
    line-height: 1.1;
}

/* Più spazio tra il titolo e la tabella */
body[data-page="files"] .card-header {
    padding-top: 18px;
    padding-bottom: 18px;
}

/* ===================================================== 
   CARD FORM CENTRATE 
===================================================== */
body[data-page="upload"] .card,
body[data-page="change-password"] .card,
body[data-page="create-user"] .card {
    margin-top: 60px;
    width: 750px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* POPUP NOTE */
.note-popup {
    position: absolute;
    z-index: 9999;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.note-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-popup-close {
    border: 0;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.note-popup-text {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}

.note-cell {
    cursor: pointer;
}

/* Campo password con occhietto toggle */
.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 44px;
}

.password-field .toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    font-size: 1.15rem;
    border-radius: 6px;
}

.password-field .toggle-password:hover {
    color: #475569;
}

.card-header {
    border-bottom: 1px solid #eee;
}

/* Mobile */
@media (max-width: 991.98px) {
    body.has-shell[data-page="files"] .container {
        margin-left: 0;
        width: 100%;
        max-width: none;
    }

    body[data-page="files"] .files-table {
        min-width: 1300px;
    }
}
/* =====================================================
   PROFILO — card singola centrata
===================================================== */

/* Container: la card sta centrata nell'area dopo la sidebar */
body[data-page="profile"] .container {
  box-sizing: border-box;
}

/* Card unica: larghezza contenuta e centrata */
body[data-page="profile"] .profile-card {
  max-width: 780px;
  margin: 40px auto 0;
  border-radius: 18px;
}

body[data-page="profile"] .profile-card .card-body {
  padding: 30px 34px;
}

/* Intestazione con avatar */
.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid #eef1f6;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eaf2fc;
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
}

.profile-title { margin: 0; font-size: 1.35rem; color: #0f172a; }
.profile-subtitle { margin: 3px 0 0; font-size: 14px; color: #7a8aa0; }

/* Titoli sezione */
.profile-section-title {
  font-weight: 700;
  color: var(--brand-blue);
  font-size: 15px;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eef4fb;
}

/* Righe dati account: etichetta + valore incolonnati a sinistra */
.profile-info-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  padding: 12px 4px;
  border-bottom: 1px solid #f1f5f9;
}

.profile-info-label {
  min-width: 120px;
  font-size: 14px;
  color: #64748b;
}

.profile-info-value {
  font-size: 15px;
  color: #1e293b;
  font-weight: 600;
}

.profile-info-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

/* Linea di separazione tra le due sezioni */
.profile-divider {
  border: none;
  border-top: 1px solid #e3ebf5;
  margin: 8px 0 28px;
}

/* Pulsante salva */
.btn-profile-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  padding: 10px 22px;
  border-radius: 10px;
  margin-top: 6px;
}
.btn-profile-save:hover { background: #003d7a; border-color: #003d7a; }

body[data-page="profile"] .form-label {
  font-weight: 600;
  color: #334155;
  font-size: 14px;
  margin-bottom: 8px;
}

/* =====================================================
   RESPONSIVE
===================================================== */
/* Solo su monitor grandi (≥1700px): sposta la card a destra */
@media (min-width: 1700px) {
  body[data-page="profile"] .container {
    padding-left: 450px;
  }
}
/* Schermi piccoli: sidebar a scomparsa, card quasi piena */
@media (max-width: 991.98px) {
  body[data-page="profile"] .profile-card {
    margin-top: 24px;
    max-width: 100%;
  }
}