/* -----------------------------------
   GLOBAL ADMIN LAYOUT
----------------------------------- */

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 40px;
  text-align: center;
}

/* -----------------------------------
   HEADER
----------------------------------- */

.admin-header {
  text-align: center;
  margin-bottom: 40px;
}

.admin-profile {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #850604;
  margin-bottom: 16px;
}

/* -----------------------------------
   TITLES
----------------------------------- */

.admin-title {
  margin-bottom: 40px;
  font-size: 32px;
  color: #850604;
}

/* -----------------------------------
   ADMIN GRID (Startseite)
----------------------------------- */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.admin-card {
  background: white;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.admin-card:hover {
  background-color: #f0f0f0;
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.admin-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #850604;
  background: #fff;
}

.admin-card p {
  margin-top: 12px;
  font-size: 18px;
  font-weight: bold;
}

/* -----------------------------------
   POPUP (Login / kleine Dialoge)
----------------------------------- */

.popup.hidden {
  display: none;
}

.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-box {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 300px;
  text-align: center;
}

.popup-box input {
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.popup-box button {
  margin-top: 16px;
  padding: 10px 20px;
  background: #850604;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.popup-box .cancel {
  background: #777;
  margin-left: 10px;
}

.error {
  color: red;
  margin-top: 10px;
}

/* -----------------------------------
   UTILITY
----------------------------------- */

.hidden {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

/* -----------------------------------
   MODAL (Beitrag-Editor, Bild-Upload etc.)
----------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  animation: fadeIn 0.25s forwards;
}

.modal-window {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 520px;
  max-width: 90%;
  background: #fff;
  border-radius: 14px;
  padding: 30px;
  transform: translate(-50%, -50%) scale(0.85);
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  z-index: 1000;
  opacity: 0;
  animation: popIn 0.25s forwards;
}

/* Modal Animationen */
@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes popIn {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Modal Close Button */
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #b30000;
  transition: 0.2s;
}

.modal-close:hover {
  transform: scale(1.2);
  color: #ff0000;
}

/* Modal Abort Button */
.modal-abort {
  margin-top: 20px;
  background: #b30000;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.modal-abort:hover {
  background: #d00000;
}

/* Modal Steps */
.modal-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-step h2 {
  margin-bottom: 10px;
}

/* Vorschau */
.admin-preview img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* -----------------------------------
   SAVE OVERLAY (Speichern läuft…)
----------------------------------- */

.save-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.save-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.save-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ffffff55;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -----------------------------------
   TOAST (Erfolgreich gespeichert)
----------------------------------- */

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #2ecc71;
  color: white;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(20px);
  transition: 0.3s ease;
  z-index: 3000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* -----------------------------------
   DELETE BUTTON (Mülleimer)
----------------------------------- */

.delete-button {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #b30000;
  transition: 0.2s;
}

.delete-button:hover {
  transform: scale(1.2);
  color: #ff0000;
}
.admin-back-icon {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #ffffffcc;
  backdrop-filter: blur(6px);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 22px;
  color: #850604;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: 0.2s ease;
  z-index: 2000;
}

.admin-back-icon:hover {
  background: #ffffffee;
  transform: scale(1.1);
}
.admin-back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #ffffffcc;
  backdrop-filter: blur(6px);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  color: #850604;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: 0.2s ease;
  z-index: 2000;
}

.admin-back-button:hover {
  background: #ffffffee;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}
