.login-page-bg {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 15%, rgba(3, 169, 244, 0.18), transparent 36%),
    radial-gradient(circle at 90% 85%, rgba(76, 175, 80, 0.15), transparent 34%),
    #0f172a;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 700;
}

.navbar-profile-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.profile-page-avatar {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border: 2px solid var(--bs-border-color-translucent);
}

.profile-page-avatar-fallback {
  width: 112px;
  height: 112px;
  font-size: 2rem;
}

.table td,
.table th {
  vertical-align: middle;
}

.notifications-dropdown-menu {
  width: min(96vw, 460px);
}

.notifications-dropdown-feed {
  max-height: 360px;
  overflow: auto;
}

.settings-hub-card-action {
  width: 13rem;
  max-width: 100%;
  margin-bottom: 0px !important;
}

.customer-detail-back-link,
.customer-detail-back-link:focus {
  color: #64717C;
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
}

.customer-detail-back-link:hover {
  color: #10923A;
  background-color: transparent;
  border-color: transparent;
}

/* Global primary color override: loaded after Limitless all.min.css. */
:root {
  --link-color: #18AD3B;
  --link-hover-color: #18AD3B;
  --crm-primary: #10923A;
  --crm-primary-hover: #0D7E31;
  --crm-primary-active: #0A6B2A;
  --crm-primary-rgb: 16, 146, 58;
  --crm-action-dropdown: #7CBD7F;
  --crm-action-dropdown-hover: #5FAE63;
}

a {
  color: #18AD3B;
}

a:hover,
a:focus {
  color: #18AD3B;
}

.btn-primary {
  --btn-color: #fff;
  --btn-bg: var(--crm-primary);
  --btn-border-color: var(--crm-primary);
  --btn-hover-color: #fff;
  --btn-hover-bg: var(--crm-primary-hover);
  --btn-hover-border-color: var(--crm-primary-hover);
  --btn-focus-shadow-rgb: var(--crm-primary-rgb);
  --btn-active-color: #fff;
  --btn-active-bg: var(--crm-primary-active);
  --btn-active-border-color: var(--crm-primary-active);
  --btn-disabled-color: #fff;
  --btn-disabled-bg: var(--crm-primary);
  --btn-disabled-border-color: var(--crm-primary);
}

.btn-outline-primary {
  --btn-color: var(--crm-primary);
  --btn-border-color: var(--crm-primary);
  --btn-hover-color: #fff;
  --btn-hover-bg: var(--crm-primary);
  --btn-hover-border-color: var(--crm-primary);
  --btn-focus-shadow-rgb: var(--crm-primary-rgb);
  --btn-active-color: #fff;
  --btn-active-bg: var(--crm-primary-active);
  --btn-active-border-color: var(--crm-primary-active);
  --btn-disabled-color: var(--crm-primary);
}

.bg-primary {
  background-color: rgba(var(--crm-primary-rgb), var(--bg-opacity, 1)) !important;
}

.text-primary,
.link-primary {
  color: var(--crm-primary) !important;
}

.border-primary {
  border-color: var(--crm-primary) !important;
}

.form-check-input:checked {
  background-color: var(--crm-primary);
  border-color: var(--crm-primary);
}

.form-check-input:focus,
.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--crm-primary-rgb), .65);
  box-shadow: 0 0 0 .125rem rgba(var(--crm-primary-rgb), .25);
}

.pagination-flat .page-item.active .page-link,
.pagination-flat .page-link.active {
  background-color: #079A30;
  border-color: #079A30;
  color: #fff;
}

.pagination-flat .page-link:focus {
  box-shadow: 0 0 0 .125rem rgba(7, 154, 48, .25);
}

.table-responsive .dropdown {
  position: static;
}

.dropdown [data-bs-toggle="dropdown"][aria-label^="Azioni"],
.dropdown [data-bs-toggle="dropdown"][aria-label*=" Azioni"],
.dropdown [data-bs-toggle="dropdown"][aria-label*=" azioni"] {
  color: var(--crm-action-dropdown) !important;
}

.dropdown [data-bs-toggle="dropdown"][aria-label^="Azioni"]:hover,
.dropdown [data-bs-toggle="dropdown"][aria-label^="Azioni"]:focus,
.dropdown [data-bs-toggle="dropdown"][aria-label*=" Azioni"]:hover,
.dropdown [data-bs-toggle="dropdown"][aria-label*=" Azioni"]:focus,
.dropdown [data-bs-toggle="dropdown"][aria-label*=" azioni"]:hover,
.dropdown [data-bs-toggle="dropdown"][aria-label*=" azioni"]:focus {
  color: var(--crm-action-dropdown-hover) !important;
}

.dropdown [data-bs-toggle="dropdown"][aria-label^="Azioni"] i,
.dropdown [data-bs-toggle="dropdown"][aria-label*=" Azioni"] i,
.dropdown [data-bs-toggle="dropdown"][aria-label*=" azioni"] i {
  color: inherit;
}

a.customer-list-name-link:hover,
a.customer-list-name-link:focus,
.table a.customer-list-name-link:hover,
.table a.customer-list-name-link:focus {
  color: var(--crm-action-dropdown) !important;
}

.customer-list-address-icon {
  color: #4DB367;
  flex: 0 0 1rem;
  line-height: 1;
  text-align: center;
  font-size: 17px;
}

/*
 * iOS Safari can misplace Bootstrap modals when the app shell uses nested
 * scroll containers. Keep modal layers above the backdrop and avoid centered
 * dialogs being pushed outside the visual viewport on touch devices.
 */
.modal {
  z-index: 2060 !important;
  pointer-events: auto;
}

.modal-backdrop {
  z-index: 2050 !important;
}

.modal-dialog {
  position: relative;
  z-index: 2061;
}

.modal-content {
  pointer-events: auto;
}

.modal .select2-container {
  width: 100% !important;
}

.select2-container--open,
.modal .select2-dropdown {
  z-index: 2070 !important;
}

@media (max-width: 767.98px) {
  .modal {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-dialog {
    width: min(calc(100% - 1.5rem), var(--bs-modal-width, 500px));
    max-width: calc(100% - 1.5rem);
    margin: calc(env(safe-area-inset-top, 0px) + .75rem) auto calc(env(safe-area-inset-bottom, 0px) + .75rem);
  }

  .modal-dialog-centered {
    align-items: flex-start;
    min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem);
    min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem);
  }

  .modal-content {
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem);
  }

  .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Brand shell colors */
:root {
  --sidebar-icon-accent: #09AB38;
}

.navbar-static {
  background-color: #0A252B !important;
}

.sidebar-dark,
.sidebar-dark .sidebar-content {
  background-color: #0A252B !important;
}

.sidebar-main .nav-sidebar > .nav-item > .nav-link > i,
.sidebar-main .nav-sidebar > .nav-item-submenu > .nav-link > i,
.sidebar-main .nav-sidebar .nav-item-header > i {
  color: var(--sidebar-icon-accent);
}

.sidebar-main .nav-sidebar > .nav-item > .nav-link:hover > i,
.sidebar-main .nav-sidebar > .nav-item > .nav-link.active > i,
.sidebar-main .nav-sidebar > .nav-item-submenu > .nav-link:hover > i,
.sidebar-main .nav-sidebar > .nav-item-submenu.nav-item-open > .nav-link > i,
.sidebar-main .nav-sidebar > .nav-item-submenu > .nav-link.active > i {
  color: var(--sidebar-icon-accent);
}

@media (min-width: 992px) {
  .navbar-brand-sidebar-center {
    margin-left: 0;
  }
}

@media (max-width: 767.98px) {
  .notifications-dropdown-menu {
    position: fixed !important;
    inset: calc(env(safe-area-inset-top, 0px) + 4.25rem) .75rem auto .75rem !important;
    width: auto !important;
    min-width: 0;
    max-width: none;
    transform: none !important;
    margin-top: 0 !important;
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.28);
  }

  .notifications-dropdown-feed {
    max-height: min(60vh, 420px);
  }

  .notifications-dropdown-menu .btn,
  .notifications-dropdown-menu .btn-link,
  .notifications-dropdown-menu a {
    white-space: normal;
  }
}

/* Utility classes — shared scroll/panel/layer patterns */

.fixed-scroll-panel {
  height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
}

.scrollable-container {
  max-height: 28rem;
  overflow: auto;
}

.constrained-card {
  width: 100%;
  max-width: 420px;
}

.stats-panel-col {
  min-width: 140px;
  text-align: center;
}

.toast-layer {
  z-index: 1200;
  max-width: 420px;
}

.wiz-col-desc { min-width: 260px; }
.wiz-col-qty { min-width: 110px; }
.wiz-col-price { min-width: 130px; }
.wiz-col-vat { min-width: 190px; }
.wiz-col-fic { min-width: 220px; }
.wiz-col-action { width: 80px; }

.educational-container {
  max-height: var(--edu-max-h, 32rem);
  overflow-y: auto;
}

.dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background-color: var(--dot-color, #ddd);
  border: 2px solid var(--dot-border, #aaa);
}

.login-card {
  min-width: 340px;
  max-width: 420px;
  width: 100%;
}

.brand-logo-sm {
  max-height: 56px;
  width: auto;
  height: 34px !important;
}

.dashboard-chart-sm { height: 200px; }
.dashboard-chart-md { height: 240px; }
.dashboard-chart-lg { height: 320px; }
.dashboard-chart-panel { min-height: 280px; }

.ff-dashboard {
  max-width: 1200px;
  margin: 20px;
}

.ff-dashboard h1 {
  margin-bottom: 20px;
}

.ff-description {
  margin: 4px 0;
  color: #555;
}

.ff-section-header {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
}

.ff-no-overrides { margin: 8px 0 0; }

.ff-badge-neutral {
  background: #e9ecef;
}

.sidebar-module-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: .5rem;
}

.ticket-col-time { width: 86px; }
.ticket-col-user { width: 260px; }
.ticket-col-kind { width: 52px; }

.ticket-table {
  table-layout: fixed;
  width: 100%;
}
