:root{
  --sidebar:#102135;
  --sidebar-2:#071524;
  --accent:#0d6efd;
  --accent-2:#22c55e;
  --surface:#ffffff;
  --surface-soft:#f5f8fc;
  --border:#dce5ef;
  --muted:#6b7a90;
  --text:#152033;
  --shadow:0 16px 40px rgba(15,35,60,.08);
}
*{box-sizing:border-box}
body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--text);background:var(--surface-soft)}
.auth-body{min-height:100vh;background:radial-gradient(circle at 18% 12%,#223b57 0,#15283d 42%,#071524 100%)}
.auth-shell{min-height:100vh;display:grid;place-items:center;padding:1.5rem;position:relative}
.auth-alerts{position:fixed;top:1rem;left:50%;transform:translateX(-50%);width:min(960px,calc(100% - 2rem));z-index:10}
.login-card{width:min(440px,100%);background:#fff;border:1px solid rgba(255,255,255,.6);border-radius:1rem;box-shadow:0 28px 80px rgba(3,12,23,.38);padding:2rem}
.login-logo{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:#edf4ff;color:#0d6efd;margin:0 auto 1rem;font-size:1.6rem;font-weight:800}
.login-card h1{font-size:1.45rem;font-weight:750;text-align:center;margin:0 0 .35rem}
.login-card .subtitle{text-align:center;color:#536176;margin-bottom:1.5rem}
.login-footer{text-align:center;color:#7b8798;font-size:.82rem;margin-top:1.6rem}
.setup-panel{width:min(1240px,100%);align-self:start;margin-top:2vh;background:#fff;border-radius:.9rem;box-shadow:0 26px 70px rgba(3,12,23,.26);overflow:hidden;border:1px solid rgba(255,255,255,.62)}
.setup-header{padding:1.35rem 1.65rem;border-bottom:1px solid var(--border)}
.setup-header h1{font-size:1.35rem;font-weight:750;margin:0}.setup-header p{margin:.35rem 0 0;color:var(--muted)}
.stepper{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;padding:1.2rem 1.65rem;border-bottom:1px solid var(--border)}
.stepper-item{display:flex;align-items:center;gap:.6rem;color:#8a99ac;font-weight:650;font-size:.9rem;position:relative}.stepper-item:not(:last-child)::after{content:"";position:absolute;left:calc(100% - .25rem);right:-.75rem;top:50%;height:1px;background:#cdd8e6}.stepper-num{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#a7b2c2;color:#fff;z-index:1}.stepper-item.active{color:#0d6efd}.stepper-item.active .stepper-num,.stepper-item.done .stepper-num{background:#0d6efd}
.setup-step{display:none;padding:1.65rem}.setup-step.active{display:block}.setup-actions{padding:1rem 1.65rem;background:#fbfdff;border-top:1px solid var(--border);display:flex;justify-content:space-between;gap:1rem}
.app-shell{display:grid;grid-template-columns:248px 1fr;min-height:100vh}.sidebar{background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));color:#dbe7f5;padding:1rem .8rem;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;box-shadow:10px 0 30px rgba(8,20,35,.12);z-index:1000}.brand{display:flex;align-items:center;gap:.75rem;color:#fff;text-decoration:none;padding:.55rem .6rem;margin-bottom:1.1rem}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#fff;color:#102135;font-weight:900}.brand small{display:block;font-size:.72rem;color:#bed0e5;margin-top:-.1rem}.side-nav{display:grid;gap:.35rem}.side-link{display:flex;align-items:center;gap:.7rem;color:#dbe7f5;text-decoration:none;border-radius:.55rem;padding:.68rem .75rem;border:0;background:transparent;text-align:left;width:100%;font-weight:600;font-size:.93rem}.side-link span{width:24px;height:24px;display:grid;place-items:center;font-size:.83rem;border-radius:7px;color:#dbe7f5}.side-link:hover{background:rgba(255,255,255,.08);color:#fff}.side-link.active{background:#0d6efd;color:#fff;box-shadow:0 10px 22px rgba(13,110,253,.25)}.side-link.active span{background:rgba(255,255,255,.16)}.sidebar-logout{margin-top:auto}.logout-link{color:#cbd7e7}.workspace{min-width:0}.topbar{height:72px;background:rgba(255,255,255,.9);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 1.55rem;position:sticky;top:0;z-index:900}.eyebrow{font-size:.73rem;text-transform:uppercase;letter-spacing:.08em;color:#7b8798;font-weight:700}.page-title{font-size:1.35rem;font-weight:750;margin:0}.topbar-user{display:flex;align-items:center;gap:.5rem;background:#f7faff;border:1px solid var(--border);border-radius:999px;padding:.45rem .75rem;color:#47566b;font-size:.9rem}.status-dot{width:.5rem;height:.5rem;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.12)}.content-wrap{padding:1.5rem}.shadow-soft{box-shadow:var(--shadow)}.card,.panel{border:1px solid var(--border);border-radius:.8rem;box-shadow:var(--shadow);background:#fff}.card-header{background:#fff;border-bottom:1px solid var(--border);font-weight:700;padding:1rem 1.1rem}.card-body{padding:1.1rem}.page-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.page-head h2{font-size:1.35rem;font-weight:750;margin:0}.page-head p{color:var(--muted);margin:.15rem 0 0}.stat-card{border:0;border-radius:.75rem;color:#fff;min-height:112px;overflow:hidden;position:relative}.stat-card::after{content:"";position:absolute;right:-38px;top:-35px;width:120px;height:120px;border-radius:50%;background:rgba(255,255,255,.16)}.stat-card .card-body{position:relative;z-index:1}.stat-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.18);font-weight:800;margin-bottom:.65rem}.stat-title{font-size:1.05rem;font-weight:750;margin:0}.stat-sub{font-size:.86rem;opacity:.92;margin:0}.bg-nginx{background:linear-gradient(135deg,#0d6efd,#0951c7)}.bg-samba{background:linear-gradient(135deg,#22c55e,#169447)}.bg-php{background:linear-gradient(135deg,#805ad5,#5b3ab6)}.bg-timeshift{background:linear-gradient(135deg,#f59e0b,#e67800)}.metric-circle{--value:0; width:94px;height:94px;border-radius:50%;background:conic-gradient(#22c55e calc(var(--value)*1%),#edf2f7 0);display:grid;place-items:center;margin:auto}.metric-circle::before{content:"";width:70px;height:70px;background:#fff;border-radius:50%;position:absolute}.metric-circle span{position:relative;font-weight:800}.table{--bs-table-bg:transparent}.table thead th{font-size:.76rem;text-transform:uppercase;letter-spacing:.04em;color:#68778c;border-bottom:1px solid var(--border);background:#fbfdff}.table td{vertical-align:middle}.badge-soft-success{color:#16833c;background:#dcfce7}.badge-soft-danger{color:#b42318;background:#fee4e2}.badge-soft-info{color:#075985;background:#e0f2fe}.badge-soft-muted{color:#526175;background:#edf2f7}.action-btn{width:32px;height:32px;display:inline-grid;place-items:center;border-radius:.45rem}.info-strip{background:#eaf5ff;border:1px solid #cbe5ff;color:#185b94;border-radius:.65rem;padding:.9rem 1rem}.warning-strip{background:#fff8e6;border:1px solid #f6df9a;color:#7a4d00;border-radius:.65rem;padding:.9rem 1rem}.code-editor{min-height:520px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;font-size:.9rem;background:#fbfdff}.output{max-height:520px;overflow:auto;background:#0d1726;color:#e5eefb;padding:1rem;border-radius:.65rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;font-size:.86rem}.mini-log{font-size:.85rem}.mini-log div{padding:.28rem 0;border-bottom:1px dashed #e3eaf2}.mini-log div:last-child{border-bottom:0}.tabs-clean .nav-link{border:0;border-bottom:2px solid transparent;color:#5d6b80;font-weight:700}.tabs-clean .nav-link.active{color:#0d6efd;border-color:#0d6efd;background:transparent}.form-control,.form-select{border-color:#d7e1ec;border-radius:.55rem}.form-control:focus,.form-select:focus{box-shadow:0 0 0 .2rem rgba(13,110,253,.12)}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem 0;border-bottom:1px solid #edf2f7}.switch-row:last-child{border-bottom:0}.empty-state{padding:2rem;text-align:center;color:var(--muted)}
@media (max-width:991.98px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;left:-270px;transition:left .2s ease;width:248px}.sidebar.open{left:0}.topbar{padding:.8rem 1rem}.content-wrap{padding:1rem}.stepper{grid-template-columns:1fr;gap:.5rem}.stepper-item::after{display:none}.setup-panel{margin-top:0}.page-head{align-items:flex-start;flex-direction:column}.login-card{padding:1.5rem}}
@media (max-width:575.98px){.topbar-user{display:none}.setup-step{padding:1rem}.setup-actions{padding:1rem}.content-wrap{padding:.8rem}.stat-card{min-height:auto}}

/* Hotfix 2026-07-01: select/menu visibili e utility Bootstrap mancanti nel fallback locale.
   Alcuni ambienti GTK/Firefox possono ereditare colori scuri nel menu nativo dei <select>,
   rendendo le opzioni bianche su fondo bianco. Forziamo schema chiaro e colori espliciti. */
html, body, .app-shell, .workspace, .content-wrap {
  color-scheme: light;
}
select.form-select,
.form-select,
.form-control {
  color: var(--text, #152033) !important;
  background-color: #fff !important;
}
select.form-select option,
select.form-select optgroup,
.form-select option,
.form-select optgroup {
  color: #152033 !important;
  background-color: #ffffff !important;
}
select.form-select option:checked,
.form-select option:checked {
  color: #ffffff !important;
  background-color: #0d6efd !important;
}
select.form-select:disabled,
.form-select:disabled {
  color: #6b7a90 !important;
  background-color: #eef3f8 !important;
}

/* Utility essenziali usate dai template quando viene caricato il fallback Bootstrap minimale. */
.d-none{display:none!important}
.d-block{display:block!important}
.d-grid{display:grid!important}
.d-inline-block{display:inline-block!important}
.col-12{flex:0 0 auto;width:100%}
.pb-0{padding-bottom:0!important}
.mb-4{margin-bottom:1.5rem!important}
.ms-1{margin-left:.25rem!important}
.ms-2{margin-left:.5rem!important}
.w-auto{width:auto!important}
.border{border:1px solid var(--border,#dce5ef)!important}
.rounded-4{border-radius:.8rem!important}
.bg-light-subtle{background:#fbfdff!important}
.form-text{margin-top:.25rem;font-size:.875em;color:#6b7a90}
.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}
.nav-item{display:block}
.nav-link{border:0;background:transparent;cursor:pointer}
.tab-content>.tab-pane{display:none}
.tab-content>.active{display:block}
.fade{transition:opacity .15s linear}.fade:not(.show){opacity:0}

@media(min-width:768px){
  .col-md-1{flex:0 0 auto;width:8.33333333%}
  .col-md-2{flex:0 0 auto;width:16.66666667%}
  .col-md-3{flex:0 0 auto;width:25%}
  .col-md-4{flex:0 0 auto;width:33.33333333%}
  .col-md-5{flex:0 0 auto;width:41.66666667%}
  .col-md-6{flex:0 0 auto;width:50%}
  .col-md-7{flex:0 0 auto;width:58.33333333%}
  .col-md-8{flex:0 0 auto;width:66.66666667%}
  .col-md-9{flex:0 0 auto;width:75%}
  .col-md-10{flex:0 0 auto;width:83.33333333%}
  .col-md-11{flex:0 0 auto;width:91.66666667%}
  .col-md-12{flex:0 0 auto;width:100%}
}

/* Hotfix 2026-07-01b: select nativi sempre leggibili anche con tema desktop scuro.
   Forziamo anche -webkit-text-fill-color e proprietà globali perché alcuni browser Linux
   ignorano parte dello stile su <option> nel popup nativo. */
:root,
html,
body {
  color-scheme: light !important;
}
select,
select.form-select,
.form-select,
select option,
select optgroup,
.form-select option,
.form-select optgroup {
  color: #152033 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: #152033 !important;
  text-shadow: none !important;
}
select:focus,
select.form-select:focus,
.form-select:focus {
  color: #152033 !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: #152033 !important;
}
select option:hover,
select option:focus,
.form-select option:hover,
.form-select option:focus {
  color: #ffffff !important;
  background-color: #0d6efd !important;
  -webkit-text-fill-color: #ffffff !important;
}
select option:checked,
select.form-select option:checked,
.form-select option:checked {
  color: #ffffff !important;
  background: #0d6efd !important;
  background-color: #0d6efd !important;
  -webkit-text-fill-color: #ffffff !important;
}
@media (prefers-color-scheme: dark) {
  select,
  select.form-select,
  .form-select,
  select option,
  select optgroup,
  .form-select option,
  .form-select optgroup {
    color: #152033 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #152033 !important;
  }
}
.badge-soft-warning{color:#92400e;background:#fef3c7}

/* Dark Mode WebUI */
[data-bs-theme="dark"]{
  --surface:#101826;
  --surface-soft:#0b1220;
  --border:#26364d;
  --muted:#9aa8ba;
  --text:#e6edf7;
  --shadow:0 16px 40px rgba(0,0,0,.26);
  color-scheme:dark !important;
}
[data-bs-theme="dark"] body{background:var(--surface-soft)!important;color:var(--text)!important}
[data-bs-theme="dark"] .topbar{background:rgba(16,24,38,.92);border-color:var(--border)}
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .panel,
[data-bs-theme="dark"] .setup-panel,
[data-bs-theme="dark"] .login-card{background:#111c2e;border-color:var(--border);color:var(--text)}
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .setup-header,
[data-bs-theme="dark"] .setup-actions{background:#101a2b;border-color:var(--border);color:var(--text)}
[data-bs-theme="dark"] .table thead th{background:#0e1728;color:#aab7c9;border-color:var(--border)}
[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th{color:var(--text);border-color:var(--border)}
[data-bs-theme="dark"] .topbar-user,
[data-bs-theme="dark"] .btn-light,
[data-bs-theme="dark"] .bg-light-subtle{background:#111c2e!important;border-color:var(--border)!important;color:#dce7f7!important}
[data-bs-theme="dark"] .page-head p,
[data-bs-theme="dark"] .login-card .subtitle,
[data-bs-theme="dark"] .form-text,
[data-bs-theme="dark"] .text-muted{color:#9aa8ba!important}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] textarea.form-control{
  background:#0b1220!important;color:#e6edf7!important;border-color:#33445d!important;-webkit-text-fill-color:#e6edf7!important;
}
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] select option,
[data-bs-theme="dark"] .form-select option{
  background:#ffffff!important;color:#152033!important;-webkit-text-fill-color:#152033!important;
}
[data-bs-theme="dark"] code{color:#ff5ea8}
[data-bs-theme="dark"] .info-strip{background:#0d2a45;border-color:#154b78;color:#b8dcff}
[data-bs-theme="dark"] .warning-strip{background:#32250b;border-color:#80611b;color:#ffe0a6}
[data-bs-theme="dark"] .metric-circle::before{background:#111c2e}
[data-bs-theme="dark"] .mini-log div{border-color:#26364d}
[data-bs-theme="dark"] .tabs-clean .nav-link{color:#aab7c9}
[data-bs-theme="dark"] .tabs-clean .nav-link.active{color:#7db3ff;border-color:#7db3ff}
.twofa-card{width:min(520px,100%)}


.twofa-qr-box{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border:1px solid var(--border);border-radius:1rem;padding:1rem;box-shadow:0 10px 30px rgba(11,25,43,.08)}
.twofa-qr-img{width:min(240px,80vw);height:auto;display:block;background:#fff;border-radius:.75rem;padding:.5rem}
[data-bs-theme="dark"] .twofa-qr-box{background:#fff;color:#152033;border-color:#33445d}
[data-bs-theme="dark"] .twofa-qr-box .text-muted{color:#536176!important}



/* Editor mode: indica visualmente i controlli operativi bloccati lato server. */
body[data-user-role="editor"] form:not(.sidebar-logout):not([action$="logout"]) button[type="submit"]{opacity:.65}

/* Hotfix 2026-07-01c: le card riepilogo Mail usano lo stesso schema colorato della dashboard.
   Fallback per eventuali template legacy con .stat-card senza .card-body. */
.stat-card > span,
.stat-card > strong,
.stat-card > small {
  position: relative;
  z-index: 1;
  display: block;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}
.stat-card > span {
  padding-top: 1rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .92;
}
.stat-card > strong {
  font-size: 1.55rem;
  line-height: 1.2;
  margin-top: .2rem;
}
.stat-card > small {
  padding-bottom: 1rem;
  color: rgba(255,255,255,.92);
}
.card.stat-card,
.card.stat-card .card-body,
.card.stat-card .stat-title,
.card.stat-card .stat-sub,
.card.stat-card strong {
  color: #fff !important;
}

/* Utility aggiuntive fallback Bootstrap */
.h-100{height:100%!important}
@media(min-width:576px){.col-sm-6{flex:0 0 auto;width:50%}}
@media(min-width:1200px){.col-xl-3{flex:0 0 auto;width:25%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-7{flex:0 0 auto;width:58.33333333%}}

/* Hotfix 2026-07-01e: icone locali stile Font Awesome al posto di simboli/testi. */
.side-link .side-icon{width:24px;height:24px;display:grid;place-items:center;font-size:.96rem;border-radius:7px;color:#dbe7f5}
.brand-mark .fa-solid{font-size:1rem}
.stat-icon .fa-solid{font-size:1.35rem}
.icon-btn{display:inline-grid;place-items:center;min-width:2.25rem}
.action-btn .fa-solid{font-size:.88rem}
.btn .fa-solid{vertical-align:-.1em}
.input-group .btn .fa-solid{pointer-events:none}


/* Hotfix 2026-07-01f: nuovo layout login e 2FA in stile split-screen. */
.auth-shell{padding:0!important}
.auth-login-screen{display:grid;grid-template-columns:minmax(320px,1.15fr) minmax(360px,.85fr);width:100%;min-height:100vh}
.auth-login-screen .auth-hero{position:relative;overflow:hidden;background:radial-gradient(circle at 18% 18%,#0e3f72 0,#07294a 30%,#041e37 58%,#031225 100%);color:#fff;display:flex;align-items:center;justify-content:center;padding:3rem 4rem}
.auth-hero-inner{position:relative;z-index:3;max-width:560px;width:100%}
.auth-hero-kicker{font-size:1rem;line-height:1.2;color:rgba(255,255,255,.88);margin-bottom:1rem}
.auth-hero-title{font-size:4.8rem;line-height:.95;font-weight:850;letter-spacing:-.04em;margin:0 0 1rem;text-shadow:0 10px 40px rgba(0,0,0,.22)}
.auth-hero-brand{display:flex;align-items:center;gap:.75rem;color:#8fd2ff;font-weight:700}
.auth-hero-badge{width:54px;height:54px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#5d73ff,#24b2ff);color:#fff;box-shadow:0 10px 26px rgba(36,178,255,.28);font-size:1.45rem}
.auth-hero-brandtext{font-size:1.18rem;letter-spacing:.01em}
.auth-hero-pattern,.auth-hero-circle,.auth-hero-dots{position:absolute;opacity:.95;pointer-events:none}
.auth-pattern-a{inset:auto 26% 16% auto;width:38%;height:34%;background:linear-gradient(180deg,rgba(5,35,66,.2),rgba(5,35,66,.7));border:1px solid rgba(73,145,212,.18)}
.auth-pattern-b{inset:0 0 auto auto;width:34%;height:38%;background:linear-gradient(180deg,rgba(11,61,112,.92),rgba(8,37,67,.84));border-left:1px solid rgba(86,155,219,.2)}
.auth-circle-a{left:-7%;bottom:-18%;width:44%;height:44%;border-radius:50%;border:54px solid rgba(12,87,160,.18)}
.auth-circle-b{right:-8%;top:10%;width:18%;height:18%;border-radius:50%;background:rgba(23,122,214,.25)}
.auth-dots-a{right:14%;top:42%;width:172px;height:172px;background-image:radial-gradient(circle,rgba(35,138,230,.55) 0 11px,transparent 12px);background-size:57px 57px}
.auth-dots-b{right:6%;top:0;width:92px;height:240px;background-image:radial-gradient(circle,rgba(35,138,230,.45) 0 7px,transparent 8px);background-size:46px 52px}
.auth-login-screen .auth-panel{background:#f4f6fb;display:flex;align-items:center;justify-content:center;padding:2.5rem}
.auth-panel-card{position:relative;width:min(100%,460px);background:#fff;border-radius:1.15rem;box-shadow:0 18px 50px rgba(13,32,51,.12);padding:3rem 2rem 2rem;border:1px solid rgba(219,230,242,.95)}
.auth-panel-card-wide{width:min(100%,620px)}
.auth-panel-logo{position:absolute;left:50%;top:0;transform:translate(-50%,-46%);width:86px;height:86px;border-radius:18px;background:linear-gradient(135deg,#f8fbff,#eef4fb);display:grid;place-items:center;color:#0d6efd;box-shadow:0 10px 28px rgba(13,32,51,.14);font-size:2rem;border:1px solid #e1e9f3}
.auth-panel-title{text-align:center;font-size:2rem;font-weight:800;color:#1c2431;margin:0 0 .45rem}
.auth-panel-subtitle{text-align:center;color:#6d7786;margin:0 0 1.55rem}
.auth-form .form-label{font-weight:600;color:#2d3541}
.auth-form .form-control.form-control-lg{height:52px;border-radius:.85rem;border-color:#d7e1ec;box-shadow:none}
.auth-form .form-control.form-control-lg:focus{border-color:#8bbcff;box-shadow:0 0 0 .2rem rgba(13,110,253,.12)}
.password-field-wrap{position:relative}.password-field-wrap .form-control{padding-right:3rem}.password-toggle-btn{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#6c7788;padding:.25rem}.password-toggle-btn:hover{color:#1b4f9a}.auth-submit{border-radius:.8rem;background:#0d4864;border-color:#0d4864;font-weight:700;padding:.85rem 1rem}.auth-submit:hover,.auth-submit:focus{background:#0b3f58;border-color:#0b3f58}.auth-panel-version{position:absolute;right:1rem;bottom:.85rem;color:#b1b8c4;font-size:.82rem}.auth-panel-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:1rem}.auth-panel-footer a{text-decoration:none;color:#0d6efd}.auth-panel-footer .auth-panel-version{position:static}
.twofa-enroll-grid{display:grid;grid-template-columns:minmax(200px,240px) minmax(0,1fr);gap:1rem;align-items:start;margin-bottom:1rem}.twofa-enroll-grid .twofa-qr-box{margin-bottom:.5rem}
.auth-login-screen .twofa-qr-box{background:#fff;border:1px solid #dbe6f0;box-shadow:none}

@media (max-width: 991.98px){
  .auth-login-screen{grid-template-columns:1fr}
  .auth-login-screen .auth-hero{min-height:300px;padding:2.5rem 2rem}
  .auth-hero-title{font-size:3.35rem}
  .auth-login-screen .auth-panel{padding:2rem 1rem}
}
@media (max-width: 767.98px){
  .auth-login-screen .auth-hero{display:none}
  .auth-panel-card,.auth-panel-card-wide{width:min(100%,560px);padding:2.75rem 1.2rem 1.4rem}
  .auth-panel-title{font-size:1.6rem}
  .twofa-enroll-grid{grid-template-columns:1fr}
  .auth-panel-footer{flex-direction:column;align-items:flex-start}
}

[data-bs-theme="dark"] .auth-login-screen .auth-panel{background:#0d1522}
[data-bs-theme="dark"] .auth-panel-card{background:#111c2e;border-color:#26364d}
[data-bs-theme="dark"] .auth-panel-title{color:#e6edf7}
[data-bs-theme="dark"] .auth-panel-subtitle,[data-bs-theme="dark"] .auth-form .form-label{color:#c2cedd}
[data-bs-theme="dark"] .auth-form .form-control.form-control-lg{background:#0b1220!important;color:#e6edf7!important;border-color:#33445d!important}
[data-bs-theme="dark"] .password-toggle-btn{color:#aab7c9}
[data-bs-theme="dark"] .auth-panel-logo{background:linear-gradient(135deg,#132338,#0f1e31);border-color:#30415b;color:#7db3ff}

/* Fail2ban/menu hotfix: sidebar scrollabile quando le voci aumentano. */
.sidebar{overflow-y:auto;}
.side-nav{overflow-y:auto;min-height:0;padding-bottom:.75rem;}
.sidebar-logout{margin-top:.75rem;}
@media (min-width: 992px){.sidebar{max-height:100vh;}}

/* Suricata */
.bg-suricata{background:linear-gradient(135deg,#14b8a6,#0f766e)}
[data-bs-theme="dark"] .bg-suricata{background:linear-gradient(135deg,#0f766e,#115e59)}
