/* ========================================= */
/* BASE & GLOBALS (Stili Core dell'Applicazione) */
/* ========================================= */
body {
  font-family: var(--font);
  background-color: var(--bg-body);
  color: var(--dark-slate);
  margin: 0;
  padding-bottom: var(--footer-height);
  padding-top: 0; /* Header è inglobato nella Home, padding solo per il contenuto */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* --- DESKTOP MAX WIDTH & CENTERING --- */
/* Applicato a Hero e Main Content per centrare e limitare la larghezza */
@media (min-width: 992px) {
  .home-max-width {
    max-width: 1200px; /* MODIFICATO: Larghezza più generosa per dashboard */
    margin: 0 auto; /* Centra il contenuto */
  }
}

/* --- GLOBAL COMPONENTS --- */

/* Header e Componenti Fixed (Colore e Stile Home) */
.app-header {
  height: var(--header-height);
  background: var(--colore-secondario);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.header-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--surface);
  letter-spacing: -0.5px;
}

[lang="ar"] {
  direction: rtl;
  text-align: right;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: all 0.2s;
  position: relative;
}

.btn-icon:active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--surface);
}

.badge-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: #e63946;
  border: 2px solid var(--primary-brand);
}

/* Footer QR Button (Global) */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1020;
  pointer-events: none;
}

.btn-qr-round {
  pointer-events: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-brand);
  border: 4px solid var(--surface);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 20px rgba(0, 174, 239, 0.4);
  transition: transform 0.2s;
  margin-bottom: 10px;
}

.btn-qr-round:active {
  transform: scale(0.95);
}

.modal-content {
  border-radius: var(--radius-main);
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.btn-cta-main {
  background: var(--primary-brand);
  color: white;
  border: none;
  border-radius: var(--radius-main);
  padding: 14px;
  font-weight: 600;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 174, 239, 0.25);
}

.app-card {
  background: var(--surface);
  border-radius: var(--radius-main);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
}

/* --- MENU OFFCANVAS STYLES (Global Component) --- */
.offcanvas {
  /* border-top-right-radius: var(--radius-main);
  border-bottom-right-radius: var(--radius-main);
  background: var(--surface);
  color: var(--dark-slate);
  width: 85%;
  max-width: 320px;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05); */
}

.profile-area-menu {
  background: var(--primary-light);
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 174, 239, 0.1);
  position: relative;
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}
.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary-deep);
  padding: 2px;
  background-color: var(--primary-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}
.user-info h6 {
  font-weight: 700;
  margin: 0;
  color: var(--dark-slate);
  font-size: 1.05rem;
}
.user-info span {
  font-size: 0.8rem;
  color: var(--primary-deep);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.btn-close-custom {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 8px;
}

.menu-scroll-area {
  overflow-y: auto;
  flex-grow: 1;
  padding: 10px 0;
}
.menu-label {
  padding: 20px 24px 8px 24px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.menu-item {
  padding: 12px 24px;
  color: var(--mid-slate);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.menu-item-content {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.menu-item:hover,
.menu-item.active {
  background: var(--primary-light);
  color: var(--primary-brand);
  border-left-color: var(--primary-brand);
}
.menu-item i {
  width: 24px;
  font-size: 1.2rem;
  margin-right: 12px;
  text-align: center;
  color: #8fa6b6;
  transition: color 0.2s;
}
.menu-item:hover i,
.menu-item.active i {
  color: var(--primary-brand);
}
.menu-item .chevron {
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.submenu {
  background: #fcfcfc;
  display: none;
  padding: 5px 0;
  border-top: 1px solid var(--light-slate);
  border-bottom: 1px solid var(--light-slate);
}
.submenu.show {
  display: block;
}
.submenu-item {
  padding: 10px 24px 10px 64px;
  color: var(--mid-slate);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.submenu-item:hover {
  color: var(--primary-brand);
  background: rgba(0, 0, 0, 0.01);
}
.submenu-item i {
  font-size: 0.7rem;
  color: #adb5bd;
}

.menu-footer {
  padding: 24px;
  border-top: 1px solid var(--light-slate);
  background: #fff;
}
.btn-logout {
  width: 100%;
  padding: 12px;
  border: 1px solid #ffe3e3;
  color: #e03131;
  background: #fff5f5;
  border-radius: var(--radius-main);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

/* Concierge WhatsApp */
.concierge-card {
  background: linear-gradient(135deg, #128c7e, #25d366) !important;
  color: #fff;
  border: none;
  padding: 30px 24px;
  text-align: center;
  margin-top: 30px;
  border-radius: var(--radius-main);
}
.concierge-card .card-title {
  color: #fff;
  justify-content: center;
}
.concierge-card .card-title i {
  color: #fff;
}
.btn-whatsapp {
  background: #fff;
  color: #128c7e;
  border: none;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-main);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  margin-top: 15px;
}
@media (min-width: 992px) {
  .corpo-pagina {
    max-width: 1200px;
    margin: 0 auto;
  }
}
.mt-top-page {
  margin-top: 70px !important;
}
.has-error .control-label {
  color: #dc3545;
  font-weight: bold;
}
#loader-page {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: transparent;
}

#loader-page div {
  color: var(--primary-brand) !important;
}
.alert-info {
  color: white;
}
.btn-custom-primary {
  background: linear-gradient(
    135deg,
    var(--primary-brand),
    var(--primary-deep)
  );
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 25px rgba(0, 174, 239, 0.3);
  transition: transform 0.2s;
  cursor: pointer;
}
.btn-custom-primary:hover {
  color: white;
}
.btn-custom-primary:active {
  transform: scale(0.97);
  box-shadow: 0 4px 15px rgba(0, 174, 239, 0.2);
}
