/* Reset padding e margin su Bootstrap */
:root {
  --bs-primary: #183a72  !important; /* Reemplazá con tu color personalizado */
}

.btn-outline-primary {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--bs-primary);
  --bs-btn-hover-border-color: var(--bs-primary);
  --bs-btn-hover-color: #fff;
}

.btn-outline-primary.btn-check:checked + .btn,
.btn-outline-primary.active,
.btn-outline-primary.show,
.btn-outline-primary:first-child:active,
.btn-outline-primary:not(.btn-check) + .btn:active {
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--bs-primary);
  --bs-btn-active-border-color: var(--bs-primary);

  color: #fff;
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.menu-aside-wrapper .btn-group-vertical .btn-primary {
  --bs-btn-bg: var(--bs-primary) !important;
  --bs-btn-color: var(--bs-primary) !important;
  --bs-btn-border-color: var(--bs-primary) !important;
  --bs-btn-hover-bg: var(--bs-primary) !important;
  --bs-btn-hover-border-color: var(--bs-primary) !important;
  --bs-btn-hover-color: #fff;
}

.menu-aside-wrapper .btn-group-vertical .btn.btn-primary.collapsed,
.menu-aside-wrapper .btn-group-vertical a.btn.btn-primary {
  background-color: var(--bs-primary) !important;
}

.btn-primary {
  --bs-btn-color: var(--bs-primary) !important;
  --bs-btn-border-color: var(--bs-primary) !important;
  color: #fff !important;
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.alert-info {
  background-color: #eaf7ff !important;
  border: none !important;
}



/* vista */
.vista_new .row,
.vista_new .container,
.vista_new .container-fluid,
.vista_new [class*="col-"] {
  padding: 0;
  margin: 0;
}


/* Sidebar */
.content-azienda .menu-azienda {
  color: #fff;
  border-radius: 8px;
}

.content-azienda .menu-azienda .card-header {
  background: transparent;
  color: #fff;
  font-weight: bold;
}

.content-azienda .menu-azienda .nav-link,
.content-azienda .menu-azienda .btn {
  color: #fff;
  transition: background 0.2s, color 0.2s;
}

.content-azienda .menu-azienda .nav-link.active,
.content-azienda .menu-azienda .btn.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border-radius: 6px;
}

.content-azienda .vociInterneSchede {
  padding-left: 1.2rem;
}

.content-azienda .vociInterneSchede .smooth-scroll {
  padding-left: 1rem;
}

.content-azienda .menu-azienda .nav-link h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.content-azienda .menu-azienda .nav-link h4 i {
  flex-shrink: 0;
}

.content-azienda .menu-azienda .nav-link h4 span {
  display: inline-block;
  word-break: break-word;
}

.content-azienda .menu-azienda .icon-collapse {
  color: #fff;
}

.content-azienda .icon-svg {
    width: 1.5em;
    height: 1.5em;
}

/* Sidebar inside menu: scrollbar */
.content-azienda .menu-azienda .card-body {
  scrollbar-width: thin;
  scrollbar-color: #fff transparent;
  direction: rtl;
}

.content-azienda .menu-azienda .card-body:hover {
  scrollbar-width: thin;
}

/* Webkit scrollbars */
.content-azienda .menu-azienda .card-body::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}

.content-azienda .menu-azienda .card-body::-webkit-scrollbar-track {
  background: #005CB9;
  border-radius: 4px;
}

.content-azienda .menu-azienda .card-body::-webkit-scrollbar-thumb {
  background-color: #fff;
  border-radius: 4px;
  border: 2px solid #005CB9;
}

.content-azienda .menu-azienda .card-body::-webkit-scrollbar-thumb:hover {
  background-color: #fff;
}

.content-azienda .menu-azienda .card-body > * {
  direction: ltr;
}


/* tabs */
.content-azienda .menu-aside-wrapper .card {
  margin: 0;
  padding: 0;
  border: none;
}

.content-azienda .card-body {
  padding: 1rem;
}

.content-azienda .tab-content .tab-pane {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
}

/* table */
.content-azienda table {
  width: 100%;
  border-collapse: collapse;
}

.content-azienda table th,
.content-azienda table td {
  padding: 0.75rem 1rem;
  text-align: left;
}

.content-azienda table thead {
  background: #e2e8f0;
}

.content-azienda table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.content-azienda table tbody tr:hover {
  background: #edf2f7;
}


/* datatable responsive */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    content: "\f078" !important; /* fa-chevron-down (unicode de FontAwesome) */
    font-family: "FontAwesome" !important;
    font-weight: 900 !important;
    background: none !important;
    color: black !important; 
    border: none !important;
    box-shadow: none !important;
    font-size: 14px;
    line-height: 1;
}


/* Alerts  */
.content-azienda .alert {
  border-radius: 6px;
  font-size: 0.9rem;
}

.content-azienda .alert-warning {
  background: #fff3cd;
  color: #856404;
}

.content-azienda .alert-danger {
  background: #f8d7da;
  color: #721c24;
}


/* toggle */
.content-azienda #menuToggleBtn,
.content-azienda .btnBluPrimario {
  color: #fff;
  border: none;
}

#content-azienda .card-body,
#content-azienda .card-header,
#content-azienda .card-footer {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.content-azienda .smooth-scroll:hover {
  color: #fff !important;
}

/*bottoni menu*/
.content-azienda .menu-aside-wrapper {
  transition: transform 0.3s ease;
}


/* posizione chiuso md-xl menu*/
@media (max-width: 1199.98px) {
  .menu-aside-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: calc(100% - 60px);
    background: white;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
  }

  .menu-aside-wrapper.open {
    transform: translateX(0);
  }
}


/* Grafici*/

.highcharts-figure .chart-container {
    width: 100%;
    height: 200px;
    float: left;
}

.highcharts-container {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
}

.highcharts-figure,
.highcharts-data-table table {
    width: 100%;
    margin: 0 auto;
}

.highcharts-data-table table {
    font-family: Verdana, sans-serif;
    border-collapse: collapse;
    border: 1px solid #ebebeb;
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.highcharts-data-table caption {
    padding: 1em 0;
    font-size: 1.2em;
    color: #555;
}

.highcharts-data-table th {
    font-weight: 600;
    padding: 0.5em;
}

.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
    padding: 0.5em;
}

.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
    background: #f8f8f8;
}

.highcharts-data-table tr:hover {
    background: #f1f7ff;
}

.highcharts-description {
    margin: 0.3rem 10px;
}

@media (max-width: 768px) {
    .highcharts-figure .chart-container {
        aspect-ratio: 1.4 / 1; 
        max-height: 240px !important;
    }
}


/* === GRUPPO DI PULSANTI RESPONSIVE === */

/* COL: xs (<576px) → VERTICALE */
@media (max-width: 575.98px) {
  .vista_new .btn-group-dettaglio> .btn:first-child {
    border-top-left-radius: 0.375rem !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn:last-child {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
  }

  .vista_new .btn-group-dettaglio> .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn-group:not(:first-child),
  .vista_new .btn-group-dettaglio> :not(.btn-check:first-child) + .btn {
    margin-left: 0 !important;
    margin-top: calc(-1 * var(--bs-border-width, 1px));
  }
}

/* ROW: sm (576px – 767.98px) → ORIZZONTALE */
@media (min-width: 576px) and (max-width: 767.98px) {
  .vista_new .btn-group-dettaglio> .btn:first-child {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn:last-child {
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn-group:not(:first-child),
  .vista_new .btn-group-dettaglio> :not(.btn-check:first-child) + .btn {
    margin-left: calc(-1 * var(--bs-border-width, 1px));
    margin-top: 0 !important;
  }
}

/* COL: md (768px – 991.98px) → VERTICALE */
@media (min-width: 768px) and (max-width: 991.98px) {
  .vista_new .btn-group-dettaglio> .btn:first-child {
    border-top-left-radius: 0.375rem !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn:last-child {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
  }

  .vista_new .btn-group-dettaglio> .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn-group:not(:first-child),
  .vista_new .btn-group-dettaglio> :not(.btn-check:first-child) + .btn {
    margin-left: 0 !important;
    margin-top: calc(-1 * var(--bs-border-width, 1px));
  }
}

/* ROW: lg+ (≥992px) → ORIZZONTALE */
@media (min-width: 992px) {
  .vista_new .btn-group-dettaglio> .btn:first-child {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn:last-child {
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio> .btn-group:not(:first-child),
  .vista_new .btn-group-dettaglio> :not(.btn-check:first-child) + .btn {
    margin-left: calc(-1 * var(--bs-border-width, 1px));
    margin-top: 0 !important;
  }
}

/* COL: xs (<576px) → VERTICALE */
@media (max-width: 575.98px) {
  .vista_new .btn-group-dettaglio-sm> .btn:first-child {
    border-top-left-radius: 0.375rem !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio-sm> .btn:last-child {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
  }

  .vista_new .btn-group-dettaglio-sm> .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
  }

  .vista_new .btn-group-dettaglio-sm> .btn-group:not(:first-child),
  .vista_new .btn-group-dettaglio-sm> :not(.btn-check:first-child) + .btn {
    margin-left: 0 !important;
    margin-top: calc(-1 * var(--bs-border-width, 1px));
  }
}