html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  background: #19191c;
  color: #eee;
  font-size: 1vw;
  box-sizing: border-box;
}

#main-container {
  width: 100vw;
  min-height: 100vh;
  min-width: 100vw;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

.logo-top {
  margin: 2vw auto 1vw auto;
  width: 22vw;
  min-width: 190px;
  max-width: 350px;
}
.logo-top img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.form-box {
  background: #232328;
  border-radius: 0.9vw;
  box-shadow: 0 0 2vw #0e0e20c5;
  padding: 2vw 2.6vw;
  margin: 3vw auto 2vw auto;
  min-width: 280px;
  max-width: 480px;
  width: 30vw;
  display: flex;
  flex-direction: column;
  gap: 1.7vw;
}

input, select {
  font-size: 1vw;
  border: none;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  border-radius: 0.46vw;
  margin-bottom: 1vw;
  padding: 0.9vw 1vw;
  background: #151619;
  color: #fff;
  transition: border 0.2s;
}

input:focus, select:focus {
  border: 0.15vw solid #2045fe;
}

/* Amélioration affichage cases à cocher Responsabilités */
.grade-checkboxes {
  margin: 1vw 0 1.3vw 0.5vw;
  display: flex;
  flex-direction: column;
  gap: 1vw;
}
.grade-checkboxes > label {
  display: flex;
  align-items: center;
  gap: 0.7vw;
  font-size:1.08vw;
}
#newgraderespbloc {
  display: none;
  margin-left: 1.7vw;
  margin-top: 0.6vw;
}
#newgraderespbloc label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.9vw;
  margin-bottom: 0.55vw;
  font-size:1.04vw;
}
.grade-checkboxes input[type="checkbox"] {
  width: 1.03vw;
  height: 1.03vw;
  accent-color: #2045fe;
  margin: 0;
}
#newgraderespbloc input[type="checkbox"] {
  margin-left: 0;
}

.switch-link {
  color: #408aff;
  cursor: pointer;
  text-align: center;
  margin-top: 1.4vw;
  font-size: 1.1vw;
  text-decoration: underline;
}

.benbox, .dashboard {
  width: 95vw;
  max-width: 1070px;
  background: #222229;
  margin: 3vw auto 0 auto;
  border-radius: 1.1vw;
  box-shadow: 0 0 2vw #171728a8;
  padding: 2.4vw 2vw 3vw 2vw;
  display: flex;
  flex-direction: column;
  gap: 2vw;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.27vw;
  font-weight: 700;
  letter-spacing: 0.026vw;
}

.dash-header-btns { 
  display:flex; gap:1vw;
}

.dashboard-user {
  position: absolute;
  top: 3vw;
  right: 3vw;
  font-size: 1.13vw;
  color: #efefef;
  text-shadow: 0 0 0.3vw #212;
}
.dash-mainrow {
  display: flex;
  gap: 2vw;
  width: 100%;
}
.dash-infos {
  flex: 1; color: #fff; margin-right:2vw;
  min-width:180px;
}
.dash-actions {
  flex: 2;
  min-width: 320px;
}
.input-field, .select-field {
  background: #161616!important;
  color:white;
  padding:0.45vw 1vw;
  font-size:1.05vw;
  border-radius:0.5vw;
  border:1px solid #585858;
  margin-bottom:1vh;
}
.btn-primary {
  background:#0413fe;
  color:#fff;
  border:none;
  border-radius:9px;
  padding:0.72vw 1.21vw;
  font-weight:bold;
  margin:0.4vw 0;
  font-size:1.12vw;
  cursor:pointer;
  transition:0.13s;
  width: 100%;
}
.btn-primary:hover {
  opacity:0.87;
  background: #2339fd;
}
.btn-danger {
  background: #911116;
  color: #fff;
  border-radius: 0.6vw;
  border: none;
  padding: 0.5vw 1vw;
  font-weight: bold;
  font-size: 1vw;
  cursor: pointer;
}
.dash-footer {
  margin:2.3vw 0 0.9vw 0;
  padding-top:1vw;
  border-top:1px solid #899;
  opacity:.85;
  display:flex;
  gap:2vw;
  align-items:center;
  font-size:1.18vw;
  font-weight:bold;
}
.facture-total { color:#fed661;font-size:1.3vw;font-weight:bold; margin:0.7vw 0; }

.admin .admingrid {
  display: flex;
  gap: 2vw;
  flex-wrap: wrap;
  justify-content: center;
}
.admin .info-block {
  background: #232328;
  border-radius: .8vw;
  padding: 1.3vw 2vw 1.4vw 1.6vw;
  margin-bottom: 1.1vw;
  min-width: 220px;
  min-height: 14vw;
  box-shadow: 0 0.1vw 1vw #10102438;
  max-width:290px;
}

.admin-grades-list {margin-bottom:0.8vw;}
.grade-row {display:flex;align-items:center;gap:0.7vw;font-size:1vw;margin-bottom:0.35vw;}
.btn-grade,.btn-danger{color:#fff;background:#911116; border:none; border-radius:6px; padding:0.09vw 0.6vw;font-weight:bold; font-size:1vw; cursor:pointer;}
.popupBackdrop{position:fixed;top:0;left:0;right:0;bottom:0;background:#0008;z-index:10;}
.popupBox{position:fixed;left:calc(50% - 232px);top:15vw;background:#232328;z-index:12;padding:2vw;border-radius:12px;box-shadow:0 0 28px #111;}

@media (max-width: 900px) {
  .benbox, .dashboard {padding: 1vw 0.5vw;}
  .dashboard-header{font-size:2vw;}
  .main-section { flex-direction: column; }
  .info-block {max-width:none; margin-right:0;}
  .admin .admingrid{flex-direction:column;}
}
@media (max-width: 650px) {
  .benbox, .dashboard {width:99vw;}
  .dashboard-header{font-size:2.6vw;}
  .admingrid, .admin .admingrid {flex-direction:column;}
  .info-block {min-width:0; max-width:none;}
  .custom-select-client{font-size:2vw;}
}

.msg-error {
  color: #ff4e4e;
  font-size: 1.1vw;
  margin-top: 0.7vw;
}

.custom-select-client{
  position:relative; 
  background: #181828;
  border: 1px solid #2c2c47;
  border-radius: 0.6vw;
  min-height: 2.2vw;
  padding: 0.5vw 0.9vw;
  color: #fff;
  font-size: 1.08vw;
  cursor: pointer;
  outline: none;
  margin-bottom: 1vw;
}
.custom-select-client:focus {
  border: 1.5px solid #3c62f0;
}
.custom-dropdown-list {
  position:absolute;
  left:0; right:0; top:2.3vw; z-index:50;
  background: #262655;
  color: #fff;
  border-radius: 0 0 0.6vw 0.6vw;
  box-shadow: 0 6px 20px #191940b3;
  max-height: 15vw;
  overflow-y: auto;
  min-width:98%;
  padding: 0.23vw 0.33vw 0.7vw 0.33vw;
  display:none;
  border: 1px solid #243096;
}
.custom-dropdown-list input{padding:0.5vw 1vw;}
.dropdown-client-wrapper {
  display: block;
  width: 100%;
}

/* Styles pour la gestion des employés */
.employee-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5vw;
}

.employee-detail-row span:first-child {
    font-weight: bold;
    margin-right: 1vw;
}

/* Styles pour la popup de licenciement */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: #fff;
    padding: 2vw;
    border-radius: 0.5vw;
    max-width: 25vw;
    text-align: center;
}

.popup-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5vw;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.5vw 1vw;
    cursor: pointer;
    border-radius: 0.3vw;
}

.btn-danger:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c0392b;
}

.btn-small {
    font-size: 0.8vw;
    padding: 0.2vw 0.4vw;
}

.historique-table {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 1vw;
}

.historique-table table {
  min-width: 100%;
  border-collapse: collapse;
}

.historique-table th, 
.historique-table td {
  padding: 0.7vw;
  text-align: left;
}

.historique-table th {
  background: #1e1e30;
  position: sticky;
  top: 0;
}

.historique-table tbody tr:nth-child(odd) {
  background: #26262f;
}

.historique-table tbody tr:hover {
  background: #2a2a3a;
}

.timezone-select {
    background: #1a1a2a;
    color: white;
    border: 1px solid #333;
    border-radius: 0.4vw;
    font-size: 0.9vw;
    margin-right: 1vw;
}

#clearHistoryPopup .popup-content {
    background: #fff;
    color: #333;
    padding: 2vw;
    border-radius: 0.7vw;
    min-width: 25vw;
}
