/* ========== Globales Design ========== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;   /* nur ein Scrollbalken */
}



body {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
}


h1 { color: #333; }

a { text-decoration: none; color: #0066cc; }
a:hover {
/*	text-decoration: underline; */
	text-decoration: none; 
}

/* ========== Startseiten-Menü / Layout ========== */
.menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 600px;
  margin: 40px auto;
}
.menu a {
  display: block;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: #333;
  font-size: 18px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.menu a:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}


/* Buttons allgemein */
.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: #0066cc; border-color: #0066cc; color: #fff; }
.btn-primary:hover { background: #0057ad; }
.btn-secondary { background: #f8f9fa; border-color: #ccc; color: #333; }
.btn-secondary:hover { background: #e2e6ea; border-color: #999; }
.btn-small { padding: 4px 8px; font-size: 13px; }

/* Tabellen global */
.table-wrapper { overflow-x: auto; margin-bottom: 20px; }
table { 
	border-collapse: collapse;
/*	width: 100%; */
	background: #fff;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}
th, td { border: 1px solid #ccc; padding: 6px 10px; text-align: left; }
th { background-color: #f2f2f2; }
tr:nth-child(even) { background-color: #fafafa; }
tr:hover { background-color: #f1f1f1; }

/* Formulare */
/* form { max-width: 720px; } */
/* form p { margin: 10px 0; } */
input[type="text"], input[type="date"], input[type="time"], select {
  width: 100%;
  max-width: 420px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #0066cc;
  color: #fff;
  cursor: pointer;
}
button:hover { background: #0057ad; }

/* Statuspunkte */
.status-dot {
  font-size: 22px;
  font-weight: bold;
  line-height: 1;
  display: inline-block;
  width: 22px;
  text-align: center;
}
.status-dot.green { color: green; }
.status-dot.red   { color: red; }
.col-aktiv, .col-mt, .col-vw, .col-vk { width: 40px; text-align: center; }

/* ========== Matrix 1 (tabellarisch) ========== */
table.matrix {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.matrix th, .matrix td {
  border: 1px solid #ddd;
  padding: 8px;
  vertical-align: top;
  word-wrap: break-word;
  text-align: left;
}
.matrix th { background-color: #f0f0f0; text-align: center; }
.matrix th:first-child, .matrix td:first-child { width: 180px; }

/* Termin-Karte */
.termin {
  display: block;
  margin-bottom: 6px;
  padding: 6px 8px 32px 8px;
  background: #e3f2fd;
  border-left: 4px solid var(--stripe, #2196f3);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4em;
  text-decoration: none;
  color: #000;
  position: relative;
}
.termin strong { display: block; margin-bottom: 2px; }
.termin small  { display: block; color: #333; }
.termin:hover  { background: #d0e8ff; }
.termin .seller { position: absolute; top: 4px; right: 6px; font-weight: bold; color: #444; }

/* Button-Leiste */
.termin-buttons { position: absolute; bottom: 4px; right: 4px; display: flex; gap: 6px; z-index: 10; }
.termin-buttons button {
  width: 22px; height: 22px; font-size: 14px; line-height: 20px;
  border: 1px solid #ddd; border-radius: 50%; background: #fff; color: #888;
  cursor: pointer; padding: 0;
}
.termin-buttons button:hover { background: #f7f7f7; color: #555; border-color: #bbb; }
.edit-btn { background: #ffc107; } .edit-btn:hover { background: #e0a800; }
.move-btn { background: #0275d8; } .move-btn:hover { background: #025aa5; }
.delete-btn { background: #f44336; } .delete-btn:hover { background: #d32f2f; }

/* Plus-Button */
.new-btn {
  position: absolute;
  top: 4px; left: 4px;
  width: 14px; height: 14px;
  background: #fff; border: 1px solid #ddd; border-radius: 2px;
  color: #888; font-weight: bold; font-size: 12px; line-height: 12px;
  cursor: pointer; text-align: center; padding: 0; z-index: 2;
}
.new-btn:hover { background: #f7f7f7; color: #555; }

/* Sticky Header in Matrix */
.matrix-wrap {
  overflow: visible;   /* kein eigener Scrollbalken */
  max-height: none;    /* volle Höhe */
}
/*
.matrix thead th {
  position: sticky;
  top: 100px;                 // aktuell effektiver Wert 
  z-index: 90;
  background: #fff;
  border-bottom: 2px solid #ccc;
}
*/

/* ========== Matrix 2 (Timeline) ========== */

.slot-timeline {
  position: relative;
  width: 100%;
  height: 25px;        /* statt 42px */
  margin-bottom: 0px;  /* statt 4px */
  box-sizing: border-box;
}


.slot-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 4px;
  z-index: 1; /* Balken-Ebene */
}

.slot-label {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 8px);
  font-size: 0.85em;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2; /* Text liegt über dem Balken */
}

.slot-empty {
/*  background: #ccffcc; */
/*  border: 1px dashed #9c9;*/
    border: 1px solid #9c9;

}

.slot-filled {
  font-weight: 600;
}
/* ========== Header, Footer, Navigation ========== */


header {
  background: #ffc107; /* #ffc107 */
  color: #222;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 1000;
}
header h1 { margin: 0; font-size: 24px; font-weight: bold; }
header img.logo { height: 50px; width: auto; }
.header-right { display: flex; align-items: center; gap: 12px; }

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffc107;
  color: #222;
  padding: 10px 20px;
  margin-top: 40px;
  font-size: 14px;
}
footer .footer-left { font-weight: 600; }
footer .footer-right { font-style: italic; }

/* termine_matrix2 */

.kw-search-form button:hover {
  background: #e2e6ea;
}

.kw-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;   /* mehr Abstand zwischen Suche und KW-Buttons */
  flex-wrap: wrap; /* auf sehr schmalen Screens umbrechen */
}


.kw-search-form input[type="text"] {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 180px;
}
.kw-search-form label {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.kw-search-form button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f8f9fa;
  cursor: pointer;
  white-space: nowrap;
}
/* normale Suche */
.kw-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
}

/* aktive Suche -> pastell-orange Hintergrund */
.kw-search-form.search-active {
  background: #ffe8cc;   /* Pastell-Orange */
  border: 1px solid #ffcc80;
}

.kw-left { justify-self: start; }
.kw-right { justify-self: end; }

/*:root { --h-header:100px; --h-kwbar:76px; }*/
:root {
/*  --h-header:200px; */
  --h-kwbar: 96px;   /* Höhe der KW-Bar */
}

/* KW-Bar fix unterhalb vom Header */
.kw-bar {
  position: sticky;
  top: 90px;   /* Höhe deines Headers (anpassen!) */
  z-index: 900;
  background: #fff;
  padding: 10px;
  border-bottom: 2px solid #ccc;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* Tabellenkopf fix unterhalb von Header + KW-Bar */
/*
.matrix thead th {
  position: sticky;
  top: 160px;   // Headerhöhe (100px) + KW-Bar Höhe (~60px) 
  z-index: 800;
  background: #fff;
  border-bottom: 2px solid #ccc;
}*/
/* Tabellenkopf (Wochentage) */
.matrix thead th {
  position: sticky;
  top: 154px;   /* Headerhöhe (100px) + KW-Bar Höhe (~60px) */
/*  top: calc(var(--h-header, 100px) + var(--h-kwbar, 76px)); // bleibt fix */
  z-index: 90;
  background: #d3d3d3;       /* etwas dunkleres Grau */
  color: #222;               /* dunklere Schrift */
  font-weight: 600;
  text-align: center;        /* horizontal zentriert */
  vertical-align: middle;    /* vertikal zentriert */
  padding: 12px;             /* mehr Innenabstand */
/*  border-bottom: 2px solid #999;*/
  border: 1px solid #909090;
}

/* Erste Spalte (Monteur-Spalte + Kopf MONTEUR) */
.matrix tbody td:first-child {
  position: sticky;
  left: 0;                   /* fix links */
  z-index: 95;               /* über normalen Zellen */
  background: #d3d3d3;       /* etwas dunkleres Grau */
  font-weight: 600;
  text-align: left;
  vertical-align: middle;
  border: 1px solid #909090;
}

/* Kopfzelle oben links: MONTEUR */
.matrix thead th:first-child {
  position: sticky;
  top: 154px;   /* Headerhöhe (100px) + KW-Bar Höhe (~60px) */
/*  top: calc(var(--h-header, 100px) + var(--h-kwbar, 76px)); /* oben fix */
  left: 0;                    /* links fix */
  text-align: center;
  z-index: 100;                /* höher als andere Sticky-Zellen */
  background: #d3d3d3;         /* extra abgesetzt */
  border: 1px solid #909090;
}


/*
.kw-bar {
  position: sticky;
  top: var(--h-header);   // fix direkt UNTER dem Header 
  z-index: 900;
  background: #fff;
  padding: 5px 10px;
  border-bottom: 2px solid #ccc;
}
*/
/*
.matrix thead th {
  position: sticky;
  top: 0;         // Erste Kopfzeile klebt oben 
  z-index: 100;
  background: #fff;
}
*/

/* Zweite Kopfzeile (Tage) rutscht automatisch darunter */
.matrix thead tr:nth-child(2) th {
  top: 50px;      /* Höhe der KW-Bar anpassen */
  z-index: 90;
}



/* termine_matrix2 */
.search-result {
  padding: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
  line-height: 1.4;
}
.search-result strong {
  color: #0066cc;
}




.slot-label-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(255,255,255,0.4); /* halbtransparent */
  z-index: 1;
}

.slot-bar { z-index: 0; }
.slot-label { z-index: 2; }


/* Such-Highlighting */
.slot-bar.dimmed {
  filter: grayscale(100%) brightness(150%);
  opacity: 0.3;
}

.slot-label.dimmed {
  color: #999 !important;
}


/* Buttons im Termin-Edit (Matrix2) */
.termin-buttons {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.termin-buttons .btn-danger {
  background: #f44336;
  color: #fff;
}

.termin-buttons .btn-danger:hover {
  background: #d32f2f;
}


.extra-actions {
  justify-content: flex-start; /* linksbündig */
}



/* Vollflächiger Center-Container */
.edit-center {
  display: flex;
  align-items: center;      /* vertikal zentrieren */
  justify-content: center;  /* horizontal zentrieren */
/*  min-height: calc(100vh - 160px); /* volle Höhe minus Header/Footer (anpassen!) */
  padding: 20px;
  box-sizing: border-box;
}


/* kundendienst.php */
/* ---- Formular: volle Breite + 3 gleich breite Spalten ---- */
.form-wide {
  max-width: none;   /* hebt das globale 720px-Limit auf */
  width: 100%;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* drei gleiche Spalten */
  gap: 20px;
  width: 100%;
}

/* Tabellen im Formular ohne Rahmen/Hintergrund */
table.form-table {
  background: transparent !important;
  box-shadow: none !important;
}

.form-table th,
.form-table td {
  border: none !important;
  padding: 6px 8px;
  vertical-align: middle;
}

.form-table td:first-child {
  width: 35%;
  white-space: nowrap;
}

.form-table input,
.form-table select,
.form-table textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/* Textareas sollen immer die ganze Spaltenbreite einnehmen */
.form-grid-3 textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}


.info-button-wrapper {
  display: flex;
  justify-content: flex-end;  /* nach rechts ausrichten */
  margin: 20px;               /* Abstand zur Tabelle/Seite */
}

.info-button-wrapper .btn {
  cursor: default;            /* nicht klickbar */
}




.deleted-hint {
  text-align: center;
  background: #ffe0e0; /* Pastellrot */
  color: #b00000;      /* dunkler Rotton */
  font-weight: bold;
  padding: 10px;
  margin: 20px 0;
  border-radius: 6px;
}



/* Tabelle im Edit mittig */


/* ========== Edit-Fenster (Termin bearbeiten / neu) ========== */


/* Wrapper: hält Tabelle + Buttons zusammen */
.edit-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;   /* alles in der Mitte */
  width: 100%;
  max-width: 800px;
}

/* Tabelle mittig und sauber formatiert */

.edit-form {
  flex: 1;                   /* wächst, nimmt Restplatz */
  overflow-y: auto;          /* nur scrollen, wenn zu hoch */
  margin: 0 auto 20px auto;  /* zentriert, Abstand unten für Buttons */
  max-width: 1000px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-collapse: collapse;
}




/* Edit-Formular: Spaltenbreiten anpassen */
.edit-form th {
  width: 120px;        /* Labels etwas schmaler */
  font-size: 16px;     /* Labels leicht kleiner */
  white-space: nowrap; /* Umbruch vermeiden */
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
 }


.edit-form td {
  width: auto;         /* Inputs dürfen den Rest nehmen */
  padding: 8px 12px;
  vertical-align: middle;
}



/* Farb-Picker größer darstellen */
.edit-form input[type="color"] {
  width: 60px;
  height: 40px;
  padding: 0;
  cursor: pointer;
}

/* Buttons unter der Tabelle mittig */
.edit-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.edit-actions .btn {
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 6px;
  min-width: 140px;
}


/* Farben für Buttons */
.edit-actions .btn-primary {
  background: #0066cc;
  border-color: #0066cc;
  color: #fff;
}
.edit-actions .btn-primary:hover {
  background: #0057ad;
}

.edit-actions .btn-secondary {
  background: #f8f9fa;
  border-color: #ccc;
  color: #333;
}
.edit-actions .btn-secondary:hover {
  background: #e2e6ea;
  border-color: #999;
}

.edit-actions .btn-danger {
  background: #f44336;
  border-color: #f44336;
  color: #fff;
}
.edit-actions .btn-danger:hover {
  background: #d32f2f;
}


/* ================================
   Fix nur für Edit2 im Modal
   ================================ */
body.edit2-body,
body.edit2-body html {
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  box-sizing: border-box !important;
  background: #f9f9f9 !important;
}

/* Inhalt im Modal (Tabelle + Buttons) */
body.edit2-body .modal-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* von oben beginnen */
  align-items: center;          /* horizontal zentriert */
  min-height: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
}


/* ========== Modal Fix ========== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  z-index: 999999;
}

.modal.open {
  display: flex;
}


/* Modal-Body: sorgt dafür, dass der Inhalt zentriert ist */

.modal-iframe {
  flex: 1;                   /* wächst mit .modal-body */
  border: 0;
  width: 100%;
  height: 100%;
}


.modal-body {
  flex: 1;                   /* nimmt alles zwischen Header und Footer ein */
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;          /* kein globaler Scroll */
}



/* =========================
   Modal-spezifisches Layout
   ========================= */
.modal-dialog {
  background: #fff;
  width: min(1000px, 95vw);
  height: 90vh;                /* feste Höhe */
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-dialog header {
  flex-shrink: 0;              /* bleibt oben */
}

.modal-dialog .modal-body {
  flex: 1;                     /* füllt zwischen Header und Footer */
  display: flex;
  flex-direction: column;
  overflow: hidden;            /* kein globaler Scroll */
  padding: 0;
}

.modal-dialog .edit-form {
  flex: 1;                     /* wächst im Body */
  overflow-y: auto;            /* nur Tabelle scrollt */
  margin: 20px auto;
  max-width: 800px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-collapse: collapse;
}

.modal-dialog .edit-actions {
  flex-shrink: 0;              /* fix oberhalb Footer */
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.modal-dialog footer {
  flex-shrink: 0;              /* bleibt unten */
}

/* Tabelle im Edit-Fenster breiter */
.edit-form {
  width: 100%;               /* volle Breite */
  max-width: 1000px;         /* bis zu 1000px erlauben */
  margin: 20px auto;         /* zentriert */
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Spalten */
.edit-form th {
  text-align: left;
  padding: 8px 12px;
  width: 120px;              /* etwas schmaler als vorher */
  font-weight: 600;
  vertical-align: middle;
}

.edit-form td {
  padding: 8px 12px;
  vertical-align: middle;
  width: auto;               /* nimmt mehr Platz ein */
}

/* Inputs automatisch größer */
.edit-form input[type="text"],
.edit-form input[type="date"],
.edit-form input[type="time"],
.edit-form input[type="color"],
.edit-form select {
  font-size: 16px;
  width: 100%;              /* volle Zellbreite */
  max-width: none;          /* keine künstliche Grenze */
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}


/* ==========================
   Edit-Formular Inputs stärker gewichtet
   ========================== */

/* Standard-Inputs: füllen die ganze Tabellenzelle */
form .edit-form input[type="text"],
form .edit-form select,
form .edit-form textarea {
  width: 100%;
  max-width: none;
  padding: 10px 14px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Datum und Zeit: etwas breiter, mit größerer Schrift */
form .edit-form input[type="date"],
form .edit-form input[type="time"] {
  font-size: 18px;
  padding: 12px 16px;
  width: 160px;    /* feste Breite */
}

/* PLZ: kompakt */
form .edit-form input[name="plz"] {
  width: 120px;
}

/* Farb-Picker: klein halten */
form .edit-form input[type="color"] {
  width: 60px;
  height: 40px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}


/* ============================
   Styles nur für User-Edit
   ============================ */
.user-edit-form {
  margin-top: 40px;
  text-align: center; /* Buttons mittig */
}

.user-edit-table {
  border-collapse: collapse;
  margin: 0 auto 20px auto; /* Tabelle zentrieren */
}

.user-edit-table td {
  padding: 6px 12px;
  vertical-align: middle;
  text-align: left; /* Inhalte in der Zelle links lassen */
}

.user-edit-table label {
  font-weight: bold;
  white-space: nowrap;
}

.user-edit-table input[type="text"],
.user-edit-table input[type="password"] {
  width: 250px;
  padding: 6px;
}

.user-edit-buttons {
  text-align: center; /* Buttons mittig unter der Tabelle */
}

.user-edit-buttons button,
.user-edit-buttons a {
  margin: 0 8px;
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  background: #2196f3;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.user-edit-buttons a {
  background: #aaa;
}

.user-edit-buttons button:hover {
  background: #1976d2;
}

.user-edit-buttons a:hover {
  background: #888;
}

/* --- User-Edit: Tabelle & Buttons wirklich zentrieren --- */
.user-edit-form {
  display: grid;           /* robust gegen andere globale Styles */
  justify-items: center;   /* zentriert Kinder horizontal */
  margin-top: 40px;
}

.user-edit-form .user-edit-table {
  width: auto !important;      /* überschreibt evtl. width:100% */
  max-width: min(720px, 95vw); /* angenehme Maximalbreite */
  display: inline-table;       /* schrumpft auf Inhaltsbreite */
  margin: 0 auto;              /* falls display:block erzwungen wird */
  float: none !important;      /* falls irgendwo float gesetzt ist */
  border-collapse: collapse;
}

.user-edit-form .user-edit-table td {
  padding: 6px 12px;
  vertical-align: middle;
  text-align: left;            /* Inhalte weiterhin links */
}

.user-edit-form .user-edit-table label {
  font-weight: bold;
  white-space: nowrap;
}

.user-edit-form .user-edit-table input[type="text"],
.user-edit-form .user-edit-table input[type="password"] {
  width: 250px;
  padding: 6px;
}

/* Buttons mittig unter der Tabelle */
.user-edit-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.user-edit-buttons button,
.user-edit-buttons a {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  background: #2196f3;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.user-edit-buttons a { background: #aaa; }
.user-edit-buttons button:hover { background: #1976d2; }
.user-edit-buttons a:hover { background: #888; }


/* ===== User-Edit: harte Overrides, damit Tabelle & Buttons wirklich mittig sind ===== */
form.user-edit-form { 
  max-width: none !important;      /* schlägt 'form { max-width:720px }' */
  width: max-content;              /* nur so breit wie Inhalt */
  margin: 40px auto;               /* Formular zentrieren */
  text-align: center;              /* Buttons mittig */
}

form.user-edit-form table.user-edit-table {
  width: auto !important;          /* schlägt 'table { width:100% }' */
  margin: 0 auto;                  /* Tabelle zentrieren */
  display: table;                  /* sicherstellen, dass margin greift */
  float: none !important;          /* falls irgendwo float gesetzt ist */
}

form.user-edit-form table.user-edit-table td {
  text-align: left;                /* Zellinhalt weiter linksbündig */
  padding: 6px 12px;
  vertical-align: middle;
}

.user-edit-buttons {
  display: flex;
  justify-content: center;         /* Buttons mittig unter der Tabelle */
  gap: 12px;
  margin-top: 12px;
}
.user-edit-buttons button,
.user-edit-buttons a {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  background: #2196f3;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.user-edit-buttons a { background: #aaa; }
.user-edit-buttons button:hover { background: #1976d2; }
.user-edit-buttons a:hover { background: #888; }

/* --- Fallback, falls du die Klassen noch nicht im HTML hast --- */
form[action*="user_edit.php"] { 
  max-width: none !important; 
  width: max-content; 
  margin: 40px auto; 
  text-align: center;
}
form[action*="user_edit.php"] table { 
  width: auto !important; 
  margin: 0 auto; 
  display: table; 
}
/* =========================
   Fix: User-Edit Tabelle & Buttons zentrieren
   ========================= */
form.user-edit-form {
  max-width: none !important;
  width: auto !important;
  margin: 40px auto !important; /* Formular selbst zentrieren */
  text-align: center;
}

form.user-edit-form table.user-edit-table {
  width: auto !important;        /* überschreibt width:720px / width:100% */
  margin: 0 auto !important;     /* Tabelle mittig */
  display: table !important;     /* sicherstellen, dass margin wirkt */
  float: none !important;        /* falls global float gesetzt */
}

.user-edit-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
/* ===== User-Edit: Tabelle & Buttons wirklich zentrieren (harte Overrides) ===== */
form.user-edit-form {
  max-width: none !important;         /* schlägt 'form { max-width:720px }' */
  width: auto !important;              /* nicht auf 720px einfrieren */
  margin: 40px auto !important;        /* Formular mittig */
  text-align: center;                  /* Buttons mittig */
}

form.user-edit-form > table.user-edit-table {
  width: auto !important;              /* schlägt 'table { width:100% }' */
  display: inline-table !important;    /* shrink-to-content statt 100% */
  margin: 0 auto !important;           /* Tabelle mittig */
  float: none !important;              /* falls global irgendwo float gesetzt */
  border-collapse: collapse;
}

form.user-edit-form > table.user-edit-table td {
  text-align: left;                    /* Inhalte weiterhin linksbündig */
  padding: 6px 12px;
  vertical-align: middle;
}

/* Buttons mittig unter der Tabelle */
.user-edit-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
