@font-face {
    font-family:"Ubuntu";
    src: url('font/Ubuntu-Regular.ttf'); 
	font-display: fallback;
}
@font-face {
    font-family: "Segoe UI";
    src: url('font/Segoe UI.ttf');
	font-display: fallback;
}
@font-face {
    font-family: "Roboto";
    src: url('font/Roboto-Regular.ttf'); 
	font-display: fallback;
}

body {
    padding:0px;
    margin:0px;
    font-family: var(--font);
    font-size: 13px;
    background-color: #f8f8f8;
}

.hidden  { display: none !important;}

.w25     { width:25px !important; }
.w50     { width:50px !important; }
.w75     { width:75px !important; }
.w100    { width:100px !important; }
.w150    { width:150px !important; }
.w200    { width:200px !important; }
.w250    { width:250px !important; }
.w300    { width:300px !important; }
.w400    { width:400px !important; }

.h25     { height:25px !important; }
.h50     { height:50px !important; }
.h75     { height:75px !important; }
.h100    { height:100px !important; }
.h120    { height:120px !important; }
.h150    { height:150px !important; }
.h175    { height:175px !important; }
.h200    { height:200px !important; }
.h250    { height:250px !important; }
.h300    { height:300px !important; }

.w20p    { width: 20%; }
.w25p    { width: 25%; }
.w33p    { width: 33.3%; }
.w50p    { width: 50%; }
.w75p    { width: 75%; }
.w100p   { width:100%; }

.p0      { padding: 0px }
.p2      { padding: 2px }
.p5      { padding: 5px }
.p10     { padding: 10px }
.p15     { padding: 15px }
.p20     { padding: 20px }
.p25     { padding: 25px }
.p30     { padding: 30px }

.pl20     { padding-left: 20px !important; }
.pl30     { padding-left: 30px !important; }

.mauto   { margin: auto !important; }
.m0      { margin: 0px; }
.m2      { margin: 2px; }
.m5      { margin: 5px; }
.m10     { margin: 10px; }
.m15     { margin: 15px; }
.m20     { margin: 20px; }
.m25     { margin: 25px; }
.m30     { margin: 30px; }

.mt5      { margin-top: 5px; }
.mt10     { margin-top: 10px; }
.mt15     { margin-top: 15px; }
.mt20     { margin-top: 20px; }
.mt25     { margin-top: 25px; }
.mt30     { margin-top: 30px; }

.f9      { font-size:9px; }
.f10      { font-size:10px; }
.f11      { font-size:11px; }
.f12      { font-size:12px; }
.f13      { font-size:13px; }
.f14      { font-size:14px; }
.f15      { font-size:15px; }
.f16      { font-size:16px; }
.f17      { font-size:17px; }
.f18      { font-size:18px; }
.f19      { font-size:19px; }
.f20      { font-size:20px; }
.f25      { font-size:25px; }
.f30      { font-size:30px; }
.f35      { font-size:35px; }
.f40      { font-size:40px; }
.f45      { font-size:45px; }
.f50      { font-size:50px; }

.round5  { border-radius: 5px;}

.bg-white       { background-color: white;}
.bg-black       { background-color: black !important; color: white !important; }
.bg-green       { background-color: green !important; color:white;}
.bg-red         { background-color: red !important; color:white !important;}
.bg-red-dark    { background-color: darkred !important; color:white !important;}
.bg-orange      { background-color: orange; color:white;}
.bg-gray        { background-color: gray; color:white !important; }
.bg-lightgray   { background-color: lightgray  !important; }
.bg-blue        { background-color: rgba(59,130,246,1) !important; color: white !important; }
.bg-gold        { background-color: gold !important; }

.white          { color: white !important; }
.black          { color:black !important; }
.red            { color:red !important; }
.red-dark       { color:rgb(214, 31, 31) !important; }
.green          { color:green !important; }
.green-dark     { color:darkgreen !important; }
.blue           { color:rgba(59,130,246,1) !important; }
.gray           { color:gray !important; }
.orange         { color:orange !important;}

.top-al     { vertical-align: top;}
.left-al    { text-align: left !important; }
.right-al   { text-align: right !important; }
.right      { float: right !important;}
.center     { text-align: center !important;}
.cursor     { cursor: pointer; }

.bg-main                        { background-color: var(--background-primary) !important; color:var(--background-primary-text) !important; }
.bg-secondary                   { background-color: var(--background-secondary) !important; color:var(--background-primary-text) !important; }
.bg-secondary.hover:hover       { background-color: var(--background-primary) !important; color:var(--background-secondary-text) !important; }
.bg-active                      { background-color:var(--background-secondary); color:var(--background-secondary-text); }
.color-main { color:var(--background-primary); }
.color-secondaty { color:var(--background-secondary); }

.vline { border-bottom: 1px solid var(--sidebar-highlight);}

.hover:hover {
    background-color: var(--background-hover-color);
    color: var(--hover-color);
}

.bold {
    font-weight: bold;
}

.inline { display: inline-block;}

a {  color:var(--background-secondary); text-decoration: none;  }

.mousehover {
    opacity: 0.6;
}
.mousehover:hover {
    opacity: 1;
}

.input {
    width: calc(100% - 20px);
    padding: 10px;
    border:0px;
    border: 1px solid lightgray;
}

.dataTables_wrapper .dt-buttons {
    margin-bottom: 25px; 
}

/* Container per più input (valori multipli) */
.multiple-inputs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.multiple-value-item {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}

.data-input.input {
    /* Assicurati che gli input abbiano una larghezza adeguata */
    flex: 1;
}

.remove-multiple-value {
    background-color: #dc3545; /* Rosso */
    border: none;
    color: #fff;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
}

.remove-multiple-value:hover {
    background-color: #c82333;
}

/* Bottone per aggiungere ulteriori valori in modalità multipla */
.add-multiple-value {
    background-color: #28a745; /* Verde */
    border: none;
    color: #fff;
    padding: 4px 8px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    align-self: flex-start;
}

/* Hover per il bottone "aggiungi" */
.add-multiple-value:hover {
    background-color: #218838;
}


.error {
    background-color:#990000; 
    width:calc(100% - 60px); 
    color:white !important; 
    padding: 30px !important; 
    border:0px;
    text-align:center;
    z-index:1000;
}
.sys-info-frame {
    position: absolute; 
    top:calc(50% - 200px); 
    background-color:#dddddd; 
    width:calc(100% - 60px); 
    color:rgb(0, 0, 0) !important; 
    padding: 30px !important; 
    border:0px;
    text-align:center;
    z-index:2500;
}
.sys-info-frame input {
    padding:10px 30px; 
    background-color:white; 
    border:0px; 
    cursor:pointer; 
    border-radius:15px;
}
.sys-error-frame {
    position: absolute; 
    top:calc(50% - 200px); 
    background-color:#990000; 
    width:calc(100% - 60px); 
    color:white !important; 
    padding: 30px !important; 
    border:0px;
    text-align:center;
    z-index:2500;
}

.sys-error-frame input {
    padding:10px 30px; 
    background-color:white; 
    border:0px; 
    cursor:pointer; 
    border-radius:15px;
}

.sys-loading-frame {
    color:black; 
    z-index:2200; 
    font-size:2.5em;
    background-color:white;
}

.sys-modal-background {
    background-color: black; 
    position:fixed; 
    top:0px; 
    left:0px; 
    height:100%; 
    width:100%; 
    opacity: 0.6; 
    z-index:2100;
}

.sys-modal-frame {
    position:fixed; 
    top: calc(50% - 150px); 
    left:0px; 
    width:100%; 
    z-index:2200; 
    text-align:center;
    padding: 50px 0px;
}

.header-bar {
    position:fixed;
    width: 100%;
    z-index: 2100;
    height: 50px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dialog {
    display:none; 
    position: fixed; 
    top: 20%; 
    left: 50%; 
    transform: translateX(-50%); 
    background-color: #fff; 
    padding:20px; 
    border:1px solid #ccc; 
    border-radius:5px; 
    z-index:1000;
    min-width: 300px;
}

/* New: modern modal/dialog utility styles
   - .modal-overlay / .modal-dialog : generic classes for centering dialogs using flex
   - #editDocumentDialogContainer : specific id used by employee documents view to behave as a modal overlay
   Note: the JS that shows the dialog should set display to "flex" (not "block") to enable centering.
*/
.modal-overlay,
.fk-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show,
.fk-modal-overlay.show {
    display:flex;
}

.modal-dialog,
.fk-modal-dialog {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    min-width: 300px;
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

/* Ensure the editDocumentDialogContainer (used by the employee documents view)
   behaves as a full-screen overlay and centers its child .frame.
   Note: JS should set style.display = 'flex' to open it, and 'none' to close it.
*/
#editDocumentDialogContainer {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#editDocumentDialogContainer .frame {
    max-width: 560px;
    width: calc(100% - 40px);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Form row spacing inside dialogs */
.form-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frame {
    background-color: var(--frame-color);
    color: var(--frame-text);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.frame-title {
    background-color: var(--background-primary);
    color: var(--background-primary-text);
    padding: 12px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); 
}

.zebra-table {
    border-spacing: 0px;
    border-collapse: collapse;
}
.zebra-table tr td, th {
    padding: 6px 6px;
}
.zebra-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.existing-files { margin-bottom: 0.5em; }
.file-list { display: flex; flex-direction: column; }
.file-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid #e0e0e0;
}

.file-icon img {
  width: 32px; height: 32px; object-fit: cover; border-radius: 2px;
}

.file-icon i {
  font-size: 32px; color: #777; text-align: center; line-height: 32px;
}
.file-info a {
  color: inherit; text-decoration: none;
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-meta {
  font-size: 0.85em; color: #666; padding-top: 3px;
}

.file-actions { text-align: right; }
.btn-delete {
  background: none; border: none; cursor: pointer;
  color: #c00; font-size: 18px;
}

.btn-delete:hover { color: #900; }
.file-upload { margin-top: 10px; }

.file-info {
  min-width: 0;               /* permette allo 1fr di ridursi */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding:10px 0px;
}


/* Nasconde il testo predefinito del file input (opzionale) */
/* file-upload { opacity: 0; width: 0; height: 0; } */
/* In questo caso però vogliamo mantenere soltanto il pulsante stile button */

/* Stili per il pseudo-button del file input */
.file-upload::-webkit-file-upload-button,
.file-upload::file-selector-button {
  font-family: inherit;
  font-size: 0.95em;
  color: #fff;
  background-color: #28a745;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Hover/Active */
.file-upload::-webkit-file-upload-button:hover,
.file-upload::file-selector-button:hover {
  background-color: #218838;
}
.file-upload::-webkit-file-upload-button:active,
.file-upload::file-selector-button:active {
  background-color: #1e7e34;
}

/* Facoltativo: aggiungi icona accanto al testo */
.file-upload::-webkit-file-upload-button::before,
.file-upload::file-selector-button::before {
  content: "\f093"; /* unicode di fa-upload */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 8px;
}


.button {
    padding: 6px 10px;    
    border-radius: 5px;
    border:0px;
    cursor: pointer;
}

.button:hover {
    font-weight: bold;
}
.header-button {
    display: inline-block !important;
    padding:18.5px 20px;
    float: left;
}

/* Notifications icon styles */
.notifications-icon {
    position: relative;
}

.notifications-no-unread {
    color: #666 !important; /* gray color like logout button */
}

.notifications-has-unread {
    color: #ff6600 !important; /* orange color for unread notifications */
}

.notifications-badge {
    display: inline;
    margin-left: 5px;
    color: #ff6600;
    font-size: 13px;
    font-weight: bold;
}

.header-logo {
    padding: 0px !important;
    display: inline-block;
    background: url("../theme/images/logo.png");
    width: 200px;
    background-position: left;
    background-repeat: no-repeat;
    background-size:contain;
    height:100%;
 }

.left-sidebar-model {
    margin-top: 10px;
    margin-right:2px;
    display: grid;
    margin-left: 250px;
    column-gap: 0px;
}

.sidebar {
    background-color: var(--sidebar-color) !important;
    color: var(--sidebar-text) !important;
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 50px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.sidebar-title {
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--sidebar-highlight);
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar ul li {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.sidebar ul li:hover {
    background-color: var(--sidebar-highlight);
    cursor:pointer;
}

.sidebar ul li.active {
    background-color: var(--background-highlight);
    color: var(--text-highlight);
    border-left: 4px solid var(--text-highlight);
    font-weight: 600;
}

.sidebar .accordion:hover  {
    background-color: transparent;
}

.sidebar .accordion-header {
    margin-bottom: 10px;
}

.sidebar .accordion-body {
    padding-left: 20px;
}

.sidebar .accordion-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .accordion-body li {
    padding: 8px 0;
    cursor: pointer;
}

.sidebar .accordion-body li:hover {
    background-color: var(--sidebar-highlight);
}

.sidebar-footer {
    padding: 15px;
    text-align: left;
    font-size: 10px;
    color: #7c7c7c;
    border-top: 1px solid var(--sidebar-highlight);
    margin-top: auto;
    margin-bottom: 45px;
    line-height: 1.5;
}

.sidebar-footer a {
    color: #7c7c7c;
    text-decoration: underline;
}

.sidebar-footer a:hover {
    opacity: 0.8;
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 28px;
  }
  
  /* Hide default HTML checkbox */
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* The slider */
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  input:checked + .slider {
    background-color: var(--switch-color);
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px var(--switch-color);
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(30px);
    -ms-transform: translateX(30px);
    transform: translateX(30px);
  }
  
  /* Rounded sliders */
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }

 /* ==== CSS monolitico stile “classico” ================================= */

.doc-table { display: table; width: 100%; border-collapse: collapse; font-family: inherit; }
.doc-table .header, .doc-table .row { display: table-row; }
.doc-table .cell { display: table-cell; padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid #eee; }
.doc-table .header .cell { font-weight: 600; background: #fafafa; color: #333; border-bottom: 2px solid #e6e6e6; }

/* Selection highlight for rows (soft yellow like Explorer) */
.row.selected {
    background-color: #fff4b0 !important; /* light yellow */
    border-left: 4px solid #f2c94c;
}

/* Larger toolbar/action icons (Windows 11-like) */
.doc-toolbar .icon-btn {
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.doc-toolbar .icon-btn i {
    font-size: 20px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    display: inline-block;
    text-align: center;
    border-radius: 7px;
    background: transparent;
    color: #333;
}
.doc-toolbar .icon-btn:hover i {
    background: rgba(0,0,0,0.06);
}

/* Slightly larger icons for per-row actions too */
.doc-table .cell.actions .icon-btn i,
.doc-table .cell.actions .icon-btn {
    font-size: 18px;
    padding: 6px;
}

/* Toolbar selection name */
#toolbarSelectionName {
    display: inline-block;
    margin-right: 12px;
    font-weight: 600;
    color: #222;
    vertical-align: middle;
}

/* compact spacing adjustments for toolbar */
.doc-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap:wrap; }
.doc-toolbar .toolbar-btn { display: inline-flex; align-items:center; gap:6px; }

.doc-table .cell.icon { width: 36px; text-align: center; }
.doc-table .cell.name { width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-table .cell.type, .doc-table .cell.privacy, .doc-table .cell.status, .doc-table .cell.mime, .doc-table .cell.size { width: 12%; color: #555; font-size: 0.95em; }
.doc-table .cell.actions { min-width: 100px; text-align: center; }


/* Context menu styles */
.doc-context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 99999;
    padding: 6px 0;
    border-radius: 6px;
    font-size: 13px;
}
.doc-context-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: #222;
}
.doc-context-item .ico { width: 18px; text-align: center; color: #555; }
.doc-context-item:hover { background: #f5f5f5; }

.row.folder-row .cell.name { font-weight: 700; color: #222; }
.row:hover .cell { background: #fbfbfb; }

.twisty { cursor: pointer; color:#666; border:none; background:transparent; padding:0; line-height:1; }
.row.folder-row[data-open="1"] .twisty i {  }
.twisty i { transition: transform .15s; }

.row-click {  }
.folder-click { border:none; background:transparent; cursor:pointer; color:inherit; font: inherit; padding:0; margin-left:6px; }
.folder-ico { color:#e0a100; } /* giallo cartella */

.indent { display:inline-block; width: calc(var(--lvl, 0) * 18px); }
.file-ico { color:#888; margin-right:6px; }

.icon-btn { border:none; background:transparent; cursor:pointer; padding:4px 6px; font-size:14px; color:#2277ee; }
.icon-btn:hover { opacity:.85; }
.icon-btn.danger { color:#cc3344; }

.badge { display:inline-block; padding:2px 6px; border-radius: 10px; background:#ddd; color:#444; font-size: 12px; }
.badge.ok { background: #e6ffe6; color:#2b7a2b; }

@media (max-width: 800px) {
    /* Mobile: convert table to stacked list/card layout */
    .doc-table { display:block; }
    .doc-table .header { display:none; } /* hide header row on small screens */

    /* Each row becomes a horizontal "card" with icon, name and actions */
    .doc-table .row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 10px;
        border-bottom: 1px solid #eee;
        flex-wrap: nowrap;
    }

    /* Cells become flow blocks, but icon/name/actions are flex-managed */
    .doc-table .cell { display: block; border-bottom: 0; padding: 0; }
    .doc-table .cell.icon { flex: 0 0 40px; width: 40px; text-align: center; }
    .doc-table .cell.name { flex: 1 1 auto; min-width: 0; white-space: normal; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
    .doc-table .cell.actions { flex: 0 0 auto; text-align: right; padding-left: 6px; }

    /* Hide less-important metadata on mobile to save space */
    .doc-table .cell.mime,
    .doc-table .cell.size,
    .doc-table .cell.status,
    .doc-table .cell.privacy,
    .doc-table .header .cell.type,
    .doc-table .header .cell.privacy,
    .doc-table .header .cell.status,
    .doc-table .header .cell.mime,
    .doc-table .header .cell.size {
        display: none !important;
    }

    /* Reduce visual indent and simplify folder label on mobile */
    .doc-table .indent { display: none; }

    /* Improve touch targets */
    .doc-table .row .cell.name .folder-click,
    .doc-table .row .cell.name button {
        padding: 6px 8px;
        border-radius: 6px;
    }

    /* Ensure actions are spaced and touch-friendly */
    .doc-table .cell.actions .icon-btn { padding: 8px; border-radius: 8px; }

    /* Keep toolbar usable on mobile */
    .doc-toolbar { gap:8px; flex-wrap:wrap; align-items:center; }
    .doc-toolbar .icon-btn i { width: 36px; height: 36px; line-height: 36px; display:inline-block; }

    /* Make file name wrap instead of truncating on very small screens */
    .doc-table .cell.name { white-space: normal; }

    /* Slight visual separation for folder rows on mobile */
    .row.folder-row { background: transparent; }

    /* No selection highlight on mobile */
    .row.selected { background-color: transparent !important; border-left: none !important; padding-left: 0 !important; }

    /* Ensure per-row actions remain visible and aligned */
    .doc-table .cell.actions { display: flex; gap:8px; align-items: center; justify-content: flex-end; }

    /* Hide the 'type' column on mobile as requested */
    .doc-table .cell.type { display: none !important; }

    /* Privacy badge removed on mobile; ensure actions have no extra margin */
    .doc-table .cell.actions { margin-left: 0; }

}
@media only screen and (min-width: 950px) {
    .hide-large { display: none !important; }
}


@media only screen and (min-width: 750px) {
    .hide-medium { display: none !important; }
   
}
@media only screen and (max-width: 750px) {
    .hide-small { display: none !important;}  
    .header-bar {
        margin: 0px;
    }
    .header-logo {
        width: calc(100% - 105px);
        text-align: center;        
        overflow: hidden;
        background-position: center;
        margin:0px;
    }

    .left-sidebar-model {
        margin-top: 10px;
        margin-right:0px;     
        margin-left: 0px;
    }
    
    .sidebar {
        display: none;
        position: relative;
        width: 100%;
        padding-top: 10px;        
    }
}
