.btn-icon {
  border: none;
  background: transparent;
  color: #3b82f6; /* blu acceso */
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.btn-icon:hover {
  color: #4f46e5; /* viola */
  transform: scale(1.2);
}

/*==============================================*/
.app {
  display: flex;
  min-height: 100vh;
}

/* CHIUSURA STAGIONE*/
.checklist-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.badge_chiusura {
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

#rate,
#pagamenti,
#movimenti,
#backupBadge {
  display: inline-block;
  margin: 5px;
  padding: 8px 12px;
  border-radius: 20px;
}
/* FINE CHIUSURA STAGIONE*/

/* LOGIN FORM */
/* SFONDO GENERALE */
html,
body {
  height: 100%;
  margin: 0;
}
body {
  background-color: #f4f6ff; /* azzurro chiarissimo coerente con sidebar */
  font-family: "Segoe UI", sans-serif;
  overflow: hidden; /* blocca scroll globale */
}
/* SIDEBAR FISSA  CONTENUTO SCROLLABILE*/

/* ===== WRAPPER ===== */
.app-wrapper {
  display: flex;
  height: 100vh;
}

/* Wrapper principale */
.d-lg-flex {
  height: 100vh;
}

/* Sidebar (se già fissa ignora) */

/* Contenuto scrollabile */
.content-area {
  padding: 20px;
}
/*==============================================*/

/* TOPBAR */
.io-topbar {
  background: linear-gradient(180deg, #534b58, #ecd4b7);
  backdrop-filter: blur(6px);
  height: 60px;
  display: flex;
  align-items: center;
  color: #000;
}

/* CARD LOGIN */
.io-card {
  max-width: 420px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(180deg, #534b58, #ecd4b7);
}

/* INPUT */
.io-input {
  height: 35px;
  border-radius: 10px;
  padding: 10px;
  transition: 0.2s ease-in-out;
}

.io-input:focus {
  border-color: #2a5298;
  box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
}

/* BOTTONE */
.io-button {
  background: #06193a;
  color: white;
  border-radius: 10px;
  padding: 10px;
  font-weight: 600;
  transition: 0.2s ease-in-out;
}

.io-button:hover {
  background: #02183f;
  transform: translateY(-2px);
}

.io-label {
  font-style: italic;
  font-weight: bold;
  color: #fff;
}

.custom-label {
  font-style: italic;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1px !important;
}

.custom-label-pagamenti {
  font-style: italic;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1px !important;
  color: #0d6efd;
}

.custom-label-modal {
  font-style: italic;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1px !important;
  color: rgb(78, 76, 76);
}

.testo-div-modal {
  font-style: italic;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1px !important;
  color: #000;
}

input[type="checkbox"],
input[type="text"] {
  cursor: pointer;
}

.btn-small-giallo {
  width: 52px;
  height: 30px;
  display: inline-block;
  line-height: 1.5rem;
  cursor: pointer;
  color: #101010;
  font-family: Arial;
  font-size: 12px;
  border-radius: 0px;
  border: 1px solid #ea850a;
  box-shadow: inset 0px 1px 0px 0px #fce2c1;
  background: linear-gradient(to bottom, #ffc477 5%, #fb9e25 100%);
}

.btn-small-giallo:hover {
  background-color: #b07500;
  border: 1px solid #b07500;
  color: #464444;
}
/*=========== campo di testo totale index_piano_rate.php===============*/
#totale {
  background-color: #fff3cd;
  font-weight: bold;
  text-align: right;
}

.highlight-totale {
  background: #d1e7dd;
  transition: background 0.5s;
}

.card-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  margin-right: 10px; /* spazio tra i badge */
}

.con-ricevuta {
  background-color: #d4edda;
  color: #155724;
}

.senza-ricevuta {
  background-color: #f8d7da;
  color: #721c24;
}

.in-scadenza {
  background-color: #ebbd3f;
  color: #000;
}
/*/////////////////////////////////////*/
.bg-brown {
  background-color: #cd7f32 !important;
}
.medaglia-oro {
  color: gold;
  font-weight: bold;
}
.medaglia-argento {
  color: silver;
  font-weight: bold;
}
.medaglia-bronzo {
  color: #cd7f32;
  font-weight: bold;
}
.medaglia-nc {
  color: #000;
  font-weight: bold;
}

/* tutti i controlli alti 30px e il teso al centro verticale*/
.form-control,
.form-select,
.btn,
.input-group-text {
  height: 30px;
  padding: 0 8px;
  font-size: 14px;
}

input.flatpickr {
  cursor: pointer !important;
}

.calendar-icon {
  cursor: pointer;
}

.form-select {
  background-color: #d7e6cf;
  color: #000;
  border-color: #d7e6cf;
}

.input-totale {
  font-size: 20px;
  font-weight: 700;
  text-align: right;
  background-color: #a0e7c8;
}
/*pulsanti per le tabella con testo  perfettamente al centro*/
.table .btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

th {
  font-family: "Roboto", sans-serif;
  font-weight: 100; /* leggerissimo */
  font-size: 14px; /* puoi ridurre se vuoi compatto */
  letter-spacing: 0.5px; /* poco spazio tra lettere per leggibilità */
  color: #fff; /* colore soft */
}

/* Chrome, Edge, Safari */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
/*input[type="number"] {
  -moz-appearance: textfield;
}*/

/* MOBILE */
@media (max-width: 576px) {
  .io-card {
    margin: 20px;
  }
}

/* Sidebar desktop */
/* ================= IPPON COLOR ================= */

/* ================= SIDEBAR ================= */
.sidebar {
  width: 240px;
  height: 100vh;
  /*background: linear-gradient(180deg, #534b58, #ecd4b7);*/
  background-color: #d7e6cf;
  transition: all 0.2s ease;
  flex-shrink: 0;

  overflow-y: auto;
  overflow-x: hidden;
}

#mobileSidebar {
  --bs-offcanvas-bg: transparent;
  background: linear-gradient(180deg, #d7e6cf, #d7e6cf);
}

#mobileSidebar .offcanvas-header {
  background: linear-gradient(180deg, #d7e6cf, #d7e6cf);
  color: #000;
}

.offcanvas-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

.barramobile {
  background: linear-gradient(90deg, #d7e6cf, #d7e6cf) !important;
}

/* ================= LOGO MOBILE CENTRATO ================= */
@media (max-width: 991px) {
  .barramobile {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar-brand {
    margin: 0 auto !important;
  }

  .logo {
    justify-content: center;
    align-items: center;
  }
}
/* ================= LOGO ================= */
.logo {
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-big {
  font-size: 2rem;
  font-weight: 800;
  color: #fcc869 !important;
  font-style: italic;
}

.logo-small-mobile {
  font-size: 1rem;
  font-weight: 400;
  color: #000 !important;
  font-style: italic;
  margin-left: 0;
}

.logo-img {
  width: 35px;
  margin-left: 10px;
}

/* ================= MENU ================= */

.navbar-toggler {
  border: none !important;
  box-shadow: none !important;
}

.navbar-toggler:focus {
  outline: none !important;
  box-shadow: none !important;
}

.sidebar-menu .nav-link {
  color: #000;
  border-radius: 8px;
  margin-bottom: 5px;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

/* Hover */
.sidebar-menu .nav-link:hover {
  background-color: #646361;
  color: #fff;
}

/* Active (pagina corrente) */
.sidebar-menu .nav-link.active {
  background-color: #7c7cd1;
  color: #fff;
  font-weight: 600;
}

/* Icone */
.sidebar-menu .nav-link i {
  margin-right: 8px;
}

/* Content */
.content {
  flex: 1;
  padding: 30px;
}

.content-area {
  flex: 1;
  margin-left: 12px; /* stessa larghezza sidebar */
  height: 100vh;
  overflow-y: auto;
  padding: 0 20px 20px 20px; /* niente padding sopra */
  background-color: #f8f9fa;
}

/* rende tutto senza bordi*/
.card,
.card-body,
.form-select,
.input-group-text,
.btn {
  border: 0 !important;
  box-shadow: none !important;
}

.table thead th {
  background: linear-gradient(180deg, #e5dfe9, #a79886);
  color: #000;
  font-size: 15px;
  text-transform: uppercase;
  border: none;
  font-weight: 400; /* normale */
  height: 50px;
}

/* Arrotondare SOLO gli angoli sopra della tabella*/
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th:first-child {
  border-top-left-radius: 8px;
}

.table thead th:last-child {
  border-top-right-radius: 8px;
}

/* Pulsante azioni della tabella*/
.dropdown-menu {
  background: linear-gradient(180deg, #534b58, #a79886);
  border: none;
  border-radius: 12px;
}

.dropdown-item {
  position: relative;
  transition: background 0.15s ease;
  color: #fff;
}

.dropdown-item:hover {
  background-color: #fcc869;
}

.dropdown-item:hover::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #fcc869;
  border-radius: 0 4px 4px 0;
}
/*================================================*/

/* COLORA DI ROSSO I BORDI DEI CONTROLLI DEL MODALE NUOVOATLETA QUANDO PASSA A mODIFICA*/
.modal-edit-mode .form-control,
.modal-edit-mode .form-select {
  border-color: #dc3545;
}

.modal-edit-mode .form-control:focus,
.modal-edit-mode .form-select:focus {
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.25);
}

.page-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 30px;
}

.modal table thead th {
  font-weight: 500; /* non bold pieno */

  text-transform: uppercase; /* maiuscolo elegante */
  font-size: 0.9rem; /* leggermente più piccolo */
  letter-spacing: 0.5px; /* più arioso */
  color: #6c757d; /* grigio soft */
  border-bottom: 1px solid #dee2e6;
}
/*=============================================================*/

/*===== EVITA CHE LA TENDINA DEL DROPDAWN NELLA TABELLA ATLETI RIMANGA SOTTO LA RIGA DELLA TABELLA*/
/* 🔹 Forza dropdown sopra le righe e fuori dal flusso della cella */
.table .dropdown {
  position: static !important;
}

.table .dropdown-menu {
  z-index: 2000 !important; /* sopra tutto */
}

/* Se la tabella ha overflow: auto o scroll */
.table-responsive {
  overflow: visible !important;
}

/*===================== 
<!-- ANAGRAFICA BARRA FILTRI STICKY  -->
<!-- ===================== -->*/

/* Barra filtri sempre visibile durante lo scroll */
.barra-filtri {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  padding: 10px;
  border-bottom: 1px solid #dee2e6;
}

/* Piccolo effetto ombra quando scrolla */
.barra-filtri {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.select-box {
  display: block;
  font-size: 0.8rem;
  font-family: sans-serif;
  font-weight: 500;
  color: #000;
  line-height: 1.3;
  padding: 0.3em 1.4em 0.5em 0.8em;
  width: 100%;
  height: 30px;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #deb887;
  box-shadow: none !important;
  padding-left: 10px;
  border-radius: 0.3em;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: #deb887;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"),
    linear-gradient(to bottom, #deb887 0%, #deb887 100%);
  background-repeat: no-repeat, repeat;
  background-position: right 0.7em top 50%, 0 0;
  background-size: 0.65em auto, 100%;
  cursor: pointer;
}

.select-box::-ms-expand {
  display: none;
}

.select-box:hover {
  border-color: #888;
}

.select-box:focus {
  border-color: #aaa;

  color: #222;
  outline: none;
}

/*===================== 
<!-- MODALE ANAGRAFICA  -->
<!-- ===================== -->*/
.italic {
  font-style: italic;
}
.header-color {
  background-color: #d3d3fa;
}

/* Barra laterale arrotondata */
.section-box {
  position: relative;
  padding: 22px;
  margin-left: 12px;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 18px;
  border: 0px;
  overflow: hidden; /* IMPORTANTISSIMO */
}

/* Barra laterale arrotondata */
.section-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #000; /* colore base */
}

/* Colore specifico */
.section-anagrafica::before {
  background: #198754;
}
.section-genitore::before {
  background: #0d6efd;
  border-left-color: #0d6efd;
}
.section-consensi::before {
  background: #fd7e14;
  border-left-color: #fd7e14;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.title-anagrafica {
  color: #198754;
}
.title-genitore {
  color: #0d6efd;
}
.title-consensi {
  color: #fd7e14;
}

.switch-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
/*=======================================================*/

/* STILE MODALE ADD FOTO*/
.custom-file-input {
  border-radius: 10px;
  padding: 4px;
  cursor: pointer;
}

.custom-file-input::file-selector-button {
  background-color: #fcc869;
  color: #000;
  border: none;
  padding: 4px 14px;
  border-radius: 8px;
  margin-right: 10px;
  transition: 0.3s;
}

.custom-file-input::file-selector-button:hover {
  background-color: #ad760f;
}

.atleta-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* foto */
.foto-atleta {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}
/*==============tabella cinture mobile======================*/
@media (max-width: 768px) {
  /* base table mobile */
  table.table-cinture thead {
    display: none;
  }

  table.table-cinture,
  table.table-cinture tbody,
  table.table-cinture tr,
  table.table-cinture td {
    display: block;
    width: 100%;
  }

  table.table-cinture tr {
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  table.table-cinture td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  /* label normale */
  table.table-cinture td::before {
    font-weight: normal;
    color: #000;
  }

  /* COLONNA ATLETI -> completamente diversa */
  td.cell-atleti {
    padding-left: 0 !important;
    text-align: left !important;
  }

  td.cell-atleti::before {
    position: static;
    display: block;
    margin-bottom: 5px;
    content: attr(data-label); /* rimane visibile */
  }

  /* se vuoi, aggiungi line-height per leggibilità */
  td.cell-atleti {
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    font-weight: 600;
  }
  /* Badge cintura mobile: lasciare inline senza problemi */
  td[data-label="Cintura"] .badge {
    display: inline-block;
    margin-top: 0; /* mantiene badge vicino alla label */
  }
}

/*=================================================*/
@media (max-width: 768px) {
  #tabellaEsami thead {
    display: none;
  }

  #tabellaEsami,
  #tabellaEsami tbody,
  #tabellaEsami tr,
  #tabellaEsami td {
    display: block;
    width: 100%;
  }

  #tabellaEsami tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  #tabellaEsami td {
    position: relative;
    padding-left: 50%;
    text-align: right;
  }

  #tabellaEsami td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    font-weight: normal;
    text-align: left;
  }

  #tabellaEsami td.td-foto {
    padding-left: 0;
    text-align: center;
  }

  #tabellaEsami td.td-foto::before {
    content: none;
  }
  #tabellaEsami td:first-child {
    padding-left: 0;
    text-align: center;
  }

  #tabellaEsami td:first-child::before {
    content: none;
  }

  #tabellaEsami td:first-child img {
    display: block;
    margin: 0 auto; /* 🔥 QUESTO la centra davvero */
  }
}

/* ===== MOBILE TABLE AS CARD ===== */
@media (max-width: 768px) {
  table thead {
    display: none;
  }

  table,
  table tbody,
  table tr,
  table td {
    display: block;
    width: 100%;
  }

  table tr {
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
    border: none;
  }

  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    text-align: left;
    font-weight: bold;
  }

  #risultatiTable thead {
    display: none;
  }

  /* wrapper verticale */
  .cell-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  /* mostra le label su mobile */
  .mobile-label {
    display: block;
    font-weight: normal; /* testo normale */
    font-size: 0.85rem;
    margin-bottom: 2px;
  }

  #risultatiTable tbody td {
    display: block;
    width: 100%;
    padding: 0.2rem 0.5rem;
  }

  #risultatiTable tbody td::before {
    content: none; /* rimuoviamo il vecchio ::before grassetto */
  }

  #risultatiTable td[data-label="Atleta"] {
    font-weight: 600;
    white-space: nowrap; /* Nome + Cognome sempre su una riga */
    overflow: hidden; /* nasconde l’eccesso */
    text-overflow: ellipsis; /* aggiunge ... se troppo lungo */
  }

  .atleta-wrapper span {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .foto-atleta {
    width: 80px;
    height: 80px;
  }
}

/* ================= CONTENUTO AFFIANCATO ================= */

/* Su mobile la sidebar sparisce */
@media (max-width: 991.98px) {
  .content-area {
    padding-left: 5px;
    padding-right: 10px;
  }
  .page-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 10px;
  }
}

/* Nascondi sidebar su mobile */
@media (max-width: 991px) {
  .sidebar {
    display: none;
  }
}

@media (max-width: 991px) {
  .navbar-toggler {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

  .barramobile {
    position: relative;
  }
  .logo-img {
    margin-left: 15px;
  }
}

/* =====================================================
   SIDEBAR SOTTOMENU - STILE DISTINTO DAL MENU PRINCIPALE
   ===================================================== */

/* contenitore sottomenu */
.sidebar-menu .collapse {
  background-color: #646361;
  border-radius: 10px;
  margin-left: 8px;
  padding: 5px;
}

/* voci dentro i sottomenu */
.sidebar-menu .collapse .nav-link {
  background-color: transparent;
  color: white;
  font-size: 15px;
  padding: 7px 12px;
  border-radius: 8px;
}

/* hover sottomenu uguale al colore hover principale */
.sidebar-menu .collapse .nav-link:hover {
  background-color: #646361;
  color: white;
}

/* voce attiva dentro il sottomenu */
.sidebar-menu .collapse .nav-link.active {
  background-color: #7c7cd1;
  color: white;
  font-weight: 600;
}

/* quando il sottomenu è aperto */
.sidebar-menu .collapse.show {
  background-color: #81807d;
}

/* =====================================================
   SIDEBAR COLLAPSE - CAMBIO MENU IMMEDIATO
   ===================================================== */

.sidebar .collapsing {
  transition: none !important;
}
