* {
  font-family: "Poppins";
}

body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  overflow-y: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #dde5f4;
  height: 100vh;
}

.screen-1 {
  background: #f1f7fe;
  padding: 2em;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  box-shadow: 0 0 2em #e6e9f9;
  gap: 2em;
}


.screen-1 .logo img {
  width: 70%;
  display: block;
  margin: 0 auto;
  max-width: 500px;
}

.screen-1 .text-section {
  font-size: 1.5em;
}

.screen-1 .codice-agente {
  background: white;
  box-shadow: 0 0 2em #e6e9f9;
  padding: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  border-radius: 20px;
  color: #4d4d4d;
  margin-top: 0em;
}

.screen-1 .codice-agente input {
  outline: none;
  border: none;
}

.screen-1 .codice-agente input::-moz-placeholder {
  color: black;
  font-size: 0.9em;
}

.screen-1 .codice-agente input:-ms-input-placeholder {
  color: black;
  font-size: 0.9em;
}

.screen-1 .emcodice-agenteail input::placeholder {
  color: black;
  font-size: 0.9em;
}

.screen-1 .codice-agente ion-icon {
  color: #4d4d4d;
  margin-bottom: -0.2em;
}

.screen-1 .buttonClass {
  padding: 1em;
  background: #3e4684;
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 600;
}

.screen-1 .footer {
  display: flex;
  font-size: 0.7em;
  color: #5e5e5e;
  gap: 14em;
  padding-bottom: 10em;
}

.screen-1 .footer span {
  cursor: pointer;
}

.error {
  color: red;
  font-size: 1.0em;
  margin-top: -0.5em;
}

button {
  cursor: pointer;
}

#div_request {
  display: none;
}

* {
  font-family: "Poppins";
}

body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Search Section */
.search-section {
  margin-bottom: 20px;
  text-align: center;
  padding: 20px;
  background-color: #e9ecef;
  border-radius: 5px;
}

.search-section input {
  padding: 10px;
  font-size: 16px;
  width: 200px;
  margin-right: 10px;
}

.search-section button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 3px;
}

.search-section button:hover {
  background-color: #0056b3;
}

/* Report Section */
#report-section {
  display: none;
  /* Hidden by default */
}

.header-table,
.main-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.header-table td,
.header-table th,
.main-table td,
.main-table th {
  border: 1px solid #000;
  padding: 5px;
  text-align: center;
  vertical-align: middle;
}

/* Header Styles */
.header-label {
  font-weight: bold;
  text-align: left;
  background-color: #fff;
}

.value-box {
  font-weight: bold;
  font-size: 1.1em;
}

/* Colors */
.bg-yellow {
  background-color: #FFFF00;
  font-weight: bold;
}

.bg-blue {
  background-color: #B4C6E7;
  font-weight: bold;
}

.bg-green {
  background-color: #C6E0B4;
  font-weight: bold;
}

.bg-pink {
  background-color: #E6B8B7;
  font-weight: bold;
}

.bg-purple {
  background-color: #D5A6BD;
  font-weight: bold;
}

.bg-orange {
  background-color: #FCE4D6;
  font-weight: bold;
}

.bg-grey {
  background-color: #D9D9D9;
  font-weight: bold;
}

.bg-white {
  background-color: #FFFFFF;
}


/* Specific Widths */
.col-promo {
  width: 150px;
}

.col-product {
  width: 200px;
}

.col-value {
  width: 100px;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.bold {
  font-weight: bold;
}

/* Input error state */
.error {
  border: 2px solid red;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  border-top: none;
  max-height: 300px;
  overflow-y: auto;
  width: calc(200px + 20px);
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover {
  background-color: #e9ecef;
}

.autocomplete-item.selected {
  background-color: #007bff;
  color: white;
}

.no-results {
  padding: 10px;
  color: #999;
  text-align: center;
}

/* Visits Container */
.visits-container {
  margin-top: 20px;
  position: relative;
}

.visits-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.visit-item {
  width: 100%;
}

.visit-item table {
  width: auto;
}

/* Loading Overlay */
#loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

#loading-overlay.show {
  display: flex;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #007bff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Hide visit indicators on desktop */
.visit-indicators {
  display: none;
}

/* Responsive Design - Tablet */
@media screen and (max-width: 1024px) {
  .container {
    padding: 15px;
  }

  .col-promo {
    width: 120px;
  }

  .col-product {
    width: 160px;
  }

  .col-value {
    width: 80px;
  }

  .header-table td,
  .header-table th,
  .main-table td,
  .main-table th {
    padding: 4px;
    font-size: 14px;
  }

  .value-box {
    font-size: 1em;
  }
}

/* Responsive Design - Mobile */
@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 10px;
    box-shadow: none;
  }

  .search-section {
    padding: 15px;
  }

  .search-section input {
    width: 150px;
    font-size: 14px;
    margin-right: 5px;
    margin-bottom: 10px;
  }

  .search-section button {
    font-size: 14px;
    padding: 10px 15px;
  }

  .search-section h2 {
    font-size: 1.2em;
    margin: 0 0 15px 0;
  }

  /* Visits swipe carousel on mobile */
  .visits-container {
    overflow: hidden;
    position: relative;
    margin-top: 20px;
  }

  .visits-wrapper {
    display: flex;
    flex-direction: row;
    transition: transform 0.3s ease;
    gap: 0;
  }

  .visit-item {
    min-width: 100%;
    flex-shrink: 0;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .visit-item table {
    width: 100%;
  }

  .visit-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
  }

  .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
  }

  .indicator.active {
    background-color: #007bff;
  }

  /* Remove individual table wrappers on mobile */
  .header-table,
  .main-table {
    width: 100%;
    font-size: 11px;
    margin-bottom: 15px;
  }

  .header-table td,
  .header-table th,
  .main-table td,
  .main-table th {
    padding: 4px 2px;
    font-size: 10px;
  }

  .col-promo {
    width: auto;
    font-size: 9px;
    padding: 2px;
  }

  .col-product {
    width: auto;
    font-size: 9px;
  }

  .col-value {
    width: auto;
    font-size: 9px;
  }

  .col-value div {
    font-size: 8px;
    padding: 1px;
  }

  .value-box {
    font-size: 0.85em;
  }

  .bold {
    font-size: 10px;
  }

  .spinner {
    width: 50px;
    height: 50px;
    border-width: 6px;
  }
}

/* Responsive Design - Small Mobile */
@media screen and (max-width: 480px) {
  .search-section input {
    width: 120px;
    display: block;
    margin: 0 auto 10px;
  }

  .search-section button {
    display: block;
    margin: 0 auto;
    width: 120px;
  }

  .header-table,
  .main-table {
    font-size: 9px;
  }

  .header-table td,
  .header-table th,
  .main-table td,
  .main-table th {
    padding: 3px 1px;
    font-size: 8px;
  }

  .col-value div {
    font-size: 7px;
  }
}