/* Fiscalya branding & adapters on top of the ORIGINAL Protend CSS */
:root { --main-color:#0669aa; --menu-item-active-bg:rgba(0,149,171,.12); --text-color:#092a4f; }
body {color:var(--text-color)}
a:hover {color:#087e98}
.sidebar {overflow:hidden}
.sidebar-logo {height:165px;padding:10px 30px;justify-content:center;background:#fff;border-bottom:1px solid #edf1f5}
.sidebar-logo img {height:148px !important;max-height:none !important;max-width:100% !important;width:148px;object-fit:contain}
.sidebar .simlebar-sc {height:calc(100vh - 210px);overflow:auto}
.sidebar-menu {padding-top:18px}
.sidebar-menu .current-menu-item, .sidebar-menu a.active {color:#007b9c}
.sidebar-menu .bx {color:#087ba5}
.fy-sidebar-caption {font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#8193a8;padding:14px 42px 5px;font-weight:700}
.fy-sidebar-footer {margin:18px 28px 35px;padding:16px;border:1px solid #e2edf2;border-radius:16px;background:#f4fbfc;font-size:12px;color:#527081}
.fy-logo-word {display:none}
.fy-identity {display:flex;align-items:center;gap:11px}
.fy-user-avatar {display:flex;align-items:center;justify-content:center;width:43px;height:43px;border-radius:50%;background:linear-gradient(145deg,#063667,#0cbaba);color:#fff;font-weight:700;flex-shrink:0}
.fy-user-name {font-weight:700;font-size:15px;line-height:1.3}
.fy-user-email {font-size:12px;color:#71869a;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fy-hbtn {background:#fff;border:1px solid #e6ebf1;color:#113552;border-radius:12px;padding:9px 12px}
.fy-hbtn:hover{border-color:#10aabc;color:#0a7899}
.fy-btn {background:linear-gradient(110deg,#064778,#13bcb0) !important;border:0 !important;color:#fff!important;border-radius:11px;padding:12px 19px;font-weight:600}
.fy-btn:hover {filter:brightness(.95)}
.fy-hero {display:flex;justify-content:space-between;align-items:center;gap:28px;padding:28px 30px;background:#fff;border-radius:22px;border:1px solid #e6ecf3;box-shadow:var(--shadow2);margin-bottom:23px}
.fy-eyebrow{text-transform:uppercase;letter-spacing:.13em;font-size:11px;font-weight:700;color:#1698aa;margin-bottom:9px}
.fy-hero h1 {font-size:28px;line-height:1.28;margin:0 0 10px;color:#082f58}
.fy-hero p {color:#73879b;margin:0;line-height:1.6}
.fy-hero-mark {font-size:64px;line-height:1;color:#0bb8ad;opacity:.5}
.fy-stat {height:100%;padding:27px 24px;display:flex;gap:16px;align-items:flex-start}
.fy-stat .fy-stat-icon {height:54px;width:54px;display:flex;align-items:center;justify-content:center;border-radius:15px;font-size:27px;background:#e6f8f8;color:#068e99;flex:0 0 auto}
.fy-stat h3 {font-size:17px;margin:0 0 5px;font-weight:700;color:#123557}
.fy-stat p {font-size:13px;color:#8395a4;line-height:1.5;margin:0 0 9px}
.fy-tag {display:inline-block;font-size:11px;font-weight:700;border-radius:30px;padding:5px 10px;color:#637a8c;background:#edf3f7}
.fy-tag.fy-ready {background:#e2f8eb;color:#087d4e}
.fy-main-card {height:100%;padding:27px 29px}
.fy-main-card h3 {font-size:19px;margin:0 0 14px;color:#0b355b}
.fy-main-card p {font-size:14px;color:#7b8c9d;line-height:1.7}
.fy-module-list {list-style:none;padding:0;margin:0}
.fy-module-list li {display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 0;border-bottom:1px solid #edf1f5}
.fy-module-list li:last-child {border:0}
.fy-module-list strong {font-size:14px;color:#173a57}
.fy-module-list small {display:block;font-size:12px;color:#8798a7;margin-top:4px}
.fy-muted {color:#8094a2}
.fy-footer {text-align:right;padding:12px 5px 25px;color:#95a5b5;font-size:12px}
.fy-nav-disabled{opacity:.55;cursor:default}
.fy-preflight-alert {padding:17px 21px;background:#eff9fa;border-left:4px solid #14b6af;border-radius:12px;font-size:13px;color:#426777;line-height:1.55}
.fy-login-page {min-height:100vh;display:flex;align-items:center;justify-content:center;padding:45px 18px;background:radial-gradient(circle at 12% 5%,#e7f5f7,transparent 38%),#f8fbff}
.fy-login-frame{width:min(100%,520px)}
.fy-login-card{background:#fff;border-radius:24px;box-shadow:0 18px 55px rgba(11,47,85,.09);padding:32px 42px 38px;border:1px solid #e8eff4}
.fy-login-logo{display:block;height:185px;width:185px;object-fit:contain;margin:0 auto -15px}
.fy-login-heading{text-align:center;padding:0 0 26px}
.fy-login-heading h1{font-size:25px;color:#082f54;margin:0 0 7px}
.fy-login-heading p{margin:0;color:#7d8e9d;font-size:13px}
.fy-login-card .form-label{color:#1c405d;font-size:13px;font-weight:600}
.fy-login-card .form-control{background:#fafcfe;border:1px solid #dce7ee;border-radius:10px;padding:13px 15px;min-height:46px}
.fy-login-card .form-control:focus{border-color:#0ba4ae;box-shadow:0 0 0 3px rgba(9,173,167,.12)}
.fy-login-help{color:#59778e;font-size:13px}
.fy-login-help:hover{color:#048ea4}
.fy-login-bottom{font-size:12px;color:#9aabb7;text-align:center;margin:19px 0 0}
.fy-form-error{font-size:12px;color:#c13251;margin-top:5px;display:block}
.fy-alert{padding:13px 15px;border-radius:10px;background:#ecf9f1;color:#206c45;font-size:13px;margin-bottom:18px}
.fy-alert-danger{background:#fff1f2;color:#a52b4b}
.fy-placeholder-title{font-size:23px;margin:4px 0 12px}
.fy-profile input{max-width:600px}
.fy-profile .form-label{font-weight:600;font-size:13px;color:#2b4560}
.fy-profile .form-control{padding:11px 13px;border-radius:10px;border-color:#dce4eb}
.fy-profile section + section{margin-top:25px}
.fy-hidden {display:none!important}
@media(max-width:991px){.sidebar-logo{height:140px}.sidebar-logo img{height:115px!important;width:115px}.fy-main-card{padding:22px}.fy-hero{padding:24px}.fy-hero h1{font-size:23px}.fy-hero-mark{display:none}}
@media(max-width:575px){.fy-login-card{padding:25px 23px}.fy-login-logo{height:155px;width:155px}.fy-hero{padding:20px}.fy-stat{padding:19px}.fy-user-email{display:none}.main-content{padding:20px}}


/* ============================================================
   FISCALYA UI 02 — Compact & Wide
   Override della grafica Protend ORIGINALE (nessun redesign).
   Intervento: menu, logo, scrollbar, margini ed area utile.
   ============================================================ */
:root {
  --sidebar-size: 252px;
  --fy-edge: 9px;
  --fy-side-gap: 12px;
  --fy-content-gap: 14px;
}

/* 1. Sidebar aderente ai bordi, compatta e non tagliata */
body.sidebar-expand .sidebar {
  width: var(--sidebar-size);
  top: var(--fy-edge);
  left: var(--fy-edge);
  height: calc(100dvh - (var(--fy-edge) * 2));
  border-radius: 16px;
  box-shadow: 0 2px 22px rgba(8, 43, 83, .065);
}
body.sidebar-expand .sidebar-logo {
  height: 108px;
  padding: 6px 24px 7px;
  border-bottom: 1px solid #edf1f5;
}
body.sidebar-expand .sidebar-logo img {
  width: 106px !important;
  height: 106px !important;
  max-height: 106px !important;
  object-fit: contain;
  margin: 0 !important;
}
body.sidebar-expand .sidebar-logo .sidebar-close {
  font-size: 21px;
  top: 22px;
  right: 3px;
  margin: 0;
  width: 28px;
  height: 32px;
  color: #53728a;
}

/* 2. Navigazione: dimensione leggibile (non 20px), righe dense */
body.sidebar-expand .sidebar-menu.tf {
  padding: 2px 12px 4px;
  margin: 0;
}
body.sidebar-expand .sidebar-menu.tf > li { margin: 1px 0; }
body.sidebar-expand .sidebar-menu.tf > li > a {
  padding: 9px 11px;
  min-height: 40px;
  height: auto;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.42;
  font-weight: 500;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  color: #607080;
}
body.sidebar-expand .sidebar-menu.tf > li > a.active,
body.sidebar-expand .sidebar-menu.tf > li > a.current-menu-item {
  color: #087f9f;
  background: rgba(4, 151, 178, .095);
  font-weight: 600;
}
body.sidebar-expand .sidebar-menu.tf > li > a > i {
  font-size: 19px;
  width: 20px;
  flex: 0 0 20px;
  margin-right: 10px;
  text-align: center;
}
body.sidebar-expand .sidebar-menu.tf > li > a > span {
  flex: 1 1 auto;
  min-width: 0;
}
body.sidebar-expand .sidebar-submenu .dropdown-icon {
  right: 8px;
  font-size: 17px;
}
body.sidebar-expand .sidebar-menu.sidebar-menu-dropdown-content {
  padding: 0 0 0 5px;
  margin: 0;
  list-style: none;
}
body.sidebar-expand .sidebar-menu.sidebar-menu-dropdown-content > li > a {
  padding: 8px 8px 8px 39px;
  height: auto;
  min-height: 32px;
  line-height: 1.3;
  font-size: 12.5px;
  font-weight: 400;
  color: #687d8f;
}
body.sidebar-expand .sidebar-menu.sidebar-menu-dropdown-content > li > a:hover {
  color: #087f9f;
}
body.sidebar-expand .fy-sidebar-caption {
  padding: 17px 22px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #8395a8;
}
body.sidebar-expand .sidebar-menu.tf + .fy-sidebar-caption { margin-top: 7px; }
body.sidebar-expand .fy-sidebar-footer {
  margin: 17px 15px 20px;
  padding: 12px;
  border-radius: 10px;
  font-size: 11px;
}

/* 3. Scrollbar: SimpleBar del template + fallback nativo */
body.sidebar-expand .sidebar .simlebar-sc {
  height: calc(100dvh - 132px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #92c7d4 transparent;
  overscroll-behavior: contain;
}
/* SimpleBar inizializzato: impedisce la seconda scrollbar nativa */
body.sidebar-expand .sidebar .simlebar-sc[data-simplebar="init"] {
  overflow: hidden !important;
}
body.sidebar-expand .sidebar .simlebar-sc::-webkit-scrollbar,
body.sidebar-expand .sidebar .simplebar-content-wrapper::-webkit-scrollbar {
  width: 5px;
}
body.sidebar-expand .sidebar .simlebar-sc::-webkit-scrollbar-track,
body.sidebar-expand .sidebar .simplebar-content-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
body.sidebar-expand .sidebar .simlebar-sc::-webkit-scrollbar-thumb,
body.sidebar-expand .sidebar .simplebar-content-wrapper::-webkit-scrollbar-thumb {
  background: #94c8d3;
  border-radius: 100px;
}
body.sidebar-expand .sidebar .simlebar-sc::-webkit-scrollbar-thumb:hover,
body.sidebar-expand .sidebar .simplebar-content-wrapper::-webkit-scrollbar-thumb:hover {
  background: #249cab;
}
body.sidebar-expand .sidebar .simplebar-track.simplebar-vertical {
  width: 7px;
  right: 3px;
  top: 6px;
  bottom: 6px;
}
body.sidebar-expand .sidebar .simplebar-track.simplebar-vertical .simplebar-scrollbar {
  right: 1px;
  width: 5px;
}
body.sidebar-expand .sidebar .simplebar-track.simplebar-vertical .simplebar-scrollbar::before {
  background: linear-gradient(180deg, #2dbac3, #057caa);
  border-radius: 100px;
  opacity: .3;
  transition: opacity .18s ease;
}
body.sidebar-expand .sidebar .simplebar-track.simplebar-vertical .simplebar-scrollbar.simplebar-visible::before,
body.sidebar-expand .sidebar:hover .simplebar-scrollbar::before { opacity: .72; }

/* 4. Desktop: occupazione massima della larghezza disponibile */
@media (min-width: 992px) {
  body.sidebar-expand:not(.active) .sidebar {
    transform: translateX(0);
  }
  body.sidebar-expand.active .sidebar { transform: translateX(-125%); }
  body.sidebar-expand:not(.active) .main {
    padding-left: calc(var(--sidebar-size) + var(--fy-edge) + var(--fy-side-gap));
  }
  body.sidebar-expand.active .main { padding-left: 0; }
  body.sidebar-expand:not(.active) .main-header {
    padding-left: calc(var(--sidebar-size) + var(--fy-edge) + var(--fy-side-gap) + var(--fy-content-gap));
  }
  body.sidebar-expand.active .main-header { padding-left: var(--fy-content-gap); }
  body.sidebar-expand:not(.active) .mobile-toggle { display: none; }
  body.sidebar-expand.active .mobile-toggle { display: grid; }
}
body.sidebar-expand .main-header {
  height: 75px;
  min-height: 75px;
  top: 0;
  padding-top: 11px;
  padding-bottom: 11px;
  padding-right: 15px;
  box-shadow: 0 1px 0 rgba(10, 43, 70, .055);
}
body.sidebar-expand .main-content {
  width: 100%;
  max-width: none;
  margin-top: 75px;
  padding: 13px var(--fy-content-gap) 20px;
}
body.sidebar-expand .main-title {
  font-size: 22px;
  font-weight: 600;
}
body.sidebar-expand .fy-hero {
  padding: 20px 23px;
  margin-bottom: 15px;
  border-radius: 14px;
}
body.sidebar-expand .fy-hero h1 { font-size: 23px; }
body.sidebar-expand .fy-stat { padding: 18px 17px; }
body.sidebar-expand .fy-main-card { padding: 20px; }
body.sidebar-expand .fy-footer { padding: 10px 16px 16px; }
body.sidebar-expand .main-content .row.g-4 {
  --bs-gutter-x: 16px;
  --bs-gutter-y: 16px;
}

/* 5. Tablet e mobile: menu a scomparsa, contenuto edge-to-edge */
@media (max-width: 991px) {
  body.sidebar-expand .sidebar {
    width: min(280px, calc(100vw - 44px));
    left: 0;
    top: 0;
    height: 100dvh;
    border-radius: 0 15px 15px 0;
    transform: translateX(-120%);
  }
  body.sidebar-expand.active .sidebar { transform: translateX(0); }
  body.sidebar-expand .sidebar .simlebar-sc { height: calc(100dvh - 108px); }
  body.sidebar-expand .sidebar-logo { height: 100px; }
  body.sidebar-expand .sidebar-logo img { height: 100px !important; width: 100px !important; }
  body.sidebar-expand .main,
  body.sidebar-expand.active .main { padding-left: 0; }
  body.sidebar-expand .main-header,
  body.sidebar-expand.active .main-header {
    position: fixed;
    padding-left: 12px !important;
    padding-right: 12px !important;
    height: 68px;
    min-height: 68px;
  }
  body.sidebar-expand .mobile-toggle { display: grid; }
  body.sidebar-expand .main-content { margin-top: 68px; padding: 12px 12px 18px; }
  body.sidebar-expand .main-title { font-size: 18px; }
  body.sidebar-expand .overlay { position: fixed; inset: 0; height: 100dvh; width: 100%; background: rgba(6,30,55,.4); backdrop-filter: blur(2px); }
}
@media (max-width: 575px) {
  body.sidebar-expand .main-content { padding: 9px; }
  body.sidebar-expand .fy-hero { padding: 15px; }
  body.sidebar-expand .fy-main-card { padding: 16px; }
  body.sidebar-expand .fy-stat { padding: 15px; }
}
