[hidden] {
  display: none !important;
}

.action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.actions-col {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.actions-col .table-action-form {
  display: inline-flex !important;
  justify-content: flex-end;
  margin: 0;
  width: auto;
}

.add-group-box {
  margin: 28px auto 0 auto;
  max-width: 420px;
  text-align: center;
}

.add-group-box h2 {
  margin-bottom: 14px;
}

.add-group-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.add-group-form button {
  justify-self: end;
  white-space: nowrap;
}

.add-group-form select {
  min-width: 0;
  width: 100%;
}

body {
  background: #f5f5f5;
  color: #222;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
}

button {
  cursor: pointer;
}

button.btn,
a.btn {
  align-items: center;
  appearance: none;
  border: none;
  border-radius: 6px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  min-height: 36px;
  padding: 0 12px;
  text-decoration: none;
  -webkit-appearance: none;
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-danger {
  background-color: #c62828;
  color: white;
}

.btn-danger:hover {
  background-color: #9e1f1f;
}

.bold-text {
  font-weight: bold;
}

.btn-primary {
  background-color: #1565c0;
  color: white;
}

.btn-primary:hover {
  background-color: #0d47a1;
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #1f2937;
}

.btn-secondary:hover {
  background-color: #d1d5db;
}

.btn-outline {
  background-color: white;
  border: 1px solid #9ca3af;
  color: #374151;
}

.btn-outline:hover {
  background-color: #f3f4f6;
}

.input-description {
  display: block;
  margin-bottom: 5px;
  margin-left: 15px;
}

.btn-small {
  font-size: 13px;
  height: 32px;
  min-height: 32px;
  min-width: 0;
  padding: 0 10px;
  width: auto;
}

.btn-success {
  background-color: #2e7d32;
  color: white;
}

.btn-success:hover {
  background-color: #256628;
}

.btn-warn {
  background-color: #ef6c00;
  color: white;
}

.btn-warn:hover {
  background-color: #c95a00;
}

.card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 20px;
}

.card.center-content {
  justify-content: center;
}

.card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card form[style*="display:inline"] {
  display: inline;
}

.card h2,
.card h3 {
  margin-bottom: 14px;
  margin-top: 0;
  text-align: center;
}

.card ul {
  margin-top: 0;
}

.checkbox-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0;
}

.checkbox-row input {
  flex: 0;
}

code {
  background: #eee;
  border-radius: 6px;
  padding: 4px 7px;
  word-break: break-all;
}

.core-data-form {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto;
  max-width: 520px;
}

.core-data-form button {
  align-self: center;
  margin-top: 8px;
}

.danger-zone {
  background: #fff5f5;
  border-color: #c62828;
}

.delete-confirm-actions {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.delete-confirm-form {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fail {
  color: #b00020;
  font-weight: bold;
}

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

.flex-fill {
  flex: 1;
}

.form-actions-center {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.grid {
  display: grid;
  gap: 18px;
  margin: 18px 0;
}

.group-action {
  display: flex;
  justify-content: flex-end;
  white-space: nowrap;
}

.group-action form {
  margin: 0;
}

.group-dn {
  color: #666;
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
  word-break: break-word;
}

.group-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.group-list-item {
  align-items: center;
  border-bottom: 1px solid #ddd;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px 0;
}

.group-list-item:last-child {
  border-bottom: none;
}

.group-name {
  display: flex;
  justify-content: flex-start;
  white-space: nowrap;
}

.group-name-btn {
  height: auto;
  justify-content: center;
  min-height: 36px;
  padding-bottom: 8px;
  padding-top: 8px;
  text-align: center;
  white-space: normal;
  width: 150px;
}

h1 {
  margin-top: 0;
}

input {
  flex: 1;
}

input,
select,
button {
  font-size: 16px;
  padding: 10px;
}

main {
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  margin: 40px auto;
  max-width: 1100px;
  padding: 28px;
}

.member-name-btn {
  height: auto;
  justify-content: center;
  min-height: 36px;
  padding-bottom: 8px;
  padding-top: 8px;
  text-align: center;
  white-space: normal;
  width: 220px;
}

.message {
  border-radius: 8px;
  font-weight: 500;
  margin-bottom: 16px;
  padding: 12px 16px;
}

.message-error {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #b00020;
}

.message-ok {
  background: #e6f4ea;
  border: 1px solid #b7e1c1;
  color: #1e7e34;
}

.message-warn {
  background: #fff4e5;
  border: 1px solid #ffd59e;
  color: #b26a00;
}

.mfa-secret-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.mfa-secret-box p {
  margin: 0;
}

.muted {
  color: #666;
  font-size: 13px;
}

.ok {
  color: #0a7a28;
  font-weight: bold;
}

.recovery-code-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  list-style: none;
  margin: 0 0 18px 0;
  padding: 0;
}

.recovery-code-list code {
  display: block;
  text-align: center;
}

.page-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-header h1 {
  margin: 0;
}

.pagination-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.pagination-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pagination-page {
  color: #555;
  font-size: 14px;
}

.pagination-size-form {
  align-items: center;
  display: inline-flex !important;
  flex-direction: row !important;
  gap: 8px;
  margin: 0;
}

.pagination-size-form select {
  margin: 0;
  min-width: 80px;
  width: auto;
}

pre {
  background: #eee;
  border-radius: 8px;
  overflow-x: auto;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-derived-center {
  text-align: left;
  white-space: nowrap;
}

.profile-derived-left {
  text-align: left;
}

.profile-derived-line {
  align-items: center;
  display: grid;
  font-size: 16px;
  gap: 14px;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 0.8fr) minmax(0, 2fr);
  line-height: 1.5;
  margin-top: 4px;
}

.profile-derived-right {
  min-width: 0;
  text-align: right;
}

.profile-dn-inline {
  color: #666;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-edit-compact {
  display: flex !important;
  flex-direction: column;
  gap: 18px;
}

.profile-edit-form {
  display: flex !important;
  flex-direction: column;
  gap: 18px;
}

.profile-row {
  align-items: end;
  display: grid;
  gap: 14px;
}

.profile-row input,
.profile-row select {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.profile-row-one {
  grid-template-columns: 1fr;
}

.profile-row-three {
  grid-template-columns: 1fr 1fr 1fr;
}

.profile-row-two {
  grid-template-columns: 1fr 1fr;
}

.search {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.search-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.search-filter-row {
  align-items: center;
  align-self: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 2px 0 0 0;
  max-width: 100%;
  width: 100%;
}

.search-filter-btn {
  align-items: center;
  appearance: none;
  background: white;
  border: 1px solid #1565c0;
  border-radius: 6px;
  box-sizing: border-box;
  color: #1565c0;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  line-height: 1;
  min-height: 36px;
  min-width: 84px;
  padding: 0 12px;
  position: relative;
  user-select: none;
}

.search-filter-btn:hover {
  background: #eaf3ff;
}

.search-filter-btn.is-active {
  background: #1565c0;
  border-color: #1565c0;
  color: white;
}

.search-filter-btn input[type="checkbox"] {
  appearance: none;
  border: 0;
  clip-path: inset(50%);
  flex: 0 0 auto;
  height: 1px;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  pointer-events: none;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.search-combine-checkbox {
  align-items: center;
  color: #253142;
  display: inline-flex;
  font-size: 14px;
  gap: 6px;
  min-height: 36px;
  padding: 0 8px;
  user-select: none;
}

.search-combine-checkbox input {
  flex: 0 0 auto;
  margin: 0;
}

select {
  min-width: 300px;
  width: 100%;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.table-action-form {
  align-items: center;
  display: inline-flex !important;
  flex-direction: row !important;
  justify-content: flex-start;
  margin: 0;
  width: auto;
}

.table-action-form .btn {
  flex: 0 0 auto;
  width: auto;
}

td form[style*="display:inline"] {
  align-items: center;
  display: inline-flex !important;
  margin: 0;
  vertical-align: middle;
}

th,
td {
  border-bottom: 1px solid #ddd;
  padding: 9px;
  text-align: left;
}

.two-cols {
  align-items: stretch;
  grid-template-columns: 1fr 1fr;
}

.user-info-card {
  margin-bottom: 18px;
}

@media (max-width: 800px) {
  main {
    margin: 16px;
    padding: 18px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-derived-center,
  .profile-derived-left,
  .profile-derived-right {
    text-align: left;
  }

  .profile-derived-line {
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .profile-row-one,
  .profile-row-two,
  .profile-row-three {
    grid-template-columns: 1fr;
  }

  .search {
    flex-direction: column;
  }

  .search-row {
    flex-direction: column;
  }

  select {
    min-width: 0;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .group-action {
    justify-content: flex-start;
  }

  .group-dn {
    text-align: left;
  }

  .group-list-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
}

.password-card {
  justify-content: center;
}

.password-form {
  align-items: stretch;
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto;
  max-width: 360px;
  width: 100%;
}

.password-form button {
  align-self: center;
  margin-top: 4px;
}

textarea {
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  min-width: 0;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.user-create-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.user-create-grid .card {
  justify-content: space-between;
}

.child-action {
  display: flex;
  justify-content: flex-end;
  white-space: nowrap;
}

.child-action form {
  margin: 0;
}

.child-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.child-list-item {
  align-items: center;
  border-bottom: 1px solid #ddd;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px 0;
}

.child-list-item:last-child {
  border-bottom: none;
}

.child-meta {
  color: #666;
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

.child-name {
  display: flex;
  justify-content: flex-start;
  white-space: nowrap;
}

.child-name-btn {
  height: auto;
  justify-content: center;
  min-height: 36px;
  padding-bottom: 8px;
  padding-top: 8px;
  text-align: center;
  white-space: normal;
  width: 220px;
}

@media (max-width: 520px) {
  .child-action {
    justify-content: flex-start;
  }

  .child-list-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .child-meta {
    text-align: left;
  }
}

.delete-impact-box {
  background: #fff4e5;
  border: 1px solid #ffd59e;
  border-radius: 8px;
  margin: 12px 0;
  padding: 12px 16px;
}

.delete-impact-box ul {
  margin: 8px 0 12px 0;
  padding-left: 20px;
}

.message-inline-error {
  color: #b00020;
  font-weight: 600;
  margin-left: 6px;
}

.child-remove-form {
  align-items: flex-end;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  margin: 0;
}

.compact-checkbox-row {
  align-items: center;
  color: #666;
  display: flex;
  font-size: 12px;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.compact-checkbox-row input {
  flex: 0;
}

@media (max-width: 520px) {
  .child-remove-form {
    align-items: flex-start;
  }

  .compact-checkbox-row {
    justify-content: flex-start;
    white-space: normal;
  }
}

.confirm-dialog {
  border: none;
  border-radius: 12px;
  max-width: 520px;
  padding: 0;
  width: calc(100% - 32px);
}

.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.confirm-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.confirm-dialog-content h2 {
  margin: 0;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.modal-checkbox-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 0;
}

.modal-checkbox-row input {
  flex: 0;
}

@media (max-width: 520px) {
  .modal-actions {
    flex-direction: column;
  }

  .modal-checkbox-row {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

.archive-inline-row {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
  width: 100%;
}

.archive-inline-row .field {
  justify-self: center;
  max-width: 240px;
  width: 100%;
}

.archive-button-cell {
  align-items: end;
  display: flex;
  justify-content: center;
  max-width: 240px;
  width: 100%;
  justify-self: center;
}

.archive-button-cell .btn {
  width: 100%;
}

@media (max-width: 520px) {
  .archive-inline-row {
    grid-template-columns: 1fr;
  }
}
.support-password-form {
  width: 100%;
}

.support-password-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.support-password-value {
  margin: 0;
}

.add-group-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.add-group-form select {
  min-width: 18rem;
  max-width: 32rem;
}


/* SchILD-Sync */

.sync-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 18px 0;
}

.sync-summary-box {
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.sync-summary-box strong {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

.sync-summary-box span {
  color: #666;
  font-size: 13px;
}

.sync-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sync-action-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
}

.sync-action-item summary {
  cursor: pointer;
}

.pass {
  color: #2e7d32;
  font-weight: 600;
}


/* SchILD-Sync Stufe 3 */

.danger-zone form select {
  width: 100%;
}

.execution-password-warning {
  margin-top: 12px;
}


/* Kompakte SchILD-Sync-Fortschrittsanzeige */

.sync-progress-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.sync-progress-header strong {
  font-size: 28px;
}

.sync-progress-bar {
  width: 100%;
  height: 22px;
}

.sync-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}



/* SchILD-Sync Fortschritt als Modal */

.sync-progress-modal[hidden] {
  display: none;
}

.sync-progress-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.sync-progress-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.sync-progress-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  padding: 24px;
}

.sync-progress-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.sync-progress-modal-header h2 {
  margin-top: 0;
  margin-bottom: 4px;
}

.sync-progress-message {
  margin-top: 14px;
  word-break: break-word;
}



.sync-progress-modal-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}



.sync-execution-order {
  margin-top: 8px;
  margin-bottom: 16px;
}

.sync-execution-order li {
  margin: 3px 0;
}


/* Datumsanzeige in der Sync-Zusammenfassung zweizeilig darstellen */
.sync-summary-box strong {
  white-space: pre-line;
  line-height: 1.2;
}


/* Datumsbox: Datum normal, Uhrzeit kleiner */
.sync-summary-date strong {
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: pre-line;
}

.sync-summary-date strong::first-line {
  font-size: 1.25rem;
}


/* Abstand zwischen Statistikliste und Folgeabschnitt */
.sync-section-heading {
  margin-top: 22px;
}


.cleanup-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cleanup-error-list ul {
  margin-bottom: 0;
}


.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}


.page-actions .btn {
  width: auto;
}

.user-logout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.user-logout-bar .btn {
  margin-left: auto;
}

.password-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.password-card-title h2 {
  margin: 0;
}

.tiny-outline-button {
  appearance: none;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.08rem 0.35rem;
  font-size: 0.68rem;
  line-height: 1.1;
  font-weight: 500;
  cursor: pointer;
  opacity: 0.75;
}

.tiny-outline-button:hover,
.tiny-outline-button:focus-visible {
  opacity: 1;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
