* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  /* Assurer la cohérence de la police */
  margin: 0px;
  padding: 0;
  background-color: #f4f4f4;
}

/* Style moderne pour tous les selects */
select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 36px;
  padding: 8px 36px 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: white;
}

select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Style global pour la barre de navigation */
/* Style global pour la barre de navigation */

/* Ajustements spécifiques pour la barre de navigation dans auth-page */
.auth-page .nav-bar {
  background-color: #0b415a;
  height: 60px;
  /* Fixe une hauteur cohérente */
  display: flex;
  align-items: center;
}

.auth-page .nav-bar ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.auth-page .nav-bar .nav-center {
  flex: 1;
  justify-content: center;
}

.auth-page .nav-bar .page-title {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
}



/* Modern Navbar */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Blue gradient with transparency for glassmorphism */
  background: linear-gradient(135deg, rgba(13, 77, 105, 0.85) 0%, rgba(11, 65, 90, 0.85) 50%, rgba(8, 51, 68, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 20px;
  height: 76px;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.nav-bar ul {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-bar li {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 6px;
  min-width: 70px;
  border: 1px solid transparent;
}

.nav-bar a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-bar a.active {
  background: white;
  color: #4f46e5;
  /* Indigo-600 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.nav-bar a.active:hover {
  background: white !important;
  color: #4f46e5 !important;
  border-color: transparent !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.nav-bar a.logout:hover {
  background: rgba(239, 68, 68, 0.2);
  /* Red-500 with opacity */
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.3);
}

.nav-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  transition: transform 0.2s ease;
}

.nav-bar a:hover .nav-icon {
  transform: scale(1.1);
}

/* Sections */
.nav-left {
  flex: 1;
  justify-content: flex-start;
}

.nav-center {
  flex: 2;
  justify-content: center;
}

.nav-right {
  flex: 1;
  justify-content: flex-end;
}

/* Tooltips (simplified) */
.nav-bar a[title] {
  position: relative;
}

/* Hide default tooltip text if we are showing labels */
.nav-bar a .menu-text {
  display: block;
  /* Always show text in this design */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .nav-bar a {
    min-width: auto;
    padding: 8px;
  }

  .nav-bar a .menu-text {
    font-size: 0.65rem;
  }
}



.btn {
  display: inline-block;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  color: white;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  /* violet → bleu */
  border: none;
  border-radius: 8px;
  text-decoration: none;
  /* enlève le soulignement sur <a> */
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn:focus {
  outline: 2px solid #93c5fd;
  /* bleu clair focus */
  outline-offset: 2px;
}

h1,
h2 {
  text-align: center;
}

.alert {
  margin-bottom: 10px;
}

.alert-danger {
  color: red;
  font-weight: bold;
}

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.tab-link {
  background-color: #ddd;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  /* Bordures arrondies */
  font-size: 16px;
  /* Taille de police pour cohérence */
  margin: 0 5px;
  /* Espacement entre les onglets */
}

.tab-link.active {
  background-color: #333;
  color: #fff;
}

.tab-link:hover {
  background-color: #555;
  /* Plus de lisibilité au survol */
  color: #fff;
}

.tab-content {
  display: none;
  padding: 20px;
}

.tab-content.active {
  display: grid;
}

.header {
  font-weight: 600;
  text-align: center;
  padding: 10px 0;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.day {
  background-color: #fff;
  border: 1px solid #f3f4f6;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  position: relative;
  width: 100%;
  height: 110px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day:hover {
  background-color: #f9fafb;
  border-color: #e5e7eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 0 auto;
  width: 100%;
  box-shadow: none;
  border-radius: 0;
  background-color: transparent;
  padding: 0;
}

.hidden-calendar {
  padding: 0 !important;
  /* Retirez le padding des calendriers cachés */
}

.calendar-container {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
}

.day.empty,
.weekend {
  cursor: default;
}

.weekend {
  background-color: #f0f0f0;
}

.day span {
  font-weight: 600;
  font-size: 1.1rem;
  color: #374151;
  margin-bottom: 4px;
  display: block;
}

.day.ca,
.ca {
  background-color: #ffc355;
}

.dispo-item,
.wish-item,
.absence-item,
.planning-item,
.garde-item {
  margin-top: 2px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s;
}

.dispo-item:hover,
.wish-item:hover,
.absence-item:hover,
.planning-item:hover,
.garde-item:hover {
  transform: scale(1.02);
}

/* Style des éléments affichant le poste attribué */
.planning-item {
  background-color: #3b82f6;
  /* Blue-500 */
  color: white;
}

.absence-item,
.day.ca .dispo-item {
  background-color: #f59e0b;
  /* Amber-500 */
  color: #1f2937;
  /* Gray-800 for better contrast */
  border: 1px solid #d97706;
  /* Amber-600 */
}

.garde-item,
.calendar .day .garde-item {
  background-color: #8b5cf6 !important;
  /* Purple-500 */
  color: white !important;
  padding-left: 10px;
  /* More space on left */
}

.wish-item {
  background-color: #f3f4f6;
  /* Gray-100 */
  color: #374151;
  /* Gray-700 */
  border: 1px solid #d1d5db;
  /* Gray-300 */
}

.dispo-item {
  background-color: #ecfdf5;
  /* Green-50 */
  color: #047857;
  /* Green-700 */
  border: 1px solid #a7f3d0;
}

.dispo {
  background-color: #d3ffd3;
}

.dispo-badge {
  margin-top: 2px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-align: center;
}




/* Supprime le texte "Dispo" si une assignation existe */
.planning .dispo {
  display: none;
}


.day .dispo-item,
.day .absence-item {
  margin-top: 10px;
}

.day .delete-btn,
.dispo-item .delete-btn,
.wish-item .delete-btn,
.absence-item .delete-btn,
.garde-item .delete-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  opacity: 0.7;
  transition: opacity 0.2s, background-color 0.2s;
}

.dispo-item .delete-btn,
.wish-item .delete-btn {
  color: #374151;
  background: rgba(55, 65, 81, 0.1);
}

.day .delete-btn:hover,
.dispo-item .delete-btn:hover,
.wish-item .delete-btn:hover,
.absence-item .delete-btn:hover,
.garde-item .delete-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.4);
}

.dispo-item .delete-btn:hover,
.wish-item .delete-btn:hover {
  background: rgba(55, 65, 81, 0.2);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.popup-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  /* Bordures arrondies */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  /* Effet d'ombre */
  max-width: 550px;
  width: 100%;
  text-align: center;
  z-index: 1001;
}

.popup-form h2 {
  margin-top: 0;
  font-size: 24px;
  /* Taille de police */
}

.popup-form label {
  display: block;
  margin: 10px 0;
  /* Espace entre les labels et les inputs */
  font-weight: bold;
  text-align: left;
}

.popup-form input[type="text"],
.popup-form input[type="password"],
.popup-form input[type="date"],
.popup-form select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 20px;
}

.popup-form input[type="radio"] {
  margin-right: 10px;
}

.popup-form .buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* ========================================
   MODERN UI COMPONENTS
   ======================================== */

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  vertical-align: middle;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #2196F3;
}

input:checked+.slider:before {
  transform: translateX(18px);
}

/* Amélioration des inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Style pour les selects dans le tableau admin */
.inline-form select {
  padding: 6px 30px 6px 10px;
  font-size: 13px;
  border-radius: 5px;
}

/* Modal improvements */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h2,
.modal-content h3 {
  margin-top: 0;
  color: #111827;
}

.modal-content h4 {
  color: #374151;
  font-size: 16px;
  margin-bottom: 12px;
}

/* Tables dans les modals */
.modal-content table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.modal-content table thead {
  background-color: #f9fafb;
}

.modal-content table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb;
}

.modal-content table td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.modal-content table tbody tr:last-child td {
  border-bottom: none;
}

.modal-content table tbody tr:hover {
  background-color: #f9fafb;
}

/* Boutons améliorés */
.edit-link,
.add-button {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.1s;
}

.edit-link:hover,
.add-button:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

/* Bouton "Gérer les attributions" en vert */
.btn-open-assignments {
  background-color: #10b981;
}

.btn-open-assignments:hover {
  background-color: #059669;
}

.delete-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.1s;
}

.delete-btn:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

/* Centrer les boutons dans les popups */
.popup-form .buttons,
.modal-content .buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Améliorer l'apparence générale du popup */
.popup-form {
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.popup-form h2 {
  color: #111827;
  margin-bottom: 20px;
}

.popup-form label {
  color: #374151;
  font-size: 14px;
  margin-bottom: 6px;
}

/* User buttons container */
.user-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Messages vides stylisés */
.modal-content p[id$="-empty"] {
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/*
.popup-form .buttons button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
}

.popup-form .buttons button:hover {
  background-color: #555;
}*/

.popup-form .option-form {
  display: none;
  margin-left: 20px;
  text-align: left;
}

.main-option {
  font-weight: bold;
}

.option-form label {
  font-weight: normal;
}

#submit-button,
#cancel-button,
.confirm-btn,
.cancel-btn {
  border: 1px solid #0000003d;
  margin: 1rem;
  box-shadow: 0 3px 20px 0 #0000004d;
  text-align: center;
  padding: 1rem;
  transition: transform .2s;
  border-radius: 5px;
  color: black;
  cursor: pointer;
  /* Ajouter le curseur pointer directement ici */
}

#submit-button,
.confirm-btn {
  background-color: #2bf36b;
}

#cancel-button,
.cancel-btn {
  background-color: #f28282;
}

#submit-button:hover,
#cancel-button:hover,
.confirm-btn:hover,
.cancel-btn:hover {
  transform: scale(1.05);
}


.buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* 1) cacher le marker natif */
details summary {
  list-style: none;
  cursor: pointer;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::marker {
  content: "";
}

/* 2) aligner le titre + préparer la place pour l'icône */
details summary .summary-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  /* espace entre texte et icône */
  margin: 0;
  /* optionnel, selon ton reset CSS */
}

/* 3) icône SVG “chevron” à droite, qui suit currentColor */
details summary .summary-title::after {
  content: "";
  width: 1em;
  height: 1em;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M4 2l4 4-4 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform .2s ease;
}

/* 4) rotation quand <details> est ouvert */
details[open] summary .summary-title::after {
  transform: rotate(90deg);
}

/* 5) accessibilité : focus visible sur le summary */
details summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* 6) préférence utilisateur : pas d’anim si reduced motion */
@media (prefers-reduced-motion: reduce) {
  details summary .summary-title::after {
    transition: none;
  }
}



/* 
.buttons button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #333; 
  color: #fff;
  border: none;
  border-radius: 5px;
}


.buttons button:hover {
  background-color: #555; 
 } */

.garde-item {
  margin-top: 5px;
  background-color: #ffeb3b;
  padding: 2px;
  border-radius: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.login-page,
body.dashboard-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
}


body.login-page .login-container,
body.auth-page .auth-container {
  margin-top: 60px;
  /* Ajoute un espace en haut pour compenser la hauteur de la barre de navigation */
}

body.login-page nav ul,
body.auth-page nav ul,
body.dashboard-page nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.login-page nav ul li,
body.auth-page nav ul li,
body.dashboard-page nav ul li {
  display: inline;
  margin-right: 20px;
}

body.login-page nav ul li a,
body.auth-page nav ul li a,
body.dashboard-page nav ul li a {
  color: #fff;
  text-decoration: none;
}

body.login-page h1,
body.auth-page h1,
body.dashboard-page h1 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
}

body.login-page .login-container,
body.auth-page .auth-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

body.login-page .login-container form,
body.auth-page .auth-container form {
  display: flex;
  flex-direction: column;
}

body.login-page .login-container label,
body.auth-page .auth-container label {
  margin-bottom: 10px;
  text-align: left;
  font-weight: bold;
}

body.login-page .login-container input[type="text"],
body.login-page .login-container input[type="password"],
body.auth-page .auth-container input[type="text"],
body.auth-page .auth-container input[type="password"] {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
  width: 100%;
}

body.auth-page .auth-container select {
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
  width: 100%;
  font-size: 16px;
}

body.login-page .login-container button,
body.auth-page .auth-container button {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

body.login-page .login-container button:hover,
body.auth-page .auth-container button:hover {
  background-color: #555;
}

body.login-page .login-container .register-link,
body.auth-page .auth-container .register-link,
body.auth-page .auth-container .login-link {
  margin-top: 20px;
  display: block;
  color: #333;
  text-decoration: none;
}

body.login-page .login-container .register-link:hover,
body.auth-page .auth-container .register-link:hover,
body.auth-page .auth-container .login-link:hover {
  text-decoration: underline;
}

.password-toggle {
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 0 !important;
  font-size: 1.2em;
  line-height: 1;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.password-container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.password-container input {
  width: 100%;
  padding-right: 30px;
  box-sizing: border-box;
}

.auth-page nav {
  background-color: #0b415a;
  width: 100%;
  position: fixed;
  /* Changed from absolute to fixed */
  top: 0;
  left: 0;
  /* Ensure it starts from left */
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 1000;
  /* Ensure it stays on top */
}



/* Content pages (help, legal, privacy) */
.auth-content-page {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  margin-top: 20px;
  /* Add extra margin from the top padding of auth-main */
}

.page-title {
  font-size: 1.5em;
  font-weight: bold;
}

/* Auth page layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* Changed from center to prevent overlap */
  padding: 20px;
  padding-top: 120px;
  /* Increased padding */
}

/* Auth header (for login page) */
.auth-header {
  text-align: center;
  margin-bottom: 30px;
  max-width: 600px;
  margin-top: auto;
  /* Push to center */
}

.auth-container {
  margin-bottom: auto;
  /* Push to center */
}

.auth-header h1 {
  margin-bottom: 10px;
  font-size: 1.8em;
  color: #333;
}

.auth-description {
  color: #666;
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 10px;
}

.auth-org {
  color: #0b415a;
  font-size: 0.9em;
  font-weight: 600;
}

/* Auth footer */
.auth-footer {
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  padding: 20px;
  text-align: center;
  font-size: 0.85em;
  color: #666;
  width: 100%;
  margin-top: auto;
}

.auth-footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  color: #0b415a;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.2s;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #083344;
}

.footer-links span {
  color: #999;
}

.footer-contact {
  margin: 10px 0;
}

.footer-contact a {
  color: #0b415a;
  text-decoration: none;
}

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

.footer-copyright {
  color: #888;
  margin-top: 10px;
  font-size: 0.9em;
}

/* Forgot password link */
.forgot-link {
  margin-top: 10px;
  text-align: center;
}

.forgot-link a {
  color: #666;
  font-size: 0.9em;
  text-decoration: none;
}

.forgot-link a:hover {
  text-decoration: underline;
  color: #333;
}

/* Content pages (help, legal, privacy) */
.auth-content-page {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.auth-content-page h1 {
  color: #0b415a;
  font-size: 2em;
  margin-bottom: 20px;
  border-bottom: 3px solid #0b415a;
  padding-bottom: 10px;
}

.auth-content-page h2 {
  color: #083344;
  font-size: 1.4em;
  margin-top: 30px;
  margin-bottom: 15px;
}

.auth-content-page p {
  line-height: 1.6;
  color: #333;
  margin-bottom: 15px;
}

.auth-content-page ul,
.auth-content-page ol {
  line-height: 1.8;
  color: #333;
  margin-bottom: 15px;
  padding-left: 30px;
}

.auth-content-page li {
  margin-bottom: 8px;
}

.auth-content-page a {
  color: #0b415a;
  text-decoration: none;
}

.auth-content-page a:hover {
  text-decoration: underline;
}

.help-section,
.legal-section,
.privacy-section {
  margin-bottom: 30px;
}

.contact-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  border-left: 4px solid #0b415a;
}

.back-to-login {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.back-to-login .btn {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, #0d4d69 0%, #0b415a 50%, #083344 100%);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.back-to-login .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 65, 90, 0.3);
}

/* Responsive adjustments for content pages */
@media (max-width: 768px) {
  .auth-content-page {
    padding: 20px;
    margin: 10px;
  }

  .auth-content-page h1 {
    font-size: 1.5em;
  }

  .auth-content-page h2 {
    font-size: 1.2em;
  }

  .auth-header h1 {
    font-size: 1.5em;
  }
}



.dispos_table {
  width: 90%;
  border-collapse: collapse;
  margin: 20px auto;
  font-size: 18px;
  text-align: center;
}

.dispos_table th,
.dispos_table td {
  border: 1px solid #000;
  padding: 8px;
}

.dispos_table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

.dispos_table tr:not(.weekend):hover {
  background-color: #f1f1f1;
}

.dispos_table .weekend {
  background-color: #a6a4a4;
}

/* Responsive Table for User Planning */
@media (max-width: 768px) {
  .dispos_table {
    display: block;
    width: 100%;
  }

  .dispos_table thead {
    display: none;
  }

  .dispos_table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .dispos_table tr {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    padding: 12px;
  }

  .dispos_table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    text-align: right;
  }

  .dispos_table td:last-child {
    border-bottom: none;
  }

  .dispos_table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    text-align: left;
    margin-right: 12px;
  }

  .dispos_table tr.weekend {
    background-color: #f9fafb;
  }
}

/* Retirer les bulles de la liste */
/* Conteneur principal pour la liste */
.absence-list {
  max-width: 90%;
  /* Limite la largeur de la liste */
  margin: 0 auto;
  /* Centre la liste horizontalement */
  padding: 20px;
  /* Ajoute un espacement interne autour de la liste */
  background-color: #f9f9f9;
  /* Couleur de fond pour différencier du reste */
  border-radius: 10px;
  /* Arrondit les coins */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  /* Ajoute une ombre légère */
}

/* Style pour chaque absence */
.absence-planner-item {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 15px;
  /* Ajoute un espace entre les items */
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.absence-reason {
  font-style: italic;
  color: #555;
}

.buttons-container {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  /* Aligne les boutons à droite */
}

.inline-form {
  display: inline;
}

.delete-btn {
  background-color: #f28282;
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.delete-btn:hover {
  background-color: #e57373;
}

.edit-link {
  background-color: #2bf36b;
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
}

.edit-link:hover {
  background-color: #27e060;
}


/* PAGE ADMIN / MODAL */
/* Conteneur de bloc de rôle : centré et aéré */
.role-block {
  width: 90%;
  margin: 24px auto;
}

/* Sous-tableaux : seulement des lignes horizontales */
.mini-table {
  width: 100%;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  padding: 8px;
  text-align: left;
}

/* Lignes horizontales uniquement */
.mini-table thead th {
  border-bottom: 1px solid #ddd;
}

.mini-table tbody tr+tr td {
  border-top: 1px solid #eee;
}

th[colspan="4"] {
  padding: 1rem 0rem 0 0;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

/* Conteneur des boutons */
.user-buttons {
  display: flex;
  flex-wrap: wrap;
  /* Les boutons passent à la ligne si nécessaire */
  gap: 10px;
  /* Espacement entre les boutons */
  justify-content: center;
  /* Aligner les boutons au centre */
  margin-bottom: 20px;
  /* Espacement en bas */
}

/* Boutons individuels */
.user-buttons .add-button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  /* Empêche les boutons de se casser */
}

/* Effet au survol */
.user-buttons .add-button:hover {
  background-color: #0056b3;
}

/* Styles spécifiques à la page de planning */
.planning-page {

  /* Conteneur principal */
  .container {
    width: 90%;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }

  .title {
    text-align: center;
    margin-bottom: 20px;
  }

  .week-navigation {
    text-align: center;
    margin: 10px 0 20px;
  }

  .week-navigation .modern-btn {
    min-width: 220px;
    text-align: center;
    justify-content: center;
  }

  .button {
    display: inline-block;
    padding: 8px 12px;
    color: #fff;
    background-color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    max-width: 40%;
  }

  .button:hover {
    background-color: #0056b3;
  }

  .table-responsive {
    /* width: 100vw; */
    /* Assure que le conteneur prend toute la largeur visible */
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }


  /* Tableau du planning - Modern Styling */
  .planning-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .planning-table th,
  .planning-table td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    text-align: center;
  }

  .planning-table th {
    background-color: #667eea;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: sticky;
    top: -1px;
    border-bottom: 2px solid #5568d3;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    z-index: 10;
  }

  .planning-table th:first-child {
    border-top-left-radius: 10px;
  }

  .planning-table th:last-child {
    border-top-right-radius: 10px;
  }

  .planning-table .poste {
    font-weight: 600;
    text-align: left;
    background-color: #f9fafb;
    color: #374151;
    border-right: 2px solid #e5e7eb;
  }

  .planning-table tbody tr {
    transition: all 0.2s ease;
  }

  /* Utiliser box-shadow inset pour créer un effet d'overlay sans affecter le layout */
  .planning-table tbody tr:hover {
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.03);
  }

  .badge {
    display: inline-block;
    padding: 6px 10px;
    margin: 3px 3px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }

  .badge-desiderata,
  .status-published {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  }

  .status-draft {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
  }

  .badge-absence {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  }

  .badge-garde {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 6px 12px;
    margin: 2px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  }

  .souhaits-info,
  .dispo-info {
    font-size: 12px;
    color: #667eea;
    margin-top: 5px;
    font-weight: 600;
  }

  /* Lignes cliquables (toutes les colonnes sauf la première) */
  .clickable-row td:not(:first-child) {
    cursor: pointer;
    transition: transform 0.1s ease;
  }

  /* Hover sur cellule cliquable - utiliser box-shadow pour ne pas écraser la couleur de fond */
  .clickable-row td:not(:first-child):hover {
    box-shadow: inset 0 0 0 2000px rgba(102, 126, 234, 0.08);
    transform: scale(1.01);
  }

  /* Responsive */
  @media (max-width: 768px) {

    .planning-table th,
    .planning-table td {
      padding: 8px;
    }

    .badge {
      font-size: 0.75rem;
      padding: 4px 8px;
    }
  }
}

.monthly-summary {
  padding: 3rem;
}

/* Modern Summary Table */
.summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.summary-table th,
.summary-table td {
  border: 1px solid #e5e7eb;
  padding: 12px 16px;
}

.summary-table th {
  background-color: #667eea;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-bottom: 2px solid #5568d3;
  user-select: none;
  cursor: pointer;
}

.summary-table th:first-child {
  text-align: left;
  border-top-left-radius: 10px;
}

.summary-table th:last-child {
  border-top-right-radius: 10px;
}

.summary-table td {
  background-color: #fff;
  transition: background-color 0.2s ease;
}

.summary-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: #374151;
  background-color: #f9fafb;
  border-right: 2px solid #e5e7eb;
}

.summary-table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.summary-table tbody tr:nth-child(even) td:not(:first-child) {
  background-color: #ffffff;
}

.summary-table tbody tr:hover {
  background-color: #f3f4f6;
}

.summary-table tbody tr:hover td {
  background-color: rgba(102, 126, 234, 0.05);
}

.summary-table tbody tr:hover td:first-child {
  background-color: #f3f4f6;
}

/* Highlight non-zero values */
.summary-table td:not(:first-child) {
  font-weight: 500;
  color: #6b7280;
}

.summary-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 10px;
}

.summary-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}


/*/////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////*/
/*//////////////////////VUE MOBILES////////////////////*/
/*/////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////*/


/* Adaptation mobile pour la page d'authentification */
/* Optimisation pour le conteneur d'authentification sur mobile */
@media (max-width: 768px) {

  /* Conteneur principal sans débordement */
  body.auth-page .auth-container {
    padding: 20px;
    margin: 10px;
    max-width: 100%;
    width: calc(100% - 20px);
    /* Compense le padding pour éviter le débordement */
    box-sizing: border-box;
    box-shadow: none;
    border-radius: 0;
  }

  /* Champs de formulaire */
  body.auth-page .auth-container input[type="text"],
  body.auth-page .auth-container input[type="password"] {
    padding: 12px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  /* Boutons plus grands et faciles à cliquer */
  body.auth-page .auth-container button {
    padding: 12px;
    font-size: 1.1rem;
    width: 100%;
    box-sizing: border-box;
  }

  /* Liens ajustés pour le mobile */
  body.auth-page .auth-container .register-link {
    font-size: 1rem;
    margin-top: 15px;
  }

  /* Ajustement de la navigation */
  body.auth-page nav {
    height: 50px;
  }

  .page-title {
    font-size: 1.2rem;
  }

  /* Ajustement des containers de mots de passe */
  .password-container {
    margin-bottom: 15px;
    width: 100%;
  }

  /* Ajustement du bouton de visibilité de mot de passe */
  .password-toggle {
    right: 5px;
    font-size: 1rem;
  }
}


/* Optimisation pour les très petits appareils */
@media (max-width: 480px) {

  body.auth-page .auth-container {
    padding: 15px;
  }

  body.auth-page h1 {
    font-size: 1.2rem;
  }

  body.auth-page .auth-container button {
    padding: 10px;
    font-size: 1rem;
  }

  .password-toggle {
    font-size: 0.9rem;
  }
}


/*NAVBAR*/

/* ========================== */
/* Navbar mobile en mode burger */
/* ========================== */

/* Cacher le menu burger en desktop */
/* ========================== */
/* Style de base pour le menu burger */
/* ========================== */
.burger-menu {
  display: none;
  cursor: pointer;
  font-size: 2rem;
  color: white;
  padding: 10px 15px;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.burger-menu:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.nav-menu {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.nav-menu ul {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu a {
  text-decoration: none;
  color: white;
  padding: 10px 15px;
  font-size: 1.2rem;
  border-radius: 5px;
  transition: background-color .3s;
}

.nav-menu a:hover {
  background-color: transparent !important;
}

.menu-text {
  display: none
}

.icon {
  margin-right: 5px
}

/* Navbar mobile en mode burger */
@media (max-width: 768px) {
  .nav-bar {
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
  }

  .burger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    padding: 8px;
    margin: 0;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }

  .burger-menu:hover {
    background-color: rgba(255, 255, 255, 0.15);
  }

  .burger-menu .nav-icon {
    width: 28px;
    height: 28px;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(11, 65, 90, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
    gap: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu ul {
    flex-direction: column;
    width: 100%;
    gap: 2px;
  }

  .nav-menu li {
    width: 100%;
    text-align: left;
  }

  .nav-menu a {
    flex-direction: row;
    /* Horizontal layout for mobile items */
    justify-content: flex-start;
    padding: 12px 25px;
    width: 100%;
    border-radius: 0;
    font-size: 1rem;
    gap: 15px;
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.9);
    border: none;
  }

  .nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
    box-shadow: none;
  }

  .nav-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left: 4px solid #667eea;
    transform: none;
    box-shadow: none;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .menu-text {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
  }
}

/* Empêcher les débordements globaux */
html,
body {
  overflow-x: hidden;
}


/* ========================== */
/* Vue Mobile en Liste */
/* ========================== */
@media (max-width: 768px) {

  .calendar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
  }

  .calendar-list .day {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
    height: auto;
  }

  .calendar-list .day:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }

  .mobile-date-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    text-transform: capitalize;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 8px;
    margin-bottom: 4px;
  }

  .entries-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .calendar-list .day.weekend {
    background-color: #f9fafb;
    border-color: #e5e7eb;
  }

  .calendar-list .day.weekend .mobile-date-title {
    color: #6b7280;
  }

  /* Badges in list view */
  .calendar-list .dispo-badge,
  .calendar-list .absence-item,
  .calendar-list .garde-item,
  .calendar-list .wish-item,
  .calendar-list .planning-item {
    padding: 8px 12px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Dashboard Header Mobile */
  .tabs {
    flex-direction: row;
    gap: 10px !important;
    flex-wrap: wrap;
  }

  .tabs h2 {
    font-size: 1.2rem;
    min-width: auto !important;
    width: 100%;
    order: -1;
    margin-bottom: 10px !important;
  }

  .tabs button {
    flex: 1;
    font-size: 0.9rem;
    padding: 8px 12px !important;
  }

  /* Popup Mobile */
  .popup-form {
    width: 90% !important;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px !important;
  }
}

/* ========================================
   MODERN UI COMPONENTS
   Extracted from preferences page for reusability
   ======================================== */

/* Modern Page Background */
.modern-page-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar overrides for auth pages */
.auth-layout .nav-bar {
  justify-content: center;
  background: #0b415a;
  /* Restored visible background */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-bottom: none;
  position: absolute;
  /* Absolute to overlay on gradient, or fixed if needed */
}

.auth-layout .nav-bar ul {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.auth-layout .page-title {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Modern Container */
.modern-container {
  max-width: 1400px;
  /* Increased from 900px for better desktop usage */
  margin: 30px auto;
  padding: 0 20px;
}

/* Modern Header */
.modern-header {
  text-align: center;
  color: white;
  margin: 0 auto 30px auto;
  /* Centered block with bottom margin */
  animation: slideDown 0.6s ease;
  width: 100%;
  max-width: 800px;
}

.modern-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.modern-header p {
  font-size: 1rem;
  opacity: 0.95;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Specific styling for content pages (Help, Legal, Privacy) */
.auth-main-content {
  padding-top: 80px !important;
  /* Reduced top padding */
}

.modern-text-content {
  text-align: left;
  color: #2d3748;
  line-height: 1.7;
  font-size: 1.05rem;
}

.modern-text-content h2 {
  color: #1a202c;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.modern-text-content p,
.modern-text-content ul,
.modern-text-content ol {
  margin-bottom: 1.2em;
}

.modern-text-content ul,
.modern-text-content ol {
  padding-left: 25px;
}

.modern-text-content li {
  margin-bottom: 0.5em;
}

.modern-text-content a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.modern-text-content a:hover {
  text-decoration: underline;
}

.modern-text-content a.modern-btn {
  color: white !important;
  text-decoration: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Tabs */
.modern-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.modern-tab-button {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.modern-tab-button:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.modern-tab-button.active {
  background: white;
  color: #667eea;
  border-color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Modern Tab Content */
.modern-tab-content {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.modern-tab-content.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Card */
.modern-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.modern-card h2 {
  color: #2d3748;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #667eea;
  display: inline-block;
}

/* Modern Form Group */
.modern-form-group {
  margin-bottom: 20px;
}

.modern-form-group label {
  display: block;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

/* Modern Input */
.modern-input,
.modern-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: all 0.3s ease;
  background: #f7fafc;
  box-sizing: border-box;
}

.modern-input:focus,
.modern-select:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.modern-input:hover:not(:focus),
.modern-select:hover:not(:focus) {
  border-color: #cbd5e0;
}

.modern-input::placeholder {
  color: #a0aec0;
}

/* Modern Button */
.modern-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.modern-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.modern-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* Modern Button Variants */
.modern-btn-success {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.modern-btn-success:hover {
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.5);
}

.modern-btn-danger {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
  box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
}

.modern-btn-danger:hover {
  box-shadow: 0 8px 25px rgba(245, 101, 101, 0.5);
}

/* Modern Alert */
.modern-alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.modern-alert::before {
  font-size: 1.2em;
  flex-shrink: 0;
}

.modern-alert-danger {
  background: #fee;
  color: #c53030;
  border: 2px solid #fc8181;
}

.modern-alert-danger::before {
  content: '⚠';
}

.modern-alert-success {
  background: #f0fdf4;
  color: #15803d;
  border: 2px solid #86efac;
}

.modern-alert-success::before {
  content: '✓';
}

/* Modern Table */
.modern-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.modern-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.modern-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.modern-table tbody tr:hover {
  background: #f7fafc;
}

.modern-table tbody tr:last-child td {
  border-bottom: none;
}

/* Modern Table Input */
.modern-table input[type="text"],
.modern-table input[type="number"],
.modern-table input[type="color"],
.modern-table select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: white;
  box-sizing: border-box;
}

.modern-table input:focus,
.modern-table select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.modern-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Modern Table Container for width limiting */
.modern-table-container {
  overflow-x: auto;
  margin: 0 auto;
  max-width: fit-content;
}

/* Modern card with table container should also limit width */
.modern-card:has(.modern-table-container) {
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design for Modern Components */
@media (max-width: 768px) {
  .modern-container {
    padding: 0 15px;
    margin: 20px auto;
  }

  .modern-header h1 {
    font-size: 1.75rem;
  }

  .modern-card {
    padding: 20px;
  }

  .modern-tabs {
    gap: 8px;
  }

  .modern-tab-button {
    padding: 10px 16px;
    font-size: 13px;
  }

  .modern-table {
    font-size: 0.85rem;
  }

  .modern-table th,
  .modern-table td {
    padding: 10px 8px;
  }
}

/* ========================================
   MODAL SYSTEM
   Modern modal dialogs for CRUD operations
   ======================================== */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

/* Modal Container */
.modal-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Modal Header */
.modal-header {
  padding: 24px 30px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
  padding: 30px;
}

/* Modal Footer */
.modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f7fafc;
  border-radius: 0 0 16px 16px;
}

.modal-footer .modern-btn {
  margin: 0;
}

/* Modal Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Responsive */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 15px 20px;
  }
}

/* Table action buttons group */
.table-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.table-actions .modern-btn {
  font-size: 0.85rem;
  padding: 8px 14px;
}

/* ==================== ADMIN USERS PAGE STYLES ==================== */

/* Table group headers */
.table-group-header th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  padding: 12px 15px;
  border: none;
}

/* Inline select for roles and sectors */
.modern-select-inline {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
  outline: none;
}

.modern-select-inline:hover {
  border-color: #667eea;
}

.modern-select-inline:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Small button variant */
.modern-btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Warning button (for password reset) */
.modern-btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.modern-btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
}

/* Inline forms */
.inline-form {
  display: inline-block;
  margin: 0;
}

/* User table rows hover effect */
.modern-table tbody tr[data-user-sector]:hover {
  background-color: #f7fafc;
}

/* Modal adjustments for confirmation */
#confirmModal .modal-body p {
  color: #2d3748;
  line-height: 1.6;
}


/* ==================== USERS_NEW.EJS SPECIFIC STYLES ==================== */

/* Role blocks styling */
.role-block {
  margin-bottom: 30px;
}

.role-block h3 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 15px;
  margin: 0 0 -1px 0;
  border-radius: 8px 8px 0 0;
  font-size: 1.1rem;
}

/* Mini table conversion to modern table */
.mini-table.users-subtable {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mini-table.users-subtable thead tr {
  background: #f7fafc;
}

.mini-table.users-subtable thead th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #4a5568;
  border-bottom: 2px solid #e2e8f0;
  font-size: 0.9rem;
}

.mini-table.users-subtable tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

.mini-table.users-subtable tbody tr:hover {
  background-color: #f7fafc;
}

.mini-table.users-subtable tbody tr:last-child td {
  border-bottom: none;
}

/* User buttons in tables */
.mini-table button.edit-link {
  padding: 6px 12px;
  margin: 2px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.mini-table button.edit-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mini-table button.btn-open-user-info {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.mini-table button.btn-open-assignments {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mini-table button.btn-open-reset {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.mini-table button.delete-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Toggle switch modern styling */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e0;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:checked+.slider:before {
  transform: translateX(26px);
}

/* Add user button */
.add-button {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* User buttons container */
.user-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modals modernization */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal.active,
.modal[style*="display: flex"] {
  display: flex !important;
}

.modal .modal-content,
.modal .popup-form {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal h2,
.modal h3 {
  color: #2d3748;
  margin-top: 0;
}

.modal label {
  display: block;
  margin: 15px 0 5px 0;
  color: #4a5568;
  font-weight: 600;
  font-size: 0.95rem;
}

.modal input[type="text"],
.modal input[type="email"],
.modal input[type="date"],
.modal select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.modal input:focus,
.modal select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal .buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}

.modal .confirm-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.modal .confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modal .cancel-btn {
  background: #f7fafc;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.modal .cancel-btn:hover {
  background: #e2e8f0;
}

/* Disabled users section */
section[style*="border-top"] {
  background: #f7fafc;
  padding: 20px;
  border-radius: 12px;
  margin-top: 40px;
}

/* Modern Checkbox Styles */
.modern-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modern-checkbox-label {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-weight: 500;
  color: #4a5568;
  line-height: 1.5;
  /* Ensure consistent line height */
}

.modern-checkbox-label span {
  margin-top: 1px;
  /* Micro-adjustment for visual centering */
}

.modern-checkbox-label:hover {
  background-color: #edf2f7;
  border-color: #cbd5e0;
}

.modern-checkbox-label:has(input:checked) {
  background-color: #ebf8ff;
  border-color: #4299e1;
  color: #2b6cb0;
}

.modern-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  /* Slightly larger for touch */
  height: 24px;
  border: 2px solid #cbd5e0;
  border-radius: 6px;
  margin: 0 12px 0 0;
  /* Explicit margin reset */
  position: relative;
  background-color: white;
  transition: all 0.2s ease;
  flex-shrink: 0;
  vertical-align: middle;
}

.modern-checkbox:checked {
  background-color: #4299e1;
  border-color: #4299e1;
}

.modern-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.modern-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* Modern Radio Styles */
.modern-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modern-radio-label {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-weight: 500;
  color: #4a5568;
  width: 100%;
  /* Ensure full width for main options if needed, or let flex handle it */
  box-sizing: border-box;
  line-height: 1.5;
  /* Ensure consistent line height */
}

.modern-radio-label span {
  margin-top: 1px;
  /* Micro-adjustment for visual centering */
}

.modern-radio-label:hover {
  background-color: #edf2f7;
  border-color: #cbd5e0;
}

.modern-radio-label:has(input:checked) {
  background-color: #ebf8ff;
  border-color: #4299e1;
  color: #2b6cb0;
}

.modern-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  margin: 0 12px 0 0;
  /* Explicit margin reset */
  position: relative;
  background-color: white;
  transition: all 0.2s ease;
  flex-shrink: 0;
  vertical-align: middle;
}

.modern-radio:checked {
  border-color: #4299e1;
}

.modern-radio:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 5px;
  width: 10px;
  height: 10px;
  background-color: #4299e1;
  border-radius: 50%;
}

.modern-radio:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* ========================================
   MOBILE PLANNING TABLE (Scrollable View)
   ======================================== */
@media (max-width: 768px) {

  /* Fix container overflow */
  .modern-container {
    width: 100%;
    padding: 0 10px;
    /* Removed overflow-x: hidden to allow sticky to work */
  }

  .modern-card {
    width: 100%;
    padding: 15px 10px;
    box-sizing: border-box;
  }

  /* Ensure the container allows scrolling */
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  /* Force table to keep its structure */
  .planning-table,
  .summary-table {
    min-width: 800px;
    /* Force width to trigger scroll */
    width: auto;
    display: table;
    /* Restore table display */
    border-collapse: separate;
  }

  /* Override base overflow hidden for planning table */
  .planning-table,
  .summary-table {
    overflow: visible !important;
  }

  .planning-table thead,
  .summary-table thead {
    display: table-header-group;
    /* Restore header */
  }

  .planning-table tbody,
  .summary-table tbody {
    display: table-row-group;
    /* Restore body */
  }

  .planning-table tr,
  .summary-table tr {
    display: table-row;
    /* Restore rows */
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .planning-table th,
  .planning-table td,
  .summary-table th,
  .summary-table td {
    display: table-cell;
    /* Restore cells */
    white-space: nowrap;
    /* Prevent wrapping */
    vertical-align: middle;
  }

  /* Sticky first column (Postes & Users) */
  .planning-table th:first-child,
  .planning-table td:first-child,
  .summary-table th:first-child,
  .summary-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 20;
    background-color: #f9fafb;
    border-right: 2px solid #e5e7eb;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Different widths for different tables */
  .planning-table th:first-child,
  .planning-table td:first-child {
    max-width: 120px;
  }

  .summary-table th:first-child,
  .summary-table td:first-child {
    max-width: 50px;
    /* Narrower for user names */
  }

  /* Header specific sticky styles */
  .planning-table th:first-child,
  .summary-table th:first-child {
    z-index: 30;
    /* Higher than other headers */
    background-color: #667eea;
    /* Match header color */
    color: white;
  }

  /* Adjust padding for mobile */
  .planning-table th,
  .planning-table td,
  .summary-table th,
  .summary-table td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  /* Hide data-labels since we are using headers */
  .planning-table td:not(.poste)::before {
    display: none;
  }

  /* Week navigation buttons equal width on mobile */
  .week-navigation .modern-btn {
    min-width: 150px;
    flex: 1;
    max-width: 45%;
  }
}