:root {
  color-scheme: dark !important;
}

.cards-Row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

button {
  width: 150px;
  height: 50px;
  color: white;
  background-color: #C0392B;
  border: 2px solid black;
  border-radius: 10px;
  cursor: pointer;
}

#createSessionButton {
  width: 150px;
  height: 50px;
  color: white;
  background-color: #C0392B;
  border: 2px solid black;
  border-radius: 10px;
  cursor: pointer;
}

.create-box {
  display: flex;
  flex-direction: column;
  background-color: aqua;
  padding: 30px;
  border: 1px solid aqua;
  border-radius: 8px;
  width: 370px;
}


h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 35px;
  font-family: "Titillium Web", Arial, sans-serif !important;
  color: white;
  padding-bottom: 30px;
  margin: 0;
}

p{
  font-family: "Open Sans", Arial, sans-serif !important;
  font-size: 16px;
  color:grey;
}

p.title {
  font-family: 'Titillium Web', Arial, sans-serif !important;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  color: black;
  font-family: sans-serif;
  background-color: #252525;
  text-decoration: none;
}

.password-recovery,
#password-recovery {
  color: #fff !important;
  font-family: 'Open Sans', Arial, sans-serif !important;
  text-decoration: none !important;
  font-size: 14px;
  margin-top: 10px;
  display: inline-block;
}

.password-recovery:hover,
#password-recovery:hover {
  color: #a8c8e8 !important;
  text-decoration: underline !important;
}

.register-link,
#register-link {
  color: #fff !important;
  font-family: 'Open Sans', Arial, sans-serif !important;
  text-decoration: none !important;
  font-size: 16px;
  margin-top: 10px;
  display: inline-block;
}

.register-link:hover,
#register-link:hover {
  color: #a8c8e8 !important;
  text-decoration: underline !important;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100vh;
  background-color: #252525;
  overflow: hidden;
  padding-bottom: 5%;
}

.middle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 20px;
}


.middle-container .message-box {
  background-color: #C0392B;
  padding: 30px 50px;
  border-radius: 20px;
  margin-bottom: 20px;
  width: 350px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.middle-container .card {
  width: 50px;
  height: 80px;
  background-color: #37414e;
  margin: 0 auto 10px;
  border-radius: 10px;
}

.middle-container .username {
  font-weight: bold;
}

.input:focus {
  border-color: #C0392B !important;
  box-shadow: 0 0 0 0.125em rgb(192 57 43 / 25%);
}

.control.has-icons-left .input:focus+.icon.is-left i {
  color: #C0392B;
}

/* Tabellen-Grundstyle */
.table {
    table-layout: fixed;
    background-color: #2d2d2d;
    color: white;
    width: 100%;
    border-collapse: collapse;
}

/* Zeilen-Höhe */
.table tr {
    height: 60px;
}

/* Alle Zellen (TH und TD) Basis-Styling */
.table th, 
.table td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 0 !important;
    padding-top: 0 !important;
    border-color: #C0392B;
}

/* Spaltenbreiten */
.table th:nth-child(1),
.table td:nth-child(1) {
    width: 60px;        /* ID */
}

.table th:nth-child(2),
.table td:nth-child(2) {
    width: 25%;         /* Benutzername */
}

.table th:nth-child(3),
.table td:nth-child(3),
.table th:nth-child(4),
.table td:nth-child(4) {
    width: 20%;         /* Vor- und Nachname */
}

.table th:last-child,
.table td:last-child {
    width: 280px;       /* Aktionen */
    min-width: 280px;
    text-align: center !important;  /* Überschrift zentrieren */
}

/* Konsolidiertes Styling für .edit-field */
.edit-field {
    box-sizing: border-box;
    width: 95%;
    min-width: 120px;
    max-width: none;
    font-size: 18px;
    height: 38px;              /* Feste Höhe passend zur Zeilenhöhe */
    padding: 0 12px;           /* Nur horizontales Padding */
    background: #23272b;
    color: #fff;
    border: 2px solid #C0392B;
    border-radius: 8px;
    margin: 0;
    transition: border 0.2s, background 0.2s;
    display: none;
    vertical-align: middle;
}

/* 2FA Modal specific field styling */
#twofa-modal .field {
  display: flex;
  justify-content: center;
  text-align: center;
  flex-direction: column;

}

#twofa-modal .button.is-fullwidth {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}


.table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 12px !important;
}

/* Button-Gruppe in der Aktionen-Spalte */
.button-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Buttons in der Tabelle */
.button-group button {
    padding: 0 8px;
    font-size: 12px;
    height: 28px;
    min-width: 70px;
    margin: 0 2px;
}

.edit-btn {
  background-color: #37414e !important;
  color: #fff !important;
  border: 2px solid #C0392B !important;
  border-radius: 10px;
  font-weight: bold;
  min-width: 100px;
  transition: background 0.2s, border 0.2s;
}

.edit-btn:hover {
  background-color: #C0392B !important;
}

.unlockbutton {
  background-color: #37414e !important;
  color: #fff !important;
  border: 2px solid #C0392B !important;
  border-radius: 10px;
  font-weight: bold;
  min-width: 100px;
  transition: background 0.2s, border 0.2s;
}

.unlockbutton:hover {
  background-color: #C0392B !important;
}

.reset-popup {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgb(0 0 0 / 70%);
  z-index: 1000;
}

/* Popup Inhalt */
.reset-popup-content {
  background: #23272b;
  color: #fff;
  max-width: 350px;
  margin: 10vh auto;
  padding: 32px 24px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 16px #000a;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.reset-popup-content h3 {
  color: #fff;
  font-family: "Titillium Web", Arial, sans-serif;
  font-size: 1.5em;
  margin-bottom: 18px;
  text-align: center;
}

.reset-popup-content label {
  color: #fff;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 1em;
  margin-bottom: 8px;
}

.reset-popup-content .input {
  background: #252525;
  color: #fff;
  border: 2px solid #C0392B;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0 18px;
  font-size: 1em;
  transition: border 0.2s, box-shadow 0.2s;
}

.reset-popup-content .input:focus {
  border-color: #C0392B;
  box-shadow: 0 0 0 0.125em rgb(192 57 43 / 25%);
  outline: none;
}

.reset-popup-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.reset-popup-buttons .button {
  min-width: 110px;
  height: 40px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.reset-popup-buttons .button.is-light {
  background: #37414e;
  color: #fff;
}

.reset-popup-buttons .button.is-light:hover {
  background: #C0392B;
  color: #fff;
}

.reset-popup-buttons .button.is-primary {
  background: #C0392B;
  color: #fff;
}

.reset-popup-buttons .button.is-primary:hover {
  background: #a93226;
  color: #fff;
}

/* 2FA Custom Styles */
.tfa-box {
  max-width: 400px;
  margin: 0 auto;
}

.tfa-button-success {
  background-color: #C0392B !important;
  color: white !important;
  border: 2px solid #C0392B !important;
  text-decoration: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.tfa-button-success:hover {
  background-color: #a93226 !important;
  border-color: #a93226 !important;
}

.tfa-button-danger {
  background-color: #dc3545 !important;
  color: white !important;
  border: 2px solid #dc3545 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.tfa-button-danger:hover {
  background-color: #c82333 !important;
  border-color: #c82333 !important;
}

.tfa-button-secondary {
  background-color: #37414e !important;
  color: white !important;
  border: 2px solid #37414e !important;
  text-decoration: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.tfa-button-secondary:hover {
  background-color: #2c3440 !important;
  border-color: #2c3440 !important;
}

.tfa-tag-success {
  background-color: #28a745 !important;
  color: white !important;
  padding: 10px 15px !important;
  font-size: 1rem !important;
}

.tfa-tag-warning {
  background-color: #ffc107 !important;
  color: black !important;
  padding: 10px 15px !important;
  font-size: 1rem !important;
}

.user-manager-table {
    table-layout: fixed;
    width: 100%;
}

.user-manager-table th:nth-child(1) { width: 60px; }   /* ID */
.user-manager-table th:nth-child(2) { width: 25%; }    /* Benutzername */
.user-manager-table th:nth-child(3) { width: 15%; }    /* Vorname */
.user-manager-table th:nth-child(4) { width: 15%; }    /* Nachname */
.user-manager-table th:nth-child(5) { width: 100px; }  /* 2FA */
.user-manager-table th:nth-child(6) { width: auto; }   /* Aktionen */

.user-manager-table td {
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.user-manager-table .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.user-manager-table .button {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    white-space: nowrap;
}

.user-manager-table .edit-field {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.user-manager-table .tag {
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Mobile responsiveness */
@media (width <= 768px) {
    .user-manager-table th:nth-child(2) { width: 30%; }
    .user-manager-table th:nth-child(3) { width: 12%; }
    .user-manager-table th:nth-child(4) { width: 12%; }
    
    .user-manager-table .button {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Ensure table doesn't overflow  */
.table-container {
    overflow-x: auto;
}

/* Locked accounts table - 5 columns */
.locked-accounts-table {
    table-layout: fixed;
    width: 100%;
}

.locked-accounts-table th:nth-child(1) { width: 60px; }   /* ID */
.locked-accounts-table th:nth-child(2) { width: 30%; }    /* Email */
.locked-accounts-table th:nth-child(3) { width: 25%; }    /* Name */
.locked-accounts-table th:nth-child(4) { width: 25%; }    /* Locked Until */
.locked-accounts-table th:nth-child(5) { width: 120px; }  /* Action */

.locked-accounts-table td {
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.locked-accounts-table .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.locked-accounts-table .button {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    white-space: nowrap;
}

.locked-accounts-table .tag {
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Mobile responsiveness for locked accounts table */
@media (width <= 768px) {
    .locked-accounts-table th:nth-child(2) { width: 35%; }
    .locked-accounts-table th:nth-child(3) { width: 25%; }
    .locked-accounts-table th:nth-child(4) { width: 20%; }
    
    .locked-accounts-table .button {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* UserManager specific styles for scrollable content */
body.user-manager-page {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}

body.user-manager-page .container {
    height: auto;
    min-height: 100vh;
    justify-content: flex-start;
    padding-top: 2rem;
    overflow-y: visible;
}