/*
██████╗░██████╗░░█████╗░░░░░░██╗███████╗░█████╗░████████╗  ██████╗░███████╗██╗░░░░░░█████╗░████████╗███████╗██████╗░
██╔══██╗██╔══██╗██╔══██╗░░░░░██║██╔════╝██╔══██╗╚══██╔══╝  ██╔══██╗██╔════╝██║░░░░░██╔══██╗╚══██╔══╝██╔════╝██╔══██╗
██████╔╝██████╔╝██║░░██║░░░░░██║█████╗░░██║░░╚═╝░░░██║░░░  ██████╔╝█████╗░░██║░░░░░███████║░░░██║░░░█████╗░░██║░░██║ 
██╔═══╝░██╔══██╗██║░░██║██╗░░██║██╔══╝░░██║░░██╗░░░██║░░░  ██╔══██╗██╔══╝░░██║░░░░░██╔══██║░░░██║░░░██╔══╝░░██║░░██║
██║░░░░░██║░░██║╚█████╔╝╚█████╔╝███████╗╚█████╔╝░░░██║░░░  ██║░░██║███████╗███████╗██║░░██║░░░██║░░░███████╗██████╔╝
╚═╝░░░░░╚═╝░░╚═╝░╚════╝░░╚════╝░╚══════╝░╚════╝░░░░╚═╝░░░  ╚═╝░░╚═╝╚══════╝╚══════╝╚═╝░░╚═╝░░░╚═╝░░░╚══════╝╚═════╝░
*/

/* 
    to be defined
*/
.loader-roller-block
{
    position: relative;
    margin: 0 auto;
    text-align: center;
}

div.offcanvas
{
    overflow: auto;
}

/*
░█████╗░░█████╗░███╗░░░███╗███╗░░░███╗░█████╗░███╗░░██╗  ██╗░░░░░██╗██████╗░██████╗░░█████╗░██████╗░██╗░░░██╗
██╔══██╗██╔══██╗████╗░████║████╗░████║██╔══██╗████╗░██║  ██║░░░░░██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚██╗░██╔╝
██║░░╚═╝██║░░██║██╔████╔██║██╔████╔██║██║░░██║██╔██╗██║  ██║░░░░░██║██████╦╝██████╔╝███████║██████╔╝░╚████╔╝░
██║░░██╗██║░░██║██║╚██╔╝██║██║╚██╔╝██║██║░░██║██║╚████║  ██║░░░░░██║██╔══██╗██╔══██╗██╔══██║██╔══██╗░░╚██╔╝░░
╚█████╔╝╚█████╔╝██║░╚═╝░██║██║░╚═╝░██║╚█████╔╝██║░╚███║  ███████╗██║██████╦╝██║░░██║██║░░██║██║░░██║░░░██║░░░
░╚════╝░░╚════╝░╚═╝░░░░░╚═╝╚═╝░░░░░╚═╝░╚════╝░╚═╝░░╚══╝  ╚══════╝╚═╝╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░
*/

/*
██╗░░░░░░█████╗░░█████╗░██████╗░██╗███╗░░██╗░██████╗░
██║░░░░░██╔══██╗██╔══██╗██╔══██╗██║████╗░██║██╔════╝░
██║░░░░░██║░░██║███████║██║░░██║██║██╔██╗██║██║░░██╗░
██║░░░░░██║░░██║██╔══██║██║░░██║██║██║╚████║██║░░╚██╗
███████╗╚█████╔╝██║░░██║██████╔╝██║██║░╚███║╚██████╔╝
╚══════╝░╚════╝░╚═╝░░╚═╝╚═════╝░╚═╝╚═╝░░╚══╝░╚═════╝░
*/
.loader-roller {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
  }
  .loader-roller div {
    animation: loader-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    transform-origin: 40px 40px;
  }
  .loader-roller div:after {
    content: " ";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #111111;
    margin: -4px 0 0 -4px;
  }
  .loader-roller div:nth-child(1) {
    animation-delay: -0.036s;
  }
  .loader-roller div:nth-child(1):after {
    top: 63px;
    left: 63px;
  }
  .loader-roller div:nth-child(2) {
    animation-delay: -0.072s;
  }
  .loader-roller div:nth-child(2):after {
    top: 68px;
    left: 56px;
  }
  .loader-roller div:nth-child(3) {
    animation-delay: -0.108s;
  }
  .loader-roller div:nth-child(3):after {
    top: 71px;
    left: 48px;
  }
  .loader-roller div:nth-child(4) {
    animation-delay: -0.144s;
  }
  .loader-roller div:nth-child(4):after {
    top: 72px;
    left: 40px;
  }
  .loader-roller div:nth-child(5) {
    animation-delay: -0.18s;
  }
  .loader-roller div:nth-child(5):after {
    top: 71px;
    left: 32px;
  }
  .loader-roller div:nth-child(6) {
    animation-delay: -0.216s;
  }
  .loader-roller div:nth-child(6):after {
    top: 68px;
    left: 24px;
  }
  .loader-roller div:nth-child(7) {
    animation-delay: -0.252s;
  }
  .loader-roller div:nth-child(7):after {
    top: 63px;
    left: 17px;
  }
  .loader-roller div:nth-child(8) {
    animation-delay: -0.288s;
  }
  .loader-roller div:nth-child(8):after {
    top: 56px;
    left: 12px;
  }
  @keyframes loader-roller {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  
/* pop-ups */

div#ysed_background_canvas
{
  width: 100% !important;
}

div.backofficePopoups {
  border-radius: 20px;
  overflow: hidden;
}

/* forms in pop-ups */
.modal-content form {
  display: contents;
}
.modal-content pre
{
  display: contents;
}

/* tables with smaller fonts */
table.tablemanycolumns th, table.tablemanycolumns td
{
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
}

table.tablemanycolumns .btn
{
  font-size: 13px;
  padding: 4px 8px;
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 3px;
}

/* frameworkless styles */    
/* Fields */
.fv_field
{
    padding: 3px 6px;
    font-size: 13px;
    font-weight: 400;
    background-clip: padding-box;
    border-style: solid;
    border-radius: 4px;
    border-width: 1px;
    border-color: #CCCCCC;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.fv_field_sm
{
    padding: 2px 4px;
    font-size: 10px;
    font-weight: 400;
    background-clip: padding-box;
    border-style: solid;
    border-radius: 4px;
    border-width: 1px;
    border-color: #CCCCCC;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.form-group label
{
  text-transform: none;
  font-size: 15px;
}

table.manyrows
{
  width: 100%
}

table.manyrows td
{
  font-size: .755rem;
  color: rgba(35,28,99,.7);
  font-weight: 500;  
}

.btn-vsm
{
  padding: 2px 4px;
  font-size: 12px;
}

/* DASHBOARD */
.card.card-statistic .card-title-smaller {
  text-transform: none;
  color: #fff;
  letter-spacing: .8px;
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0;
  margin-top: 5px;
}

.stdwhitechart
{
  background: #FFFFFFDD;
  width: 95%;
  margin: 0 auto 20px auto;
  padding: 15px 10px;
  border-radius: 7px;
  border: 1px solid #CCCCCC;
}

.stdwhitechart100
{
  background: #FFFFFFDD;
  width: 100%;
  margin: 0 auto 20px auto;
  padding: 15px 10px;
  border-radius: 7px;
  border: 1px solid #CCCCCC;
}

/* logs */
div.dateRibbon
{
	position: relative;
	background: #FFFFFF;
	border-bottom: 4px solid #CCCCCC;
	height: 135px;
}
div.logEventArea
{
	position: relative;
	width: 100%;
	overflow: auto;
}
div.singleDate
{
	position: relative;
	display: block;
	padding-top: 30px;
	width: 12%;
	height: 122px;
	text-align: center;
	border: 1px solid #FFFFFF;
	background: #EFEFEF;
	margin: 3px;
	float: left;
}
div.previousWeek, div.nextWeek
{
	position: relative;
	display: block;
	padding-top: 40px;
  padding-left: 4px;
  padding-right: 4px;
	height: 118px;
	text-align: center;
	border: 1px solid #EFEFEF;
	margin: 3px;
	font-weight: bold;
  background-color: #DDDDDD;
	color: #FFFFFF;
}
div.previousWeek
{
	float: left;
}
div.nextWeek
{
	float: right;
}

/* editing areas - CK Editor 5 */
div.tox-promotion
{
  display: none !important;
}
span.tox-statusbar__branding
{
  display: none !important;
}

/* menu adjustments */
.sidebar-wrapper .menu .submenu li a
{
  padding: 0.7rem 1.8rem;
}
.sidebar-wrapper .menu .submenu li.activeoption a
{
  font-weight: bold;
  color: #0d6efd;
}

/* message preview styles */
span.message_preview_field_delimiter {
  display: inline-block;
  background: #EEEEEE;
  margin-right: 5px;
  border: 1px solid #CCCCCC;
  padding: 2px 6px;
  margin-bottom: 3px;
  min-width: 75px;
  text-align: right;
}

div.message_preview_body span.message_preview_field_delimiter {
  display: block;
  margin-right: 0px;
  text-align: center;
}

form.setpasswordform .fv_fieldlabel_labelspan
{
  font-size: 0.9rem;
}

/* report cards */
.card h1.card-title
{
  font-size: 4em;
}

div.session-expired
{
  text-align: center;
}

/* password complexity viewer */
div.fv_fieldlabel_password_complexity_viewer
{
	display: block;
	width: 100%;
	height: 12px;
	border: 1px solid #CCCCCC;
	margin-bottom: 10px;
	padding: 2px
}
div.fv_fieldlabel_password_complexity_viewer_progress_bar
{
	display: block;
	width: 0%;
	height: 6px;
	border: 1px solid #CCCCCC;
	margin-bottom: 10px;	
	transition: width 2s, height 4s;
}
div.fv_fieldlabel_description
{
  font-size: 0.8rem;
}

div#auth
{
  padding-top: 20vh;
  background-position: center center;
  background-size: cover;
}

/* ============================================================
   STILE DARK — AUTH PAGE
   Queste regole sovrascrivono Bootstrap e app.css con 
   specificità elevata o !important dove necessario.
   ============================================================ */

:root {
  --bg:         #0D0F0E;
  --surface:    #141714;
  --card:       #1A1D1A;
  --border:     #2A2E2A;
  --border-hi:  #3A3F3A;
  --green:      #4CAF50;
  --green-dim:  #2E7D32;
  --green-glow: rgba(76,175,80,0.18);
  --text:       #E8ECE8;
  --muted:      #7A877A;
  --danger:     #E05252;
  --font:       'DM Sans', sans-serif;
  --mono:       'DM Mono', monospace;
}

/* ── Page shell ────────────────────────────────────────────── */

#auth,
#auth body {
  background: var(--bg) !important;
  font-family: var(--font) !important;
  color: var(--text) !important;
}

/* Override app.css #auth that sets a gray background + wrong padding */
#auth {
  background: var(--bg) !important;
  background-image: none !important;
  min-height: 100vh !important;
  padding-top: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Grid background */
#auth::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* Green glow orb */
#auth::after {
  content: '';
  position: fixed;
  top: -120px;
  left: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(76,175,80,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Card ──────────────────────────────────────────────────── */

/* app.css sets box-shadow and border:none — override both */
#auth .card {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  max-width: 400px !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 36px 36px 32px !important;
  box-shadow:
    0 0 0 1px rgba(76,175,80,0.06),
    0 24px 64px rgba(0,0,0,0.6),
    0 4px 16px rgba(0,0,0,0.4) !important;
  animation: rise 0.45s cubic-bezier(0.22,1,0.36,1) both !important;
  color: var(--text) !important;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card header/branding area ─────────────────────────────── */

#auth .card .header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

#auth .card .logo-mark {
  width: 36px;
  height: 36px;
  background: var(--green) !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #000 !important;
  flex-shrink: 0;
  letter-spacing: -1px;
}

#auth .card .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

#auth .card .logo-text .brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text) !important;
}

#auth .card .logo-text .sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted) !important;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Divider ────────────────────────────────────────────────── */
/* app.css .divider redefines background to #fff — narrow scope to #auth */
#auth .card .divider {
  display: block !important;        /* undo app.css display:block+text-align */
  text-align: unset !important;
  overflow: unset !important;
  margin: 0 0 28px !important;
  height: 1px !important;
  background: var(--border) !important;
}
#auth .card .divider .divider-text { display: none !important; }

/* ── Typography ─────────────────────────────────────────────── */

#auth .card h1,
#auth .card .card-title {
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  color: var(--text) !important;
  margin-bottom: 6px !important;
  text-transform: none !important;
}

#auth .card .subhead,
#auth .card p.subhead {
  font-size: 13px !important;
  color: var(--muted) !important;
  line-height: 1.55 !important;
  margin-bottom: 28px !important;
}

/* ── Form labels ────────────────────────────────────────────── */
/* app.css label inside .form-group: .755rem + uppercase + rgba color */
#auth .card label,
#auth .card .form-group label,
#auth .card .field > label {
  display: block !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  margin-bottom: 7px !important;
  font-family: var(--mono) !important;
}

/* ── Field meta row (label + MFA link) ─────────────────────── */
#auth .card .field-meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 7px !important;
}

#auth .card .mfa-link {
  font-size: 11px !important;
  font-family: var(--mono) !important;
  color: var(--green) !important;
  text-decoration: none !important;
  opacity: 0.8 !important;
  transition: opacity 0.15s !important;
}
#auth .card .mfa-link:hover { opacity: 1 !important; }

/* ── Inputs ─────────────────────────────────────────────────── */

#auth .card .input-wrap {
  position: relative !important;
}

#auth .card .input-wrap svg,
#auth .card .input-wrap i {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--muted) !important;
  pointer-events: none !important;
  font-size: 14px !important;
  height: 1rem !important;
}

/* Bootstrap + app.css both style .form-control; override for auth */
#auth .card input,
#auth .card input.form-control,
#auth .card .form-control {
  width: 100% !important;
  height: 42px !important;
  background: var(--surface) !important;
  background-color: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 7px !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 14px !important;
  padding: 0 12px 0 38px !important;
  outline: none !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
  box-shadow: none !important;
}

#auth .card input::placeholder,
#auth .card .form-control::placeholder {
  color: #4A524A !important;
}

#auth .card input:focus,
#auth .card .form-control:focus {
  background-color: var(--surface) !important;
  border-color: var(--green-dim) !important;
  box-shadow: 0 0 0 3px var(--green-glow) !important;
  color: var(--text) !important;
  outline: none !important;
}

/* ── Submit button ──────────────────────────────────────────── */
/* app.css .btn sets color:#fff — we need color:#000 for the green bg */
#auth .card .btn,
#auth .card button[type="submit"],
#auth .card input[type="submit"] {
  width: 100% !important;
  height: 42px !important;
  margin-top: 8px !important;
  background: var(--green) !important;
  background-color: var(--green) !important;
  color: #000 !important;
  font-family: var(--font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  letter-spacing: 0.01em !important;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s !important;
  box-shadow: none !important;
}

#auth .card .btn:hover,
#auth .card button[type="submit"]:hover {
  background: #5BC75F !important;
  background-color: #5BC75F !important;
  box-shadow: 0 0 20px rgba(76,175,80,0.3) !important;
  color: #000 !important;
}

#auth .card .btn:active,
#auth .card button[type="submit"]:active {
  transform: scale(0.985) !important;
}

/* ── Footer ─────────────────────────────────────────────────── */
#auth .card .footer {
  margin-top: 24px !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--border) !important;
  font-size: 11px !important;
  color: #3D443D !important;
  font-family: var(--mono) !important;
  letter-spacing: 0.04em !important;
  display: flex !important;
  justify-content: space-between !important;
  background: transparent !important;
  padding-bottom: 0 !important;
}

/* ── Status dot ─────────────────────────────────────────────── */
#auth .card .status-dot {
  display: inline-block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: var(--green) !important;
  margin-right: 5px !important;
  vertical-align: middle !important;
  animation: pulse 2.4s ease-in-out infinite !important;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ============================================================
   STILE DARK — DASHBOARD / APP SHELL
   Sovrascrive Bootstrap e app.css per l'intera interfaccia
   applicativa (sidebar, navbar, main content, cards, footer).
   ============================================================ */

/* ── Global body / app shell ───────────────────────────────── */

body,
#app {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
}

/* app.css imposta #main con background:#f7faff */
#main {
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

#main .main-content .page-title h3 {
  color: var(--text) !important;
}

#main .main-content .text-subtitle,
.text-muted {
  color: var(--muted) !important;
}

/* ── Sidebar ───────────────────────────────────────────────── */

#sidebar,
.sidebar-wrapper {
  background-color: var(--card) !important;
  border-right: 1px solid var(--border) !important;
}

.sidebar-wrapper .sidebar-header {
  background-color: var(--card) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Titoli sezione menu */
.sidebar-wrapper .menu .sidebar-title {
  color: var(--muted) !important;
  font-family: var(--mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* Link sidebar */
.sidebar-wrapper .menu .sidebar-item > .sidebar-link,
.sidebar-wrapper .menu .sidebar-item > a.sidebar-link {
  color: var(--muted) !important;
  transition: color 0.15s, background 0.15s !important;
}

.sidebar-wrapper .menu .sidebar-item > .sidebar-link:hover,
.sidebar-wrapper .menu .sidebar-item.active > .sidebar-link {
  color: var(--green) !important;
  background: rgba(76,175,80,0.07) !important;
}

.sidebar-wrapper .menu .sidebar-item > .sidebar-link svg,
.sidebar-wrapper .menu .sidebar-item > .sidebar-link i {
  color: inherit !important;
}

/* Sottomenu */
.sidebar-wrapper .menu .submenu {
  background: var(--surface) !important;
}

.sidebar-wrapper .menu .submenu li a {
  color: var(--muted) !important;
}

.sidebar-wrapper .menu .submenu li a:hover,
.sidebar-wrapper .menu .submenu li.activeoption a {
  color: var(--green) !important;
}

/* Toggler pulsante */
.sidebar-wrapper .sidebar-toggler {
  color: var(--muted) !important;
  background: transparent !important;
  border: none !important;
}

/* ── Navbar top ────────────────────────────────────────────── */

#main .navbar,
.navbar.navbar-header {
  background-color: var(--card) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.navbar .nav-link,
.navbar .navbar-toggler-icon,
.navbar svg {
  color: var(--muted) !important;
  stroke: var(--muted) !important;
}

.navbar .nav-link:hover svg {
  stroke: var(--green) !important;
}

/* Breadcrumb */
.breadcrumb-item,
.breadcrumb-item.active,
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--muted) !important;
}

/* Dropdown menu */
.dropdown-menu {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
}

.dropdown-item {
  color: var(--text) !important;
}

.dropdown-item:hover {
  background-color: rgba(76,175,80,0.1) !important;
  color: var(--green) !important;
}

.dropdown-menu h6 {
  color: var(--muted) !important;
}

/* ── Cards generiche ────────────────────────────────────────── */

/* Override: app.css non imposta bg sulle .card standard;
   Bootstrap usa #fff. Qui lo forziamo dark. */
#main .card {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}

#main .card .card-header {
  background-color: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
}

#main .card .card-body {
  color: var(--text) !important;
}

#main .card .card-body p {
  color: var(--muted) !important;
}

#main .card .alert-heading {
  color: var(--text) !important;
}

/* ── Stat cards colorate (bg-primary/secondary/success/warning) ── */
/* Manteniamo un sapore di colore ma scuriamo lo sfondo */

#main .card.bg-primary {
  background-color: #1a2a4a !important;
  border-color: #1e3a6a !important;
}

#main .card.bg-secondary {
  background-color: #1e2226 !important;
  border-color: #2c3035 !important;
}

#main .card.bg-success {
  background-color: #0f2010 !important;
  border-color: var(--green-dim) !important;
}

#main .card.bg-warning {
  background-color: #2a1f00 !important;
  border-color: #5a4200 !important;
}

/* Testo nelle stat card */
#main .card.bg-primary .card-header,
#main .card.bg-secondary .card-header,
#main .card.bg-success .card-header,
#main .card.bg-warning .card-header {
  background-color: transparent !important;
  border-bottom-color: rgba(255,255,255,0.1) !important;
  color: var(--muted) !important;
  font-family: var(--mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

#main .card.bg-primary h1.card-title,
#main .card.bg-secondary h1.card-title,
#main .card.bg-success h1.card-title {
  color: var(--text) !important;
}

#main .card.bg-warning h1.card-title {
  color: var(--green) !important;
}

/* ── Chart containers ───────────────────────────────────────── */

.stdwhitechart,
.stdwhitechart100 {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}

/* ── Section title ──────────────────────────────────────────── */

section .section-title:after {
  background-color: var(--green) !important;
}

/* ── List group (notifiche dropdown) ────────────────────────── */

.list-group-item {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.list-group-item h6 {
  color: var(--text) !important;
}

.list-group-item p {
  color: var(--muted) !important;
}

/* ── Modal / offcanvas ──────────────────────────────────────── */

.modal-content {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.modal-header {
  border-bottom-color: var(--border) !important;
}

.modal-footer {
  border-top-color: var(--border) !important;
}

/* ── Footer ─────────────────────────────────────────────────── */

footer,
footer .footer {
  background-color: var(--card) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--muted) !important;
}

footer p {
  color: var(--muted) !important;
}

/* ── Scrollbar (perfect-scrollbar) ─────────────────────────── */

.ps__rail-x,
.ps__rail-y {
  background-color: transparent !important;
}

.ps__thumb-x,
.ps__thumb-y {
  background-color: var(--border-hi) !important;
}

/* ── Utility text overrides ─────────────────────────────────── */

.text-white {
  color: var(--text) !important;
}

/* Tabulator (se presente nelle view interne) */
.tabulator {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.tabulator .tabulator-header {
  background-color: var(--surface) !important;
  border-bottom-color: var(--border) !important;
  color: var(--muted) !important;
}

.tabulator .tabulator-row {
  background-color: var(--card) !important;
  border-bottom-color: var(--border) !important;
  color: var(--text) !important;
}

.tabulator .tabulator-row:hover {
  background-color: rgba(76,175,80,0.06) !important;
}

/* ── Tabelle Bootstrap ──────────────────────────────────────── */

#main .table,
.modal-content .table {
  color: var(--text) !important;
  border-color: var(--border) !important;
}

#main .table thead th,
.modal-content .table thead th {
  background-color: var(--surface) !important;
  color: var(--muted) !important;
  border-color: var(--border) !important;
  font-family: var(--mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  font-weight: 500 !important;
}

#main .table tbody tr,
.modal-content .table tbody tr {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
}

#main .table tbody tr:hover,
.modal-content .table tbody tr:hover {
  background-color: rgba(76,175,80,0.06) !important;
}

#main .table tbody td,
.modal-content .table tbody td {
  background-color: transparent !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  vertical-align: middle !important;
}

#main .table tbody td strong {
  color: var(--text) !important;
}

#main .table tbody td .text-muted,
.modal-content .table tbody td .text-muted {
  color: var(--muted) !important;
}

/* code/prefix chip */
#main .table code,
.modal-content .table code {
  background: var(--surface) !important;
  color: var(--green) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-family: var(--mono) !important;
  font-size: 12px !important;
}

/* table-bordered border */
#main .table-bordered,
#main .table-bordered > :not(caption) > * > *,
.modal-content .table-bordered,
.modal-content .table-bordered > :not(caption) > * > * {
  border-color: var(--border) !important;
}

/* table-responsive wrapper */
#main .table-responsive,
.modal-content .table-responsive {
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

#main .card-text {
  color: var(--muted) !important;
  font-family: var(--mono) !important;
  font-size: 12px !important;
}

/* ── Badge ──────────────────────────────────────────────────── */

.badge.bg-success {
  background-color: var(--green-dim) !important;
  color: #b6f5b8 !important;
  font-family: var(--mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.05em !important;
}

.badge.bg-danger {
  background-color: #5a1010 !important;
  color: #ffb3b3 !important;
}

.badge.bg-warning {
  background-color: #4a3000 !important;
  color: #ffd580 !important;
}

.badge.bg-secondary {
  background-color: var(--surface) !important;
  color: var(--muted) !important;
  border: 1px solid var(--border) !important;
}

.badge.bg-primary {
  background-color: #0d2a4a !important;
  color: #7ab8ff !important;
}

.badge.bg-info {
  background-color: #003d44 !important;
  color: #7ef0f8 !important;
}

/* ── btn-secondary nelle tabelle ───────────────────────────── */

#main .btn-secondary,
.modal-content .btn-secondary {
  background-color: var(--surface) !important;
  border-color: var(--border-hi) !important;
  color: var(--text) !important;
}

#main .btn-secondary:hover,
.modal-content .btn-secondary:hover {
  background-color: var(--border) !important;
  border-color: var(--green-dim) !important;
  color: var(--green) !important;
}

/* ── Alert — tutti i tipi ────────────────────────────────────── */

.alert {
  border: 1px solid !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  box-shadow: none !important;
}

.alert-warning {
  background-color: #1e1400 !important;
  border-color: #5a3e00 !important;
  color: #ffd580 !important;
}

.alert-danger,
.alert-danger.alert-dismissible {
  background-color: #1e0000 !important;
  border-color: #5a1010 !important;
  color: #ffb3b3 !important;
}

.alert-success {
  background-color: #061206 !important;
  border-color: var(--green-dim) !important;
  color: #b6f5b8 !important;
}

.alert-primary {
  background-color: #050f1e !important;
  border-color: #1e3a6a !important;
  color: #7ab8ff !important;
}

.alert-secondary {
  background-color: var(--surface) !important;
  border-color: var(--border-hi) !important;
  color: var(--muted) !important;
}

.alert-info {
  background-color: #001a1e !important;
  border-color: #004d58 !important;
  color: #7ef0f8 !important;
}

.alert-light {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--muted) !important;
}

.alert-dark {
  background-color: #0a0a0a !important;
  border-color: var(--border-hi) !important;
  color: var(--text) !important;
}

/* link e pulsante close dentro gli alert */
.alert a {
  color: inherit !important;
  text-decoration: underline !important;
  opacity: 0.85 !important;
}
.alert a:hover { opacity: 1 !important; }

.alert .btn-close {
  filter: invert(1) !important;
  opacity: 0.5 !important;
}
.alert .btn-close:hover { opacity: 1 !important; }

/* ── bg-light panels (riepilogo token / info box) ───────────── */

.bg-light {
  background-color: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.bg-light small.text-muted,
.bg-light .text-muted {
  color: var(--muted) !important;
}

.bg-light code {
  background: var(--card) !important;
  color: var(--green) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-family: var(--mono) !important;
  font-size: 12px !important;
}

/* link e pulsante close dentro gli alert */
.alert a {
  color: inherit !important;
  text-decoration: underline !important;
  opacity: 0.85 !important;
}
.alert a:hover { opacity: 1 !important; }

.alert .btn-close {
  filter: invert(1) !important;
  opacity: 0.5 !important;
}
.alert .btn-close:hover { opacity: 1 !important; }

/* correzioni aggiuntive */
.divider .divider-text
{
  background:var(--card) !important;
  color: #FFFFFF;
}
.form-group label
{
  color: #FFFFFF;
}
.sidebar-wrapper .menu .sidebar-link>span
{
  color: #FFFFFF;
}
