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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f7f8fb;
  color: #333;
  line-height: 1.6;
}

/* ==================================================
   VARIABLES
================================================== */

:root {
  --primary: #3f52ff;
  --primary-dark: #2f40d4;
  --secondary-bg: #f0f2f7;
  --danger: #c62828;
  --danger-light: #ffe5e5;
  --radius: 16px;
  --space: 20px;
}

/* ==================================================
   CONTAINER
================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-card {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}


/* ==================================================
   BUTTONS
================================================== */

.btn {
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #eef1f5;
  color: #333;
}

.btn-secondary:hover {
  background: #e2e6ea;
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.btn-danger:hover {
  background: #f5c2c2;
}

/* ==================================================
   CARD SYSTEM
================================================== */

.record-card {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-bottom: 40px;
  transition: transform 0.2s ease;
}

.record-card:hover {
  transform: translateY(-3px);
}

.record-header {
  text-align: center;
  font-weight: 600;
  margin-bottom: 25px;
}

/* ==================================================
   RECORD BODY
================================================== */

.record-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 992px) {
  .record-body {
    flex-direction: row;
  }
}

.record-column {
  flex: 1;
  background: var(--secondary-bg);
  padding: 20px;
  border-radius: 12px;
}

.record-badge {
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 12px;
}

.record-field {
  margin-bottom: 8px;
  font-size: 14px;
}

/* ==================================================
   ACTION AREA
================================================== */

.record-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
  flex-wrap: wrap;
}

/* ==================================================
   MATCH SECTION
================================================== */

.match-wrapper {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.match-container {
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

.match-step {
  background: var(--secondary-bg);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.arrow {
  text-align: center;
  font-size: 20px;
  margin: 10px 0;
  color: #888;
}

.cycle-closed {
  background: #f0f2f7;;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  margin-top: 20px;
}

.contact-button {
  margin-top: 20px;
  text-align: center;
}

/* ==================================================
   FORM BASE
================================================== */

input, select, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  margin-bottom: 15px;
}

input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===================================
   HERO SECTION
=================================== */

.hero {
  padding: 80px 20px 60px;
  text-align: center;
  background: white;
}

.hero h1 {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero p {
  max-width: 600px;
  margin: 0 auto;
  color: #666;
  font-size: 16px;
}
.hero-image {
  text-align: center;
  margin: 40px 0;
}

.hero-image img {
  max-width: 400px;
}
/* ===================================
   TABLE STYLE
=================================== */

.table-custom {
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.table-custom th {
  background: #f0f2f7;
  padding: 15px;
  text-align: left;
}

.table-custom td {
  padding: 12px 15px;
  border-top: 1px solid #eee;
}
.home-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  flex-wrap: wrap;
}
.footer {
  text-align: center;
  padding: 30px 20px;
  font-size: 13px;
  color: #777;
}
/* ===============================
   HERO
================================= */

.hero {
  padding: 80px 20px 50px;
  text-align: center;
  background: white;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

.hero p {
  max-width: 600px;
  margin: 0 auto;
  color: #666;
}

/* ===============================
   HERO IMAGE
================================= */

.hero-image {
  text-align: center;
  margin: 40px 0;
}

.hero-image img {
  max-width: 400px;
}

/* ===============================
   COOKIE BANNER
================================= */

.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: white;
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  gap: 15px;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
/* ===============================
   HERO SLIDER FIX
================================= */

.hero-slider {
  display: flex;
  justify-content: center;
  
}

.slider-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 420px; /* altezza fissa */
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slide.active {
  opacity: 1;
}
/* ===============================
   HOME BLOCKS OLD STYLE
================================= */

.home-actions {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin: 0;
  flex-wrap: wrap;
  
}

.home-block {
  max-width: 280px;
}

.home-pill {
  display: inline-block;
  padding: 8px 22px;
  border: 1px solid #999;
  border-radius: 50px;
  font-size: 14px;
  text-decoration: none;
  color: #333;
  margin-bottom: 15px;
  transition: all 0.2s ease;
}

.home-pill:hover {
  background: #f0f0f0;
}

.home-block p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}
/* ===============================
   HOME TABLE
================================= */

.home-table {
  margin: 60px auto;
  display: flex;
  justify-content: center;
}

.table-wrapper {
  width: 100%;
  max-width: 900px;
  overflow-x: auto;
}

.home-table-custom {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
  border-radius: 12px;
  overflow: hidden;
}

.home-table-custom th {
  background: #f0f2f7;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.home-table-custom td {
  padding: 10px 12px;
  border-top: 1px solid #eee;
}

.home-table-custom tr:hover {
  background: #fafafa;
}
#cookiescript_pixel {
  display: none !important;
}
.footer {
  padding: 40px 20px;
  background: #f8f9fb;
  text-align: center;
  font-size: 14px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-description {
  margin-bottom: 20px;
  color: #555;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 13px;
}

.footer-legal a {
  color: #333;
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

#cc {
  font-size: 12px;
  color: #777;
}
.login-section {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.login-btn {
  padding: 12px 28px;
  font-size: 16px;
  border-radius: 40px;
  border: none;
  background: #4285F4;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-btn:hover {
  background: #3367d6;
}
/* ===============================
   BUTTON BASE
================================= */

.btn-custom {
  padding: 10px 20px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

/* ===============================
   BUTTON VARIANTS
================================= */

/* Confronta */
.btn-primary {
  background: #3b5bdb;
  color: white;
}
.btn-primary:hover {
  background: #2f4ac7;
}

/* Modifica */
.btn-secondary {
  background: #e9ecef;
  color: #333;
}
.btn-secondary:hover {
  background: #dee2e6;
}

/* Cancella */
.btn-danger {
  background: #f1f3f5;
  color: #666;
}
.btn-danger:hover {
  background: #ff6b6b;
  color: white;
}

/* ===============================
   LAYOUT GROUPS
================================= */

.read-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
}

.record-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
/* ========================================
   MAIN NAV – CLEAN VERSION
======================================== */

.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}

/* Logo blocco unico */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 38px;
}

.nav-logo span {
  font-size: 18px;
  font-weight: 600;
  color: #3f52ff;
  letter-spacing: 0.5px;
}

/* Menu desktop */
.nav-menu {
  display: flex;
  gap: 25px;
  justify-content: flex-end;
}

.nav-menu a {
  text-decoration: none;
  color: #444;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: 0.2s ease;
}

.nav-menu a:hover {
  background: #f0f2f7;
}

/* Toggle nascosto desktop */
.nav-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
}

body {
  padding-top: 80px;
}
/* Uniforma solo btn-info */
/* FORCE override Bootstrap btn-info */

button.btn-info,
.btn.btn-info,
input.btn-info {
  background-color: #e9ecef !important;
  color: #333 !important;
  border: none !important;
  border-radius: 30px !important;
  padding: 10px 22px !important;
  font-size: 14px !important;
}

button.btn-info:hover,
.btn.btn-info:hover,
input.btn-info:hover {
  background-color: #dee2e6 !important;
}
/*info filter*/
.filter-help-wrapper {
  position: relative;
  display: inline-block;
  margin-left: 10px;
}

.filter-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  background: #eef3ff;
  color: #3b5bfd;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-help-icon:hover {
  background: #3b5bfd;
  color: #fff;
}

.filter-help-tooltip {
  position: absolute;
  top: 35px;
  right: 0;
  width: 320px;
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.filter-help-wrapper:hover .filter-help-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.filter-help-tooltip h4 {
  margin-top: 0;
  font-size: 15px;
  margin-bottom: 10px;
  color: #222;
}

.filter-help-tooltip p {
  margin-bottom: 10px;
}

.filter-tip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-style: italic;
  color: #666;
}
/* =========================
   TOOLTIP FILTRI
========================= */

.filter-group {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.filter-item label {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  background: #eef3ff;
  color: #3b5bfd;
  cursor: pointer;
  transition: 0.2s ease;
}

.info-icon:hover {
  background: #3b5bfd;
  color: white;
}

.info-tooltip {
  position: absolute;
  top: 28px;
  left: 0;
  width: 260px;
  background: #fff;
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  font-size: 13px;
  line-height: 1.5;
  color: #444;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 200;
}

.info-tooltip.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
/* =========================
   FILTER LAYOUT FIX
========================= */

.filter-group {
  display: flex;
  align-items: flex-end;   /* 🔥 allinea tutto in basso */
  gap: 30px;
  flex-wrap: wrap;
}

.filter-button {
  display: flex;
  align-items: flex-end;
}
/* =========================
   FILTER BUTTON ALIGN FIX
========================= */

.filter-group {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  align-items: flex-end;   /* 🔥 allinea tutto in basso */
}

.filter-button {
  display: flex;
  align-items: flex-end;
  margin-bottom: 15px;     /* 🔥 compensa il margin-bottom degli input */
}
.filter-item button {
  margin-bottom: 15px;
}
.filter-group {
  padding: 15px;
  background: #f5f6f8;
  border-radius: 10px;
}

.filter-row {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.filter-item input,
.filter-item select {
  height: 38px;
  padding: 6px 10px;
}

.filter-button {
  margin-top: 15px;
}
/* =========================
PIAZZA DETAIL
========================= */

.piazza-card{

max-width:700px;
margin:40px auto;
padding:30px;

background:#ffffff;

border-radius:10px;

box-shadow:0 2px 8px rgba(0,0,0,0.1);

}

.piazza-card h2{

margin-bottom:10px;

}

.piazza-card button{

margin-top:15px;

padding:10px 18px;

border:none;

border-radius:6px;

background:#2c7be5;

color:white;

cursor:pointer;

}

.piazza-card button:hover{

background:#1a5fd0;

}

#participantsList{

margin-top:15px;
padding-left:18px;

}
/* HOME PIAZZE */

.home-piazze{
margin-top:40px;
}

.home-piazza{
padding:15px;
margin-bottom:10px;

border:1px solid #ddd;
border-radius:8px;

background:#fafafa;
}
/* ===== BOTTONI ===== */

button,
.btn,
input[type="submit"]{

cursor:pointer;
transition: all 0.15s ease;

}

button:hover,
.btn:hover{

transform: translateY(-1px);
box-shadow: 0 3px 8px rgba(0,0,0,0.15);

}

button:active,
.btn:active{

transform: translateY(1px);
box-shadow: none;
opacity:0.85;

}
/* ===== LOADER ===== */

.loader{

display:none;
margin-top:10px;
font-size:14px;
color:#444;

}

.loader span{

display:inline-block;
width:8px;
height:8px;
margin-left:3px;
background:#444;
border-radius:50%;
animation:loaderBlink 1.4s infinite both;

}

.loader span:nth-child(2){
animation-delay:.2s;
}

.loader span:nth-child(3){
animation-delay:.4s;
}

@keyframes loaderBlink{

0%{opacity:0.2}
20%{opacity:1}
100%{opacity:0.2}

}
.piazza-table{
width:100%;
border-collapse:collapse;
margin-bottom:20px;
}

.piazza-table th{
text-align:left;
padding:8px;
border-bottom:2px solid #ccc;
}

.piazza-table td{
padding:8px;
border-bottom:1px solid #eee;
}

.piazza-stats{
margin:10px 0;
display:flex;
gap:20px;
font-weight:bold;
}
.piazza-actions .btn-custom{
border-radius:25px;
padding:8px 18px;
display:inline-block;
}
/* ===============================
PIAZZA DETAIL LAYOUT
=============================== */

.piazza-card{
width:96%;
max-width:1400px;
margin:30px auto;
padding:25px;
background:#fff;
border-radius:10px;
box-shadow:0 3px 10px rgba(0,0,0,0.08);
}

.piazza-section{
margin-top:30px;
border-top:2px solid #eee;
padding-top:20px;
}

/* miglioriamo solo comportamento celle */

.piazza-table td{
vertical-align:top;
word-break:break-word;
}

/* bottoni scambi */

.btn-round{
border-radius:20px;
padding:6px 14px;
margin:2px;
font-size:13px;
border:none;
cursor:pointer;
}

.btn-accept{background:#2ecc71;color:white;}
.btn-reject{background:#e74c3c;color:white;}
.btn-delete{background:#555;color:white;}

/* ===============================
RESPONSIVE
=============================== */

@media(max-width:768px){

.piazza-card{
margin:20px 10px;
padding:15px;
}

}

@media(max-width:500px){

.piazza-table thead{
display:none;
}

.piazza-table tr{
display:block;
margin-bottom:15px;
border:1px solid #eee;
padding:10px;
border-radius:8px;
}

.piazza-table td{
display:block;
border:none;
padding:4px 0;
}

}
.cycle-card{

border-left:4px solid #2b7cff;
padding-left:12px;
margin-bottom:18px;

}
/*box api*/
.home-box{
      padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    margin-top: 40px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/*tabella api usage*/
.api-usage {
  width: 100%;
  border-collapse: collapse;
  font-family: monospace;
  font-size: 12px;
}

.api-usage th,
.api-usage td {
  border: 1px solid #bbb;
  padding: 2px 4px;
  line-height: 1.1;
  text-align: left;
}

.api-usage th {
  font-weight: 600;
  background: #f5f5f5;
}