:root {
  --mainColor: #292C2F;
  --redMain: #ED1C24;
  --white: #DDDDDD;
}

.switch {
  position: relative;
  width: 240px;
  /* più largo */
  height: 50px;
  background: var(--mainColor);
  border-radius: 40px;
  display: flex;
  align-items: center;
  padding: 4px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  font-family: sans-serif;
}

.switch-option {
  flex: 1;
  text-align: center;
  font-weight: 600;
  z-index: 2;
  /* sopra il background scorrevole */
  color: var(--white);
  transition: color .25s;
  line-height: 42px;
}

.switch-bg {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--redMain);
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  transition: transform .25s ease;
  z-index: 1;
  /* sotto le scritte */
}

.switch[data-mode="aziende"] .switch-bg {
  transform: translateX(100%);
}

.switch[data-mode="privati"] .switch-option[data-val="privati"],
.switch[data-mode="aziende"] .switch-option[data-val="aziende"] {
  color: var(--mainColor);
}

.inputMain {
  background-color: var(--mainColor) !important;
  color: var(--white) !important;
  border: none !important;
}

body {
  perspective: 1200px;
}

body {
  perspective: 1200px;
}

@keyframes pageFlipY {
  from {
    opacity: 0;
    transform: rotateY(-90deg);
    transform-origin: left center;
  }

  to {
    opacity: 1;
    transform: rotateY(0deg);
    transform-origin: left center;
  }
}

/* login entra da destra */
.page-login .card {
  animation: pageFlipY .8s cubic-bezier(.25, .8, .25, 1);
}

/* register entra da sinistra */
.page-register .card {
  animation: pageFlipY .8s cubic-bezier(.25, .8, .25, 1);
  transform-origin: right center;
}

.btn .general-btn {
  background: linear-gradient(to right, #292C2F, #ED1C24);
  color: #DDDDDD;
}

.general-input {
  font-weight: bold !important;
  background: linear-gradient(to right, #292C2F, #ED1C24);
  color: #DDDDDD !important;

}

.general-input option {
  font-weight: bold !important;
  background: #292C2F;
  color: #DDDDDD !important;

}

.general-input::placeholder {
  color: #DDDDDD;
  font-weight: bold;
}




.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  margin-left: 8px;

}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.d-none {
  display: none;
}


.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.record-card {
  background-color: #292C2F;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #292C2F;

}

.order {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ED1C24;
}

.date {
  font-size: 0.9rem;
  font-weight: 600;
  color: #DDDDDD;
}

.record-card h3 {
  margin: 0;
  font-size: 1rem;
  color: #DDDDDD;
}

.meta {
  display: flex;
  gap: 6px;
  font-size: 0.85rem;
}

.label {
  color: #777;
}

.behavior {
  font-size: 0.9rem;
  line-height: 1.4;
}


/* PAGINAZIONE */
.pagination {
  margin: 24px 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.pagination button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

.pagination button.active {
  background: #222;
  color: #fff;
}


.record-card.selectable {
  cursor: pointer;
  transition: background 0.15s ease, border 0.15s ease;
}

.record-card.selectable:hover {
  border-color: #999;
}

.record-card.selectable.selected {
  border: 2px solid #ED1C24;
  
}

#modalReport .modal-dialog {
  max-width: 95vw;
  height: 90vh;
}

#modalReport .modal-content {
  height: 100%;
}

#modalReport .modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 120px);
  /* header + footer */
}


.card {
  background: linear-gradient(to right, #292C2F, #ED1C24);
  border: none;
}

.user-name {
  color: #DDDDDD;
  font-weight: 700;
}

.user-mail {
  color: #DDDDDD;
  font-size: 0.9rem;
}

.user-link {
  color: #DDDDDD;
  font-weight: 600;
  text-decoration: none;
}

.user-link:hover {
  text-decoration: underline;
  color: #DDDDDD;
}

.regLogin input::placeholder{
  color: #DDDDDD;
  font-weight: bold;
}