/* =========================
   MODAL GLOBAL
========================= */
.gsc-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}

.gsc-modal.is-open{
  display: block;
}

.gsc-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.gsc-modal-dialog{
  position: relative;
  z-index: 2;
  width: min(960px, calc(100vw - 32px));
  margin: 40px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.gsc-modal-dialog-simple{
  width: min(760px, calc(100vw - 32px));
}

.gsc-modal-dialog-settings{
  width: min(1100px, calc(100vw - 32px));
}

.gsc-modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.gsc-modal-head h2{
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #111827;
}

.gsc-close-modal,
.gsc-close-settings-modal{
  border: none;
  background: transparent;
  box-shadow: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0 4px;
}

.gsc-close-modal:hover,
.gsc-close-settings-modal:hover{
  color: #111827;
}

/* =========================
   FORM / FIELDS
========================= */
.gsc-simple-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.gsc-field{
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.gsc-field-full{
  grid-column: 1 / -1;
}

.gsc-field label{
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.gsc-field input[type="text"],
.gsc-field input[type="date"],
.gsc-field input[type="number"],
.gsc-field select,
.gsc-field textarea,
.gsc-balance-box input,
.gsc-filter-item input,
.gsc-filter-item select{
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  font-size: 14px;
  color: #111827;
}

.gsc-field textarea{
  min-height: 92px;
  resize: vertical;
}

.gsc-balance-box input{
  font-size: 15px;
  font-weight: 700;
}

.gsc-field input:focus,
.gsc-field select:focus,
.gsc-field textarea:focus,
.gsc-balance-box input:focus,
.gsc-filter-item input:focus,
.gsc-filter-item select:focus{
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* =========================
   BALANCE ROW
========================= */
.gsc-balance-row{
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.gsc-balance-box{
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.gsc-balance-label{
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

/* =========================
   MODAL ACTIONS
========================= */
.gsc-modal-actions,
.gsc-modal-actions-simple{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

/* =========================
   FORM MESSAGES
========================= */
.gsc-form-msg{
  margin: 0 22px;
  padding: 0;
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
}

.gsc-form-msg.is-success{
  color: #15803d;
}

.gsc-form-msg.is-error{
  color: #b91c1c;
}

/* =========================
   HEADER ACTIONS
========================= */
.gsc-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.gsc-header-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   SETTINGS
========================= */
.gsc-settings-tabs{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 22px 0;
  background: #fff;
}

.gsc-tab-btn{
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.gsc-tab-btn:hover{
  background: #f3f4f6;
  color: #111827;
}

.gsc-tab-btn.is-active{
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.gsc-settings-body{
  padding: 18px 22px 22px;
  overflow: auto;
}

.gsc-tab-panel{
  display: none;
}

.gsc-tab-panel.is-active{
  display: block;
}

.gsc-settings-row{
  display: grid;
  grid-template-columns: 90px minmax(220px, 1.4fr) minmax(160px, 1fr) minmax(150px, 1fr) minmax(120px, 0.8fr) 120px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fbfbfc;
}

.gsc-bank-row{
  grid-template-columns: 90px minmax(240px, 1.7fr) minmax(140px, 1fr) 120px;
}

.gsc-setting-remove-wrap{
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.gsc-setting-remove-wrap .button{
  width: 100%;
}

#gsc-add-description-row,
#gsc-add-bank-row{
  margin-top: 6px;
}

/* =========================
   FILTERS
========================= */
.gsc-filters-card{
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
}

.gsc-filters-form{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.gsc-filter-item{
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.gsc-filter-item label{
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.gsc-filter-grow{
  grid-column: span 1;
}

.gsc-filter-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   CARDS
========================= */
.gsc-cards-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.gsc-card{
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
}

.gsc-card-highlight{
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  border-color: transparent;
}

.gsc-card-label{
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
}

.gsc-card-value{
  margin-top: 10px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

/* =========================
   TABLEAU
========================= */
.gsc-table-card{
  margin-top: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.gsc-table-wrap{
  overflow-x: auto;
  background: transparent;
}

.gsc-table{
  width: 100%;
  border-collapse: collapse !important;
  background: transparent !important;
}

.gsc-table thead,
.gsc-table tbody{
  background: transparent !important;
}

.gsc-table thead th{
  padding: 12px 10px !important;
  text-align: center !important;
  vertical-align: middle;
  font-weight: 700;
  color: #111827;
  background: transparent !important;
  border-bottom: 2px solid #d1d5db !important;
}

.gsc-table tbody td{
  padding: 12px 10px !important;
  text-align: center !important;
  vertical-align: middle;
  background: transparent !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.gsc-table tbody tr{
  height: 46px;
}

.gsc-table tbody tr:hover{
  background: rgba(0, 0, 0, 0.03);
}

.gsc-empty{
  padding: 18px;
  text-align: center;
  color: #6b7280;
}

.col-libelle{
  min-width: 140px;
}

.col-montant{
  font-weight: 600;
}

.col-final{
  font-weight: 700;
}

.col-bank{
  min-width: 120px;
}

.gsc-table td .button{
  padding: 6px 10px !important;
  font-size: 13px;
  border-radius: 6px !important;
}

.gsc-table td:last-child{
  display: table-cell !important;
  text-align: center !important;
  vertical-align: middle !important;
}
.gsc-table td:last-child .button{
  margin: 0 4px;
  display: inline-block;
}
/* force bordure droite colonne Actions */
.gsc-table th:last-child,
.gsc-table td:last-child{
  border-right: 1px solid #e3e3e3 !important;
}
.gsc-table{
  table-layout: fixed !important;
}

.gsc-table td,
.gsc-table th{
  vertical-align: middle !important;
}
.gsc-table td:last-child{
  white-space: nowrap;
}

/* ligne bas complète */
.gsc-table tbody tr:last-child td{
  border-bottom: 1px solid #e3e3e3 !important;
}

/* =========================
   BADGES => TEXTE + TRAIT PROPRE
========================= */
.gsc-badge{
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
  font-weight: 600;
  white-space: nowrap;
}

/* trait sous texte */
.gsc-badge::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  opacity: 0.8;
}

/* couleurs */
.gsc-badge.is-in{
  color: #16a34a;
}

.gsc-badge.is-out{
  color: #dc2626;
}

/* couleur cellule */
.gsc-table td:has(.gsc-badge.is-in){
  color: #16a34a;
  font-weight: 600;
}

.gsc-table td:has(.gsc-badge.is-out){
  color: #dc2626;
  font-weight: 600;
}
/* =========================
   FRONT
========================= */
.gsc-front-wrap{
  margin-top: 20px;
}

.gsc-front-msg{
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

/* =========================
   ENLEVER FOND + CADRES HORS MODAL
   (sans toucher aux modals)
========================= */
.gsc-admin-wrap .gsc-card,
.gsc-admin-wrap .gsc-filters-card,
.gsc-admin-wrap .gsc-table-card,
.gsc-front-wrap .gsc-card,
.gsc-front-wrap .gsc-filters-card,
.gsc-front-wrap .gsc-table-card{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.gsc-admin-wrap .gsc-filters-card,
.gsc-front-wrap .gsc-filters-card{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.gsc-admin-wrap .gsc-table,
.gsc-admin-wrap .gsc-table thead th,
.gsc-admin-wrap .gsc-table tbody td,
.gsc-front-wrap .gsc-table,
.gsc-front-wrap .gsc-table thead th,
.gsc-front-wrap .gsc-table tbody td{
  background: transparent !important;
}

.gsc-admin-wrap .gsc-filter-item input,
.gsc-admin-wrap .gsc-filter-item select,
.gsc-front-wrap .gsc-filter-item input,
.gsc-front-wrap .gsc-filter-item select{
  background: transparent !important;
  box-shadow: none !important;
}

.gsc-modal .gsc-modal-dialog,
.gsc-modal .gsc-modal-head,
.gsc-modal .gsc-settings-body,
.gsc-modal .gsc-simple-grid,
.gsc-modal .gsc-modal-actions,
.gsc-modal .gsc-card,
.gsc-modal .gsc-field input,
.gsc-modal .gsc-field select,
.gsc-modal .gsc-field textarea{
  background: initial;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px){
  .gsc-settings-row,
  .gsc-bank-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px){
  .gsc-cards-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gsc-filters-form{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gsc-simple-grid,
  .gsc-balance-row{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px){
  .gsc-modal-dialog,
  .gsc-modal-dialog-simple,
  .gsc-modal-dialog-settings{
    width: calc(100vw - 20px);
    margin: 10px auto;
    max-height: calc(100vh - 20px);
    border-radius: 14px;
  }

  .gsc-modal-head{
    padding: 14px 16px;
  }

  .gsc-modal-head h2{
    font-size: 18px;
  }

  .gsc-settings-tabs{
    gap: 8px;
    padding: 12px 16px 0;
  }

  .gsc-settings-body{
    padding: 14px 16px 16px;
  }

  .gsc-simple-grid{
    gap: 14px;
    padding: 16px;
  }

  .gsc-modal-actions,
  .gsc-modal-actions-simple{
    flex-direction: column-reverse;
    padding: 14px 16px 16px;
  }

  .gsc-modal-actions .button,
  .gsc-modal-actions-simple .button,
  .gsc-header-actions,
  .gsc-header-actions .button{
    width: 100%;
  }

  .gsc-settings-row,
  .gsc-bank-row,
  .gsc-cards-grid,
  .gsc-filters-form{
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   CAISSE : AJUSTEMENT DESIGN GLOBAL
   - tableau plus large
   - rendu rectangulaire
   - boutons actions sans fond
   - selects Banque / Description rectangulaires
   - badges soulignés
   - zoom global légèrement réduit
========================================================= */

/* zone principale un peu plus large + un peu moins zoomée */
.gsc-admin-wrap,
.gsc-front-wrap,
.gsc-caisse-wrap,
.gsc-page-wrap{
  max-width: 1500px !important;
  width: 96% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: 14px !important;
}

/* titres et stats un peu moins gros */
.gsc-card-label{
  font-size: 12px !important;
}

.gsc-card-value{
  font-size: 20px !important;
  line-height: 1.15 !important;
}

/* =========================================================
   CARTES STATS : RECTANGULAIRES
========================================================= */
.gsc-card,
.gsc-admin-wrap .gsc-card,
.gsc-front-wrap .gsc-card{
  border-radius: 0 !important;
}

/* si tu gardes uniquement ligne soulignée */
.gsc-card{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* =========================================================
   FILTRES
========================================================= */
.gsc-filters-card,
.gsc-admin-wrap .gsc-filters-card,
.gsc-front-wrap .gsc-filters-card{
  border-radius: 0 !important;
}

/* labels filtres */
.gsc-filter-item label{
  font-size: 12px !important;
  margin-bottom: 2px !important;
}

/* tous les champs filtres = rectangulaires */
.gsc-filter-item input,
.gsc-filter-item select,
.gsc-field input,
.gsc-field select,
.gsc-field textarea{
  border-radius: 0 !important;
  min-height: 40px !important;
  font-size: 13px !important;
  padding: 8px 10px !important;
}

/* Description + Banque : cadre rectangulaire normal */
.gsc-filter-item select,
select#gsc_filter_description,
select#gsc_filter_bank,
#gsc_filter_description,
#gsc_filter_bank{
  border: 1px solid #d1d5db !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  appearance: auto !important;
}

/* recherche / dates */
.gsc-filter-item input[type="text"],
.gsc-filter-item input[type="date"]{
  border-radius: 0 !important;
  background: transparent !important;
}

/* boutons zone filtres */
.gsc-filter-actions .button,
.gsc-filters-form .button{
  border-radius: 0 !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
}

/* =========================================================
   TABLEAU : PLUS LARGE + RECTANGULAIRE
========================================================= */
.gsc-table-card,
.gsc-admin-wrap .gsc-table-card,
.gsc-front-wrap .gsc-table-card{
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 22px !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

.gsc-table-wrap{
  width: 100% !important;
  overflow-x: auto !important;
  border-radius: 0 !important;
}

.gsc-table{
  width: 100% !important;
  min-width: 900px !important; /* agrandit le tableau */
  border-collapse: collapse !important;
  table-layout: auto !important;
  font-size: 13px !important;
  background: transparent !important;
}

/* header */
.gsc-table thead th{
  padding: 10px 12px !important;
  text-align: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #d6d6d6 !important;
  background: transparent !important;
  white-space: nowrap !important;
}

/* cellules */
.gsc-table tbody td{
  padding: 10px 12px !important;
  text-align: center !important;
  vertical-align: middle !important;
  font-size: 13px !important;
  border-bottom: 1px solid #e3e3e3 !important;
  background: transparent !important;
}

/* lignes plus compactes */
.gsc-table tbody tr{
  height: auto !important;
}

.gsc-table tbody tr:hover{
  background: rgba(0,0,0,0.03) !important;
}

/* colonnes plus respirées */
.gsc-table th:nth-child(1),
.gsc-table td:nth-child(1){ min-width: 110px; } /* date */

.gsc-table th:nth-child(2),
.gsc-table td:nth-child(2){ min-width: 120px; } /* solde initial */

.gsc-table th:nth-child(3),
.gsc-table td:nth-child(3){ min-width: 120px; } /* libellé */

.gsc-table th:nth-child(4),
.gsc-table td:nth-child(4){ min-width: 150px; } /* description */

.gsc-table th:nth-child(5),
.gsc-table td:nth-child(5){ min-width: 100px; } /* banque */

.gsc-table th:nth-child(6),
.gsc-table td:nth-child(6){ min-width: 130px; } /* montant */

.gsc-table th:nth-child(7),
.gsc-table td:nth-child(7){ min-width: 130px; } /* solde final */

.gsc-table th:nth-child(8),
.gsc-table td:nth-child(8){ min-width: 130px; } /* notes */

.gsc-table th:nth-child(9),
.gsc-table td:nth-child(9){ min-width: 80px; } /* actions */



/* au cas où libellé est directement coloré sans badge */
.gsc-table td .is-in{
  color: #166534 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

.gsc-table td .is-out{
  color: #dc2626 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

/* =========================================================
   ACTIONS : SANS FOND
========================================================= */


.gsc-table td .button,
.gsc-table td button,
.gsc-action-btn,
.gsc-btn-action{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-height: auto !important;
  color: #2563eb !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.gsc-table td .button:hover,
.gsc-table td button:hover,
.gsc-action-btn:hover,
.gsc-btn-action:hover{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

.gsc-table td .button:focus,
.gsc-table td button:focus{
  outline: none !important;
  box-shadow: none !important;
}

/* bouton supprimer en rouge si classe existante */
.gsc-table td .button.delete,
.gsc-table td .button.gsc-delete,
.gsc-table td .gsc-btn-delete{
  color: #dc2626 !important;
}

.gsc-table td .button.delete:hover,
.gsc-table td .button.gsc-delete:hover,
.gsc-table td .gsc-btn-delete:hover{
  color: #b91c1c !important;
}

/* =========================================================
   LIGNE SOULIGNÉE SOUS STATS SI BESOIN
========================================================= */
.gsc-card,
.gsc-stat-box,
.gsc-stat-item{
  box-shadow: none !important;
}

.gsc-card::after,
.gsc-stat-box::after,
.gsc-stat-item::after{
  content: "";
  display: block;
  width: 76px;
  max-width: 100%;
  margin: 10px auto 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.35);
}

/* si ça ajoute une ligne en double, supprimer pour certaines cartes */
.gsc-cards-grid .gsc-card::after{
  display: none !important;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1200px){
  .gsc-admin-wrap,
  .gsc-front-wrap,
  .gsc-caisse-wrap,
  .gsc-page-wrap{
    width: 98% !important;
  }

  .gsc-table{
    min-width: 1160px !important;
  }
}

@media (max-width: 768px){
  .gsc-admin-wrap,
  .gsc-front-wrap,
  .gsc-caisse-wrap,
  .gsc-page-wrap{
    font-size: 13px !important;
  }

  .gsc-card-value{
    font-size: 18px !important;
  }

  .gsc-table{
    min-width: 980px !important;
    font-size: 12px !important;
  }

  .gsc-table thead th,
  .gsc-table tbody td{
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
}
/* =========================================================
   TABLEAU : TRAITS VERTICAUX (CADRAGE COMPLET)
========================================================= */

/* lignes verticales entre colonnes */
.gsc-table thead th,
.gsc-table tbody td{
  border-right: 1px solid #e3e3e3 !important;
}



/* ajouter bordure gauche du tableau */
.gsc-table{
  border-left: 1px solid #e3e3e3 !important;
}

/* renforcer effet grille propre */
.gsc-table thead th{
  border-top: 1px solid #d6d6d6 !important;
}

/* option : rendre grille plus visible */
.gsc-table tbody td{
  border-bottom: 1px solid #e3e3e3 !important;
}
.gsc-badge::after{
  height: 2px;
  opacity: 0.8;
}
/* =========================
   LIBELLE TABLEAU : couleur seulement
========================= */
.gsc-badge{
  display: inline !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  font-size: inherit;
  font-weight: 600 !important;
  white-space: nowrap;
}

.gsc-badge::after{
  display: none !important;
  content: none !important;
}

.gsc-badge.is-in{
  color: #166534!important;
}

.gsc-badge.is-out{
  color: #dc2626 !important;
}

.gsc-table td:has(.gsc-badge.is-in){
  color: #166534 !important;
  font-weight: 600 !important;
}

.gsc-table td:has(.gsc-badge.is-out){
  color: #dc2626 !important;
  font-weight: 600 !important;
}
/* =========================
   LIBELLE : AUCUN SOULIGNEMENT
========================= */
.gsc-badge,
.gsc-badge::after,
.gsc-table td .is-in,
.gsc-table td .is-out{
  text-decoration: none !important;
}

.gsc-badge::after{
  display: none !important;
  content: none !important;
}
/* =========================
   ENLEVER TRAIT DU LABEL
========================= */
.gsc-card-label::after{
  display: none !important;
  content: none !important;
}

/* =========================
   TRAIT SOUS CHIFFRE = LARGEUR AUTO
========================= */
.gsc-card-value{
  position: relative;
  display: inline-block; /* IMPORTANT */
  padding-bottom: 4px;
}

/* trait exactement largeur texte */
.gsc-card-value::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%; /* 👈 clé */
  height: 2px;
  background: rgba(0,0,0,0.25);
}
background: rgba(0,0,0,0.4);
height: 2px;
.gsc-badge.is-in{
  color: #166534 !important;
}

.gsc-table td:has(.gsc-badge.is-in){
  color: #166534 !important;
}
/* =========================
   MODALS STYLE ORANGE LIGHT + RECTANGLE
========================= */

/* fond derrière (overlay) */
.gsc-modal-backdrop{
  background: rgba(255, 140, 0, 0.12) !important; /* orange très léger */
  backdrop-filter: blur(2px);
}

/* boîte modal */
.gsc-modal-dialog{
  background: rgba(255, 255, 255, 0.92) !important; /* léger transparent */
  border-radius: 0 !important; /* rectangle */
  box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

/* header modal */
.gsc-modal-head{
  background: rgba(255, 140, 0, 0.08) !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  border-radius: 0 !important;
}

/* body */
.gsc-settings-body,
.gsc-simple-grid{
  background: transparent !important;
}

/* lignes settings */
.gsc-settings-row{
  background: rgba(255, 140, 0, 0.05) !important;
  border-radius: 0 !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
}

/* champs inputs */
.gsc-field input,
.gsc-field select,
.gsc-field textarea{
  background: rgba(255,255,255,0.85) !important;
  border-radius: 0 !important;
}

/* boutons modal */
.gsc-modal-actions{
  background: transparent !important;
  border-top: 1px solid rgba(0,0,0,0.08) !important;
}

/* tabs */
.gsc-tab-btn{
  border-radius: 0 !important;
}

.gsc-tab-btn.is-active{
  background: #1f2937 !important;
  color: #fff !important;
}
/* =========================
   TOTAL TABLE
========================= */
.gsc-table-total{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 15px;
}

.gsc-total-label{
  color: #6b7280;
  font-weight: 500;
}

.gsc-total-value{
  font-weight: 700;
  color: #111827;
}
.gsc-table{
  font-size: 11px !important;
}

.gsc-table thead th{
  font-size: 11px !important;
  padding: 6px 8px !important;
  font-weight: 600 !important;
}

.gsc-table tbody td{
  font-size: 11px !important;
  padding: 6px 8px !important;
}
.gsc-table-total{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:14px;
}

.gsc-total-box{
  min-width:180px;
  background:none;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:10px 14px;
}

.gsc-total-label{
  font-size:12px;
  color:#6b7280;
  margin-bottom:4px;
}

.gsc-total-value{
  font-size:16px;
  font-weight:700;
  color:#111827;
}
.gsc-table-pagination{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:12px;
}

.gsc-page-info{
  font-size:13px;
  color:#6b7280;
}
.gsc-inline-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
    align-items:end;
}

@media(max-width:768px){
    .gsc-inline-grid{
        grid-template-columns:1fr;
    }
}
/* =========================================================
   SUPPRIMER LE SCROLL HORIZONTAL DU TABLEAU CAISSE
========================================================= */

/* largeur complète sans dépasser l’écran */
.gsc-admin-wrap,
.gsc-front-wrap,
.gsc-caisse-wrap,
.gsc-page-wrap{
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}

/* le conteneur ne crée plus de scroll horizontal */
.gsc-table-wrap{
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: visible !important;
}

/* le tableau reste dans la largeur disponible */
.gsc-table{
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

/* réduire un peu les cellules */
.gsc-table th,
.gsc-table td{
  padding: 8px 6px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* colonnes importantes */
.gsc-table th:nth-child(1),
.gsc-table td:nth-child(1){
  width: 105px !important;
}

.gsc-table th:nth-child(2),
.gsc-table td:nth-child(2),
.gsc-table th:nth-child(5),
.gsc-table td:nth-child(5),
.gsc-table th:nth-child(7),
.gsc-table td:nth-child(7){
  width: 105px !important;
}

/* colonne Actions */
.gsc-table th:last-child,
.gsc-table td:last-child{
  width: 95px !important;
  white-space: nowrap !important;
}

/* boutons modifier / supprimer plus petits */
.gsc-table td:last-child .button,
.gsc-table td:last-child a{
  font-size: 12px !important;
  padding: 3px 5px !important;
  margin: 0 2px !important;
}
/* =========================================================
   AUGMENTER LE ZOOM GENERAL DU TABLEAU CAISSE
========================================================= */

/* largeur du bloc tableau */
.gsc-table-card{
  max-width: 1200px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* zoom général du tableau */
.gsc-table{
  font-size: 18px !important;
  table-layout: fixed !important;
}

/* cellules plus grandes */
.gsc-table th,
.gsc-table td{
  font-size: 14px !important;
  padding: 10px 8px !important;
  line-height: 1.35 !important;
}

/* titres du tableau */
.gsc-table thead th{
  font-size: 13px !important;
  font-weight: 700 !important;
}

/* montants plus visibles */
.gsc-table .col-montant,
.gsc-table .col-final,
.gsc-table td:nth-child(2),
.gsc-table td:nth-child(6),
.gsc-table td:nth-child(8){
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* colonne actions plus lisible */
.gsc-table th:last-child,
.gsc-table td:last-child{
  width: 115px !important;
  white-space: nowrap !important;
}

.gsc-table td:last-child a,
.gsc-table td:last-child .button{
  font-size: 13px !important;
  padding: 4px 5px !important;
}

/* =========================================================
   MODAL DETAILS OPERATION - CLIC LIGNE TABLEAU
========================================================= */

.gsc-table tbody tr{
  cursor: pointer;
}

.gsc-table tbody tr:hover{
  background: rgba(255, 255, 255, 0.18) !important;
}

/* ne pas donner l'impression que les boutons ouvrent aussi la ligne */
.gsc-table tbody tr button,
.gsc-table tbody tr a{
  cursor: pointer;
}

.gsc-detail-modal{
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: none;
}

.gsc-detail-modal.is-open{
  display: block;
}

.gsc-detail-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.gsc-detail-dialog{
  position: fixed !important;
  z-index: 2;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: hidden;

  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;

  margin: 0 !important;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}
.gsc-detail-body{
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}
.gsc-detail-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 140, 0, 0.10);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.gsc-detail-head h2{
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.gsc-detail-close{
  border: none;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: #374151;
}

.gsc-detail-body{
  padding: 20px;
}

.gsc-detail-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gsc-detail-item{
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255, 140, 0, 0.04);
}

.gsc-detail-item span{
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.gsc-detail-item strong{
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  word-break: break-word;
}

.gsc-detail-item-full{
  grid-column: 1 / -1;
}

@media (max-width: 640px){
  .gsc-detail-dialog{
    width: calc(100vw - 20px);
    margin: 20px auto;
  }

  .gsc-detail-grid{
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   MASQUER COLONNE NOTES DANS LE TABLEAU UNIQUEMENT
   La note reste disponible dans le modal détail
========================================================= */

/* Masquer l'en-tête Notes */
.gsc-table th:nth-child(9){
  display: none !important;
}

/* Masquer les cellules Notes */
.gsc-table td:nth-child(9){
  display: none !important;
}
/* =========================================================
   MASQUER COLONNE BANQUE DANS LE TABLEAU UNIQUEMENT
   La banque reste disponible dans le modal détail
========================================================= */

/* Masquer l'en-tête Banque */
.gsc-table th:nth-child(5){
  display: none !important;
}

/* Masquer les cellules Banque */
.gsc-table td:nth-child(5){
  display: none !important;
}
/* =========================================================
   LARGEURS MANUELLES DES COLONNES TABLEAU CAISSE
   Ordre réel :
   1 Date
   2 Solde initial
   3 Libellé
   4 Description
   5 Banque masquée
   6 Montant
   7 Factures
   8 Solde final
   9 Notes masquée
   10 Actions
========================================================= */

.gsc-table{
  table-layout: fixed !important;
}

/* Date */
.gsc-table th:nth-child(1),
.gsc-table td:nth-child(1){
  width: 95px !important;
}

/* Solde initial */
.gsc-table th:nth-child(2),
.gsc-table td:nth-child(2){
  width: 110px !important;
}

/* Libellé */
.gsc-table th:nth-child(3),
.gsc-table td:nth-child(3){
  width: 110px !important;
}

/* Description */
.gsc-table th:nth-child(4),
.gsc-table td:nth-child(4){
  width: 130px !important;
}

/* Banque masquée */
.gsc-table th:nth-child(5),
.gsc-table td:nth-child(5){
  display: none !important;
}

/* Montant */
.gsc-table th:nth-child(6),
.gsc-table td:nth-child(6){
  width: 120px !important;
}

/* Factures */
.gsc-table th:nth-child(7),
.gsc-table td:nth-child(7){
  width: 110px !important;
}

/* Solde final */
.gsc-table th:nth-child(8),
.gsc-table td:nth-child(8){
  width: 115px !important;
}

/* Notes masquée */
.gsc-table th:nth-child(9),
.gsc-table td:nth-child(9){
  display: none !important;
}

/* Actions */
.gsc-table th:nth-child(10),
.gsc-table td:nth-child(10){
  width: 130px !important;
  white-space: nowrap !important;
}
/* =========================================================
   MOBILE : AFFICHER SEULEMENT DATE + LIBELLE + MONTANT
========================================================= */

@media (max-width: 768px){

  /* éviter le scroll horizontal sur mobile */
  .gsc-table-wrap{
    overflow-x: visible !important;
  }

  .gsc-table{
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  /* masquer toutes les colonnes */
  .gsc-table th,
  .gsc-table td{
    display: none !important;
  }

  /* afficher Date = colonne 1 */
  .gsc-table th:nth-child(1),
  .gsc-table td:nth-child(1){
    display: table-cell !important;
    width: 35% !important;
    width: 35% !important;
  }

  /* afficher Libellé = colonne 3 */
  .gsc-table th:nth-child(3),
  .gsc-table td:nth-child(3){
    display: table-cell !important;
    width: 33% !important;
  }

  /* afficher Montant = colonne 6 */
  .gsc-table th:nth-child(6),
  .gsc-table td:nth-child(6){
    display: table-cell !important;
    width: 41% !important;
  }

  /* style compact mobile */
  .gsc-table th,
  .gsc-table td{
    font-size: 12px !important;
    padding: 8px 5px !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
}
/* =========================================================
   MOBILE : ACTIONS MODIFIER / SUPPRIMER DANS MODAL DETAIL
========================================================= */

/* Par défaut, les actions du modal sont cachées sur ordinateur */
.gsc-detail-actions-mobile{
  display: none !important;
}

/* Sur mobile : afficher les boutons dans le modal */
@media (max-width: 768px){

  .gsc-detail-actions-mobile{
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
  }

  .gsc-detail-actions-mobile .button,
  .gsc-detail-actions-mobile button,
  .gsc-detail-actions-mobile a{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px !important;
    padding: 8px 14px !important;
    border: 1px solid #d1d5db !important;
    background: #fff !important;
    color: #111827 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
  }

  .gsc-detail-actions-mobile .gsc-delete-row{
    color: #dc2626 !important;
    border-color: rgba(220,38,38,0.35) !important;
  }

  /* Dans le tableau mobile : garder seulement Date / Libellé / Montant */
  .gsc-table th:nth-child(10),
  .gsc-table td:nth-child(10){
    display: none !important;
  }
}