/* Fidelity App - public assets stylesheet */
body{font:16px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial}

/* === Brand overrides for login === */
:root{
  --brand-primary: #2e7d32;
  --brand-primary-contrast: #ffffff;
  --login-bg-1: #f5f9f6;
  --login-bg-2: #eef6f0;
  --bs-primary: var(--brand-primary);
}
.login-hero{
  background: linear-gradient(180deg, var(--login-bg-1), var(--login-bg-2));
  border-radius: 0.75rem;
}
.card-brand{ border: 2px solid rgba(46,125,50,.2); }
.btn .spinner-border{ vertical-align: text-bottom; }

/* --- Mobile cards per discounts.php --- */
.offer-card, .code-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: .75rem;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.offer-card .title, .code-card .title{ font-weight:600; }
.offer-meta, .code-meta{ font-size:.92rem; color: var(--cuv-muted); }
.badge-discount{ font-size:.85rem; }
.barcode-thumb{ max-width: 100%; height: auto; }

/* rimuove righe pesanti nelle tabelle utente e consente a testi lunghi di andare a capo */
.user-table.table > :not(caption) > * > *{
  white-space: normal;
}

/* --- Mobile cards: contenitore con righe alternate --- */
.mobile-cards .offer-card:nth-child(even),
.mobile-cards .code-card:nth-child(even){
  background: #eeeeee!important;
}

/* bottone icona barcode (mobile) */
.barcode-icon-btn{
  border: none;
  background: transparent;
  padding: .25rem;
  line-height: 1;
}
.barcode-icon{
  width: 28px;
  height: 28px;
  opacity: .85;
}
.barcode-icon-btn:hover .barcode-icon,
.barcode-icon-btn:active .barcode-icon{
  opacity: 1;
}

/* Schede risultato ricerca clienti */
.cust-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: .5rem;
  padding: .6rem .75rem;
  margin-bottom: .5rem;
  background: #fff;
}
.cust-card:nth-child(even){ background: var(--cuv-cream-2); }
.cust-card .title{ font-weight: 600; }
.cust-card .meta{ font-size: .9rem; color: var(--cuv-muted); }

.mobile-bottom-nav{ display:none; }

@media (max-width: 992px){
  /* attivo solo se il <body> ha la classe has-bottom-nav */
  body.has-bottom-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .navbar-toggler { display: none !important; }

  .mobile-bottom-nav{
    position: fixed; 
    left:0;
    right:0;
    bottom:0;
    z-index:1030;
    display:flex;
    justify-content:space-around;
    align-items:center;
    height:5%;
    min-height:65px;
    padding-bottom: env(safe-area-inset-bottom);
    background:#fff;
    border-top:1px solid rgba(0,0,0,.1);
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  }
  .mobile-bottom-nav a{
    display:flex; flex-direction:column; align-items:center; gap:4px;
    text-decoration:none; color:#6c757d; font-size:12px;
  }
  .mobile-bottom-nav a.active{ color:#0d6efd; }
  .mobile-bottom-nav svg{ width:22px; height:22px; }
}

@media (max-width: 360px){
  .mobile-bottom-nav a { font-size: 11px; }
}

