html {
  font-size: 87.5%;
}

* {
  font-family: "Mona Sans", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > .container-fluid {
  flex: 1;
}

:root {
  --app-background: #f6f8fb;
  --app-surface: #ffffff;
  --app-border: #e5eaf0;
  --app-radius: 0.75rem;
  --app-shadow: 0 0.35rem 1.25rem rgba(28, 39, 54, 0.07);
}

body {
  background-color: var(--app-background);
  color: #1f2937;
}

a,
a:hover,
a:focus,
a:active {
  text-decoration: none;
}

header .navbar {
  background-color: var(--app-surface) !important;
  border-color: var(--app-border) !important;
}

.btn {
  border-radius: 0.625rem;
  font-weight: 700;
}

.form-control,
.form-select {
  border-color: #d7dee8;
  border-radius: 0.625rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.65);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.12);
}

.modal-content {
  border: 1px solid var(--app-border);
  border-radius: 1rem;
  box-shadow: var(--app-shadow);
}

.modal-header {
  border-bottom-color: var(--app-border);
}

.dropdown-menu {
  border-color: var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  padding: 0.4rem;
}

.dropdown-item {
  border-radius: 0.45rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--app-background);
}

body.request-dashboard {
  margin-bottom: 100px;
}

/** Logo **/
header .logo {
  width: 120px;
  max-width: 100%;
}

.boxed-logo {
  width: 180px;
  max-width: 100%;
}
/** END Logo **/

/** Header **/
.status-filter-nav .nav-status-link {
  font-size: 0.9rem;
}

.status-counter-popover-wrapper {
  margin-top: 1rem !important;
  --bs-popover-max-width: 400px;
  width: 400px;
  max-width: calc(100vw - 1rem);
}

.status-counter-popover-wrapper .popover-body {
  min-width: 0;
}

.status-counter-popover-wrapper .popover-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.status-counter-list .nav-status-link {
  padding: 0.25rem 0;
}

.status-counter-list .status-text {
  min-height: 2rem;
}

.status-counter-badge {
  flex: 0 0 auto;
}

.status-counter-label {
  flex: 1 1 auto;
  min-width: 0;
}

.status-counter-amount {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.status-counter-footer .nav-link {
  padding-left: 0;
  padding-right: 0;
}
/** END Header **/

.signin-page .form-container,
.forgot-password-page .form-container,
.signup-page .form-container,
.change-password-page .form-container {
  width: 420px;
  max-width: 100%;
  padding: 32px;
  border: 1px solid var(--app-border);
  border-radius: 1rem;
  background-color: var(--app-surface);
  box-shadow: var(--app-shadow) !important;
}

.signin-page,
.forgot-password-page,
.signup-page,
.change-password-page {
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.forget-password-link {
  font-size: 0.9em;
}

.customer-profile-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
}

.customer-profile-card {
  width: 920px;
  max-width: 100%;
  border: 0;
  border-radius: 1rem;
  box-shadow: var(--app-shadow) !important;
}

.modal-content,
.modal-body {
  overflow: visible !important;
}

/* Notes */
.edit-note-btn {
  font-size: 0.8rem;
}

.wrapper-note {
  padding: 5px 10px;
  border-radius: 2px;
  border: 1px solid #bfbfbf;
  margin-bottom: 5px;
  font-size: 0.9em;
}

.wrapper-note:nth-child(odd) {
  background: #fffefe;
  margin-left: 10px;
}

.wrapper-note:nth-child(even) {
  background: #f3f0f0;
  margin-right: 10px;
}

.wrapper-note .note-details {
  display: block;
  font-size: 0.8rem;
  border-top: 1px solid #b0b0b0;
  margin-top: 5px;
  padding-top: 2px;
}

.delete-note-dropdown {
  width: 200px;
}
/* END Notes */

/** Datatable **/
.dashboard-page {
  padding-top: 0.25rem;
  padding-bottom: 2rem;
}

.dashboard-toolbar {
  padding: 0.5rem 0;
}

.dashboard-title {
  color: #243447;
  font-weight: 700;
}

.table-shell {
  overflow: visible;
  padding: 0.65rem 0;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background-color: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.table-shell .dataTables_wrapper {
  padding: 0.35rem 0;
}

.table-shell .dataTables_wrapper > :not(.dt-row) {
  padding: 0 1rem;
}

.table-shell .table {
  margin-bottom: 0;
  --bs-table-border-color: var(--app-border);
}

.table-shell .table > thead > tr:first-child > th,
.table-shell .table > thead label {
  color: #526174;
  background-color: #f8fafc;
  border-top-width: 1px;
  border-bottom-width: 1px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-shell .table > tbody > tr > td {
  font-size: 0.9rem;
  line-height: 1.3;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.table-shell .client-name {
  font-size: 0.9rem;
}

.table-shell .client-company {
  font-size: 0.82rem;
}

.table-shell .client-request-type {
  font-size: 0.78rem;
}

.table-shell .table-hover > tbody > tr:hover > * {
  --bs-table-hover-bg: #f7faff;
}

.table-shell .filters th {
  background-color: var(--app-surface);
  letter-spacing: normal;
  text-transform: none;
}

.table-shell .filters .form-control,
.table-shell .filters .form-select {
  min-width: 5rem;
  font-size: 0.8rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #d7dee8;
  border-radius: 0.5rem;
}

.dataTables_wrapper .dataTables_info {
  color: var(--bs-secondary-color);
}

.table-shell #all-request-table .filters th {
  background-color: var(--app-surface);
}

#all-request-table th {
  vertical-align: top;
  background: white;
}

#all-request-table thead {
  position: sticky;
  z-index: 12;
  top: 0;
  box-shadow: 0 80px 40px -80px rgba(0, 0, 0, 0.2);
}

.request-message-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: pre-line;
}

.request-message-full {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.client-cell {
  min-width: 180px;
  line-height: 1.35;
}

.client-cell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.client-cell-header + .client-section {
  margin-top: 0.65rem;
}

.client-cell-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.25rem;
}

.client-cell-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.client-identity {
  flex: 1 1 auto;
  min-width: 0;
}

.client-company,
.client-name {
  overflow-wrap: anywhere;
}

.client-section + .client-section {
  margin-top: 0.65rem;
}

.client-company {
  font-size: 0.9rem;
  font-weight: 700;
}

.client-name {
  font-size: 1rem;
}

.client-request-type {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.85rem;
}

.client-request-type-avatar {
  display: inline-flex;
  flex: 0 0 1.35rem;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  min-height: 1.35rem;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.client-request-type-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-associations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.client-association-card {
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-tertiary-bg);
}

.client-association-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  color: var(--bs-secondary-color);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.client-association-edit-btn {
  display: inline-flex;
  flex: 0 0 1.5rem;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  font-size: 0.75rem;
}

.client-association-card .client-request-type {
  font-size: 0.8rem;
}

.client-association-card .client-meta {
  margin-top: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-association-empty {
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
  font-style: italic;
}

.client-meta + .client-meta {
  margin-top: 0.2rem;
}

.client-meta {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.client-meta span {
  color: var(--bs-secondary-color);
}

table.fixedHeader-floating {
  margin-top: 0 !important;
}

thead .filters select {
  padding: 4px;
}
/** END Datatable **/

/** Add manual request btn **/
.add-request-btn-wrapper {
  z-index: 5;
}

.add-request-btn-wrapper i:before {
  font-size: 3.5rem;
  background: #fff;
  border-radius: 99px;
}

.dropdown-menu-success {
  background: rgb(25, 135, 84);
}

.dropdown-menu-success button {
  color: #ffffff;
}

.dropdown-menu-success button:hover {
  background: rgb(29, 153, 95);
  color: #ffffff;
}
/** END Add manual request btn **/

/** Form **/
form .h5 {
  font-size: 1.1rem;
  margin-bottom: 0;
}

.form-control:read-only {
  background-color: var(--bs-form-control-disabled-bg);
}

.form-check-wrapper {
  display: flex;
  flex-wrap: wrap;
}

.form-check-wrapper .form-check {
  flex: 1 0 46%;
}
/** END Form **/

/** Stats **/
.canvas-wrapper {
  max-height: 400px;
}

.chart-row .canvas-wrapper {
  min-height: 260px;
  padding: 1rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background-color: var(--app-surface);
  box-shadow: var(--app-shadow);
}

#map {
  height: 400px;
}
/** END Stats **/

/** WhatsApp **/
.whatsapp-link {
  text-decoration: none;
  color: #075e54;
}

.whatsapp-link:hover,
.whatsapp-link:active {
  text-decoration: none;
  color: #128c7e;
}
/** END WhatsApp **/

/** Email link **/
.email-link {
  text-decoration: none;
  color: #0049b4;
}

.email-link:hover,
.email-link:active {
  text-decoration: none;
  color: #0d6efd;
}
/** END Email link **/

/** Label giorni di ritardo **/
.request-delay-days {
  padding: 2px 8px;
  display: block;
  margin-top: 0.5em;
  font-size: 0.9em;
  line-height: normal;
}
.request-delay-days.low {
  border-left: 3px solid #28a745;
  color: #28a745;
  background: #f7fff9;
}

.request-delay-days.med {
  border-left: 3px solid #efb813;
  color: #c7a02b;
  background: #fffdf6;
}

.request-delay-days.high {
  border-left: 3px solid #dc3545;
  color: #dc3545;
  background: #fff6f6;
}
/** END Label giorni di ritardo **/

/** Files **/
.files-list-group .filetype-icon {
  font-size: 1.5rem;
}
/** END Files **/

.hidden {
  visibility: hidden;
  position: absolute;
}

/** Search user module **/
#searchModule {
  position: relative;
  z-index: 1;
}

#searchLive {
  margin-top: 0.5rem;
  padding: 0;
  list-style: none;
  z-index: 1;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background-color: #ffffff;
  max-height: 300px;
  box-shadow: 0 0.5rem 1rem rgba(var(--bs-body-color-rgb), 0.15);
}

#searchLive li {
  padding: 0.5rem 1rem;
  cursor: pointer;
}

#searchLive li.no-results {
  background-color: #ffffff !important;
  cursor: default;
}

#searchLive li:hover {
  background-color: var(--bs-tertiary-bg);
}

#inputSearchUser:disabled,
.readonly {
  background-color: var(--bs-tertiary-bg) !important;
}

.form-select {
  padding-left: 0.675rem;
}
/** END Search user module **/

/** Tmp price module **/
.tmp-price-fields input::-webkit-outer-spin-button,
.tmp-price-fields input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tmp-price-fields input[type="number"] {
  -moz-appearance: textfield;
}

.tmp-price-fields input {
  border-right: none !important;
}

.tmp-price-fields input:read-only {
  background-color: var(--bs-tertiary-bg) !important;
}

.tmp-price-fields .input-group-text {
  padding: 0.975rem 0.75rem 0rem 0.75rem;
  background-color: transparent;
  color: rgba(0, 0, 0, 0.65);
}

.tmp-price-fields .input-group-text.readonly {
  background-color: var(--bs-tertiary-bg) !important;
}
/** END Tmp price module **/

/** Request economic data **/
.request-economic-summary-card,
.request-economic-component,
.request-economic-total-card {
  background-color: var(--bs-body-bg);
}

.request-economic-summary-card {
  border-color: var(--bs-border-color) !important;
}

.request-economic-component {
  border-color: var(--bs-border-color) !important;
}

.request-economic-component .input-group-text {
  background-color: var(--bs-tertiary-bg);
}

.request-economic-total-card-primary {
  color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.08);
  border-color: rgba(var(--bs-primary-rgb), 0.35) !important;
}

.request-value-popover {
  min-width: 245px;
}

#request-economic-data-modal .modal-content {
  overflow: hidden !important;
}

#request-economic-data-modal .modal-body {
  overflow-y: auto !important;
}

@media (max-width: 575.98px) {
  .request-economic-module .request-economic-data-btn {
    width: 100%;
  }

  #request-economic-data-modal .modal-dialog {
    margin: 0;
    min-height: 100%;
  }

  #request-economic-data-modal .modal-content {
    min-height: 100vh;
    border-radius: 0;
  }
}
/** END Request economic data **/

/* .dt-row {
   overflow-x: scroll;
} */

.status-filter-trigger {
  cursor: pointer;
}

/* Storico stati richiesta */
#show-request-status-history-modal .modal-body .alert {
  position: relative;
  margin-bottom: 6px !important;
  background-color: rgb(246, 246, 246);
  border-color: rgb(180, 180, 180);
}

#show-request-status-history-modal .modal-body .alert:not(:last-child):after {
  content: "";
  position: absolute;
  display: block;
  left: 0;
  right: 0;
  bottom: -9px;
  margin: 0 auto;
  width: 20px;
  height: 20px;
  background-color: rgb(246, 246, 246);
  border: 1px solid rgb(180, 180, 180);
  transform: rotate(45deg);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  z-index: 1;
}

#show-request-status-history-modal .modal-body .alert .status-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 0.2rem;
  margin-bottom: 0.5rem;
}
/* END Storico stati richiesta */

@media (max-width: 575.98px) {
  .dashboard-toolbar > .btn {
    width: 100%;
  }

  .table-shell {
    padding: 0.35rem;
    border-radius: 0.625rem;
  }

  .add-request-btn-wrapper {
    margin-right: 1rem !important;
    margin-bottom: 1rem !important;
  }
}
