/* ========== RESET ========== */

@font-face {
    font-family: 'Rosalia Regular';
    font-style: normal;
    font-weight: normal;
    src: url('Rosalia-9Y5VZ.woff') format('woff');}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.header-center h3 span{font-family: 'Rosalia Regular';font-size:24px;}
.header-left h3 sub{font-family: 'Poppins', sans-serif;font-size:12px;}

body {
  font-family: 'Poppins', sans-serif;
  background: #52549B;
background: linear-gradient(23deg, rgba(82, 84, 155, 1) 0%, rgba(219, 164, 193, 0.99) 41%, rgba(194, 159, 191, 1) 56%, rgba(71, 137, 183, 1) 100%);
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  padding-top: 60px;  /* spazio per header fisso */
  padding-bottom: 60px; /* spazio per footer fisso */
  height: 100vh;
  display:flex;
  flex-direction: column;
}

.submit-btn:disabled {
  background-color: #ccc;     
  color: #666;                
  cursor: not-allowed;        
  border: 1px solid #aaa;     
  opacity: 0.7;               
}

/*video{max-width:250px;max-height:250px;}*/

/* ========== CONTAINER ========== */
.container {
  max-width: 1040px;
  margin: auto;
  padding: 20px;
  min-width:900px;
  overflow-y:scroll;
}

.csv:hover{color:white !important;}

.filtri{display: flex;flex-direction: row;width: 45%;}
.filtri .btn-primary{padding:5px !important;font-size:14px;}

/* ========== MOBILE ========== */
@media(max-width:990px){
  .container {
    max-width: 98%;
    margin: auto;
    padding: 20px;
    min-width:96%;
  }
  .filtri{width:100% !important;}
  body{
    height: max-content;
  }
  .help{padding:60px 0 80px 0;}
  
  .receipt-card{
      align-content: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  .actions{width: 100%;}
  
 .table-responsive {
  width: 100%;
  overflow-x: auto;       /* abilita lo scroll orizzontale */
  -webkit-overflow-scrolling: touch; /* scroll fluido su iOS */
}

.table-responsive table {
  min-width: 850px; /* o più largo se ti serve */
}
}


/* ========== CARD ========== */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #6fc5d1;
  font-family: Rosalia Regular;
  letter-spacing: 1px;
}

/* ========== BUTTONS ========== */
.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 15px;
  margin: 10px 0;
  border-radius: 10px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: 0.2s;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-primary{
  background: transparent;
  color: #fff;
  border: 2px solid white !important;
  display: block;
  width: 100%;
  text-align: center;
  padding: 15px;
  margin: 10px 0;
  border-radius: 10px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: 0.2s;
  border: none;
  cursor: pointer;
  text-transform: uppercase;}

.btn-primary:hover{background: #4789b7;border:2px solid  #4789b7 !important;}
.form{color:white;}
.btn:hover {
  background: #8ba7c4;
}

.btn.secondary {
  background: #6c757d;
  color: #fff;
}

.btn.secondary:hover {
  background: #555;
}

.btn.ok {
  background: #8dd668;
  color: #111;
}

.btn.ok:hover {
  background: #8fb779;
}

.btn.no {
  background: #c97474;
  color: #fff;
}

.btn.no:hover {
  background: #a86666;
}

.btn-small {
  padding: 8px 12px;
  font-size: 14px;
  display: inline-block;
  width: auto;
}

/* ========== FORMS ========== */
form {
  margin: 15px 0;
}

label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 10px;
}

/* Uploader scontrino */
.file-uploader {
  margin: 8px 0 16px;
}
.input-file {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.file-label {
  display: inline-flex; align-items: center; gap: 10px;
  background: #1f6feb; color: #fff; font-weight: 600;
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: transform .05s ease, box-shadow .2s;
}
.file-label i { font-size: 16px; }
.file-label:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.file-label:active { transform: translateY(1px); }

.file-meta {
  display: inline-block; margin-left: 12px; color: #444;
  font-size: .95rem; vertical-align: middle;
}
.file-meta .placeholder { color: #888; }

.file-preview {
  margin-top: 10px; display: none;
}
.file-preview img {
  display: block; max-width: 260px; max-height: 180px;
  width: auto; height: auto; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  border: 1px solid #eee;
}

input:focus,
select:focus {
  border-color: #8ba7c4;
  outline: none;
}

/* ========== TABLES ========== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

table th, table td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

table th {
  background: #4789b7;
  color: #fff;
}

table tr:hover {
  background: #f1f1f1;
}

/* ========== MESSAGES ========== */
.success {
  background: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 8px;
  margin: 10px 0;
}

.error {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 8px;
  margin: 10px 0;
}

.warning {
  background: #fff3cd;
  color: #856404;
  padding: 12px;
  border-radius: 8px;
  margin: 10px 0;
}

/* ========== QR SCANNER ========== */
#qr-reader {
  margin: 20px auto;
  /*border: 2px solid #007bff;*/
  border-radius: 12px;
  overflow: hidden;
}

.result-box {
  margin-top: 15px;
  font-size: 18px;
  text-align: center;
  font-weight: bold;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  header, footer {
    font-size: 14px;
  }

  .btn {
    font-size: 16px;
    padding: 12px;
  }

  table th, table td {
    font-size: 14px;
    padding: 8px;
  }
}
/* ========== IMMAGINI SCONTRINI ========== */
.receipt-img {
  max-width: 80px;   /* larghezza massima */
  max-height: 100px;  /* altezza massima */
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  margin: 5px 0;
  display: block;
}

.receipt-card {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  background: #fff;
  padding: 15px;
  margin: 10px 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.receipt-img {
  max-width: 120px;
  border-radius: 8px;
  cursor: pointer;
}

.receipt-info {
  flex: 1;
}

.receipt-info h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.receipt-info p {
  margin: 3px 0;
  font-size: 14px;
  color: #444;
}

.status {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.status.pending { background: #ffc107; color: #000; }
.status.ok { background: #28a745; color: #fff; }
.status.rejected { background: #dc3545; color: #fff; }

.actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.actions .btn {
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
}

#form-questionario{padding-left:20px;padding-right:20px;}
.quest .container{
    height: 100%;
    overflow-y: scroll;}

.btn.success { background: #28a745; color: white; }
.btn.danger { background: #dc3545; color: white; }

/* Footer stile app */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #111;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  z-index: 1000;
}

footer a {
  flex: 1;
  text-align: center;
  color: #aaa;
  text-decoration: none;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

footer a i {
  font-size: 20px;
  margin-bottom: 2px;
}

footer a:hover,
footer a.active {
  color: #fff;
}

/* HEADER con logo e menu */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #4789b7;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  z-index: 1000;
}

header .logo {
  height: 40px;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  border-radius: 8px;
  overflow: hidden;
}

.dropdown-content a {
  color: #111;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
  text-align: left;
}

.dropdown-content a:hover {
  background: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* HEADER 2 (per login e register) */
.header-simple {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #A9C9EB;
  color: #111;
  text-align: center;
  padding: 15px 0;
  z-index: 1000;
}

.header-simple .logo {
  height: 40px;
}

/* FOOTER 2 (per login e register) */
.footer-simple {
  position: fixed;
  bottom: 53px;
  left: 0;
  width: 100%;
  background: #111;
  color: #fff;
  text-align: center;
  font-size: 14px;
  padding: 12px 0;
  z-index: 1000;
  flex-direction:column;
}

.badge{
  display:inline-block; margin-left:8px; padding:2px 8px;
  border-radius:999px; background:#eee; color:#333;
  font-weight:700; font-size:.85rem;
}
