.admin-body {
  background: #f0f0ed;
  display: flex;
  min-height: 100vh;
}
.site-header .logo,
.admin-sidebar .logo {
  width: auto;
  height: auto;
  background: none;
}
.site-header .logo img,
.admin-sidebar .logo img {
  display: block;
  height: 36px;
  width: auto;
}
.admin-sidebar {
  background: #111;
  color: #fff;
  width: 240px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.admin-sidebar .logo {
  color: #fff;
  font-size: 27px;
}
.admin-label {
  color: #777;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.16em;
  margin: 40px 12px 14px;
}
.admin-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.admin-nav {
  background: none;
  border: 0;
  color: #aaa;
  text-align: left;
  padding: 14px 12px;
  font: inherit;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.admin-nav:first-letter {
  font-size: 18px;
}
.admin-nav span {
  font-size: 14px;
}
.admin-nav.active,
.admin-nav:hover {
  background: #292929;
  color: #fff;
}
.admin-user {
  border-top: 1px solid #333;
  margin-top: auto;
  padding: 20px 5px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-user strong,
.admin-user small {
  display: block;
}
.admin-user strong {
  font-size: 14px;
}
.admin-user small {
  color: #999;
  font-size: 12px;
  margin-top: 4px;
}

/* Etikett "in Vorbereitung" in der Seitenleiste */
.admin-label-soon {
  margin-top: 30px;
}
.nav-soon {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d6a14a;
}

/* Ehrlicher Hinweis fuer Bereiche, die noch nicht speichern. */
.soon-banner {
  display: flex;
  align-items: baseline;
  gap: 14px;
  background: #fdf6e8;
  border-left: 3px solid #d6a14a;
  color: #7a5a1e;
  padding: 15px 18px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.6;
}
.soon-banner strong {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-user > button {
  margin-left: auto;
  background: none;
  border: 0;
  color: #aaa;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d4d4ce;
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 0;
}
.admin-main {
  flex: 1;
  padding: 0 1vw;
  min-width: 0;
}
.admin-top {
  padding: 42px 0 35px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.admin-top h1 {
  margin: 0;
  font-size: 38px;
  letter-spacing: -0.08em;
}
.admin-top .eyebrow {
  margin-bottom: 14px;
  color: #888;
  font-size: 13px;
}
.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}
.admin-top-actions a {
  color: #111;
  text-decoration: none;
}
.status-dot {
  font-size: 13px;
  color: #3f7a50;
}
.status-dot:first-letter {
  font-size: 16px;
}
.admin-mobile-menu {
  display: none;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card,
.admin-panel {
  background: #fff;
  border: 1px solid #e1e1dc;
}
.stat-card {
  padding: 22px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.stat-card small {
  display: block;
  color: #858580;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.stat-card strong {
  font-size: 34px;
  letter-spacing: -0.07em;
  display: block;
  margin: 20px 0 6px;
}
.stat-card span {
  font-size: 13px;
  color: #3f7a50;
}
.stat-card .negative {
  color: #aa5b52;
}
.admin-columns {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.admin-panel {
  padding: 24px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.panel-title h2 {
  font-size: 19px;
  letter-spacing: -0.04em;
  margin: 0;
}
.panel-title a,
.admin-link {
  color: #111;
  text-decoration: underline;
  font-size: 13px;
}
.chart {
  height: 220px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 15px 5px;
  border-bottom: 1px solid #ddd;
  background: linear-gradient(
    #fff 24%,
    #eee 25%,
    #fff 26%,
    #fff 49%,
    #eee 50%,
    #fff 51%,
    #fff 74%,
    #eee 75%,
    #fff 76%
  );
}
.chart i {
  display: block;
  flex: 1;
  background: #111;
  min-height: 15px;
}
.chart i:nth-child(2n) {
  background: #777;
}
.orders-list {
  display: flex;
  flex-direction: column;
}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding: 16px 0;
  font-size: 14px;
}
.order-row small {
  display: block;
  color: #888;
  font-size: 12.5px;
  margin-top: 5px;
}
.order-status {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  background: #eee;
}
.order-status.paid {
  background: #dceadf;
  color: #356443;
}
.admin-view-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 18px;
}
.admin-view-head h2 {
  font-size: 28px;
  letter-spacing: -0.07em;
  margin: 0;
}
.admin-button {
  background: #111;
  color: #fff;
  border: 0;
  padding: 14px 20px;
  font: inherit;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.table-wrap {
  overflow: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: #888;
  font-weight: 500;
}
.admin-table th,
.admin-table td {
  padding: 17px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}
.admin-table td:first-child {
  font-weight: 600;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.product-cell img {
  width: 42px;
  height: 54px;
  object-fit: cover;
  filter: grayscale(1);
}
.table-action {
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.admin-form {
  background: #fff;
  padding: 25px;
  max-width: 680px;
}.admin-form label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  display: block;
  margin-bottom: 20px;
}
.admin-form input,
.admin-form select,
.admin-form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid #ddd;
  background: #fafaf8;
  font: inherit;
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
}
.admin-form textarea {
  height: 110px;
}
/* Zwei Formulare nebeneinander, z. B. bei den Zugaengen. Auf schmalen
   Bildschirmen rutschen sie untereinander. */
.admin-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 15px;
  align-items: start;
}
.admin-view-grid .admin-form {
  max-width: none;
  height: 100%;
}
/* Ruhiger Ladehinweis, solange Daten vom Server geholt werden. */
.admin-loading {
  background: #fff;
  padding: 32px 25px;
  font-size: 14px;
  color: #666;
}
/* Bilderuebersicht: je Produkt eine Gruppe mit Titelzeile und Raster. */
.media-group {
  margin-bottom: 26px;
}
.media-group-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}
.media-group-title span {
  font-weight: 400;
  font-size: 13px;
  color: #888;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 12px;
}
.media-card {
  margin: 0;
  background: #fff;
  border: 1px solid #e6e6e2;
}
.media-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f4f4f1;
}
.media-card figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 9px 10px;
  font-size: 12px;
  color: #777;
}
.media-tag {
  background: #f0f0ed;
  color: #555;
  padding: 3px 7px;
  font-size: 11.5px;
  letter-spacing: 0.03em;
}
.media-tag.primary {
  background: #48AC30;
  color: #fff;
}
.media-card figcaption small {
  font-size: 11.5px;
  color: #999;
}
.media-empty {
  font-size: 14px;
  color: #666;
}
.admin-toast {
  position: fixed;
  right: 30px;
  bottom: 25px;
  z-index: 2000;
  background: #111;
  color: white;
  padding: 14px 22px;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s;
}
.admin-toast.show {
  opacity: 1;
  transform: none;
}
@media (max-width: 800px) {
  .admin-sidebar {
    width: 65px;
    padding: 25px 10px;
  }
  .admin-sidebar .logo {
    font-size: 15px;
  }
  .admin-sidebar .admin-label,
  .admin-sidebar nav span,
  .admin-user div,
  .admin-user > button {
    display: none;
  }
  .admin-nav {
    justify-content: center;
    font-size: 19px;
    padding: 14px 5px;
  }
  .admin-user {
    justify-content: center;
  }
  .admin-main {
    padding: 0 18px;
  }
  .admin-top {
    padding: 28px 0;
  }
  .admin-top h1 {
    font-size: 30px;
  }
  .admin-top-actions > a,
  .status-dot {
    display: none;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-columns {
    grid-template-columns: 1fr;
  }
  .admin-mobile-menu {
    display: none;
  }
}


/* Produktbilder im Produktformular: Upload, Vorschau und Reihenfolge */
.image-fieldset {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 18px;
  margin: 6px 0 18px;
}
.image-fieldset legend {
  padding: 0 8px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.image-preview {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}
.image-preview img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  display: block;
}
.image-preview figcaption {
  font-size: 13px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.6);
}
.image-fieldset .upload-label {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  max-width: 320px;
}
.image-fieldset input[type="file"] {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}
.image-fieldset input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.homepage-admin-note {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #e6e2d7;
  background: #f7f3e8;
  color: #5e5140;
}

.homepage-admin-note strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.homepage-admin-note span {
  font-size: 14px;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: normal;
}

.homepage-locked-grid,
.homepage-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
}

.homepage-product-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.homepage-locked-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 14px 0;
}

.homepage-locked-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.homepage-locked-card small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
}

.homepage-locked-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.homepage-locked-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.homepage-product-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dcdcd6;
  border-radius: 8px;
  background: #fafaf8;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.homepage-product-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #48AC30;
}

.homepage-product-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
  color: #111;
}

/* ------------------------------------------------------------------ */
/* Anmeldung des internen Bereichs                                     */
/* ------------------------------------------------------------------ */
/*
 * Zweigeteiltes Layout: links die schwarze Markenflaeche (dieselbe Farbe
 * wie die Admin-Seitenleiste), rechts das Formular auf hellem Grund. Das
 * verbindet die Anmeldung sichtbar mit dem Panel, statt wie eine fremde
 * Seite zu wirken.
 */

.login-body {
  margin: 0;
  background: #f0f0ed;
  color: #111;
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* --- Markenpaneel --- */

.login-brand {
  background: #111;
  color: #fff;
  padding: 46px 52px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Dezenter gruener Lichtschein als Markenakzent. */
.login-brand::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72, 172, 48, 0.42), transparent 68%);
  pointer-events: none;
}

.login-brand-logo {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #fff;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.login-brand-logo span {
  font-size: 12px;
  vertical-align: super;
  margin-left: 2px;
  color: #48ac30;
}

/* Druckhütte-Logo auf der Login-Seite */
.login-brand-logo img {
  display: block;
  width: auto;
  height: 52px;
  max-width: 100%;
}

.login-brand-copy {
  margin: auto 0;
  position: relative;
  z-index: 1;
}

.login-brand-kicker {
  color: #48ac30;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0 0 22px;
}

.login-brand-copy h2 {
  font-size: clamp(38px, 4.4vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 800;
  margin: 0 0 24px;
}

.login-brand-text {
  color: #9a9a96;
  font-size: 15px;
  line-height: 1.7;
  max-width: 330px;
  margin: 0;
}

.login-brand-foot {
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* --- Formularpaneel --- */

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.login-panel-inner {
  width: 100%;
  max-width: 380px;
}

.login-step {
  color: #48ac30;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin: 0 0 14px;
}

.login-panel h1 {
  font-size: 33px;
  letter-spacing: -0.055em;
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 12px;
}

.login-lead {
  color: #5f5f5c;
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 30px;
}

.login-alert {
  background: #fbe9e9;
  border-left: 3px solid #b62b2b;
  color: #8f1f1f;
  font-size: 12.5px;
  line-height: 1.55;
  padding: 13px 15px;
  margin: 0 0 24px;
}

/* --- Felder --- */

.login-field {
  display: block;
  margin-bottom: 20px;
}

.login-field > span {
  display: block;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #555;
  margin-bottom: 9px;
}

.login-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 15px 16px;
  border: 1px solid #dcdcd8;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: #111;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-field input::placeholder {
  color: #b4b4b0;
}

.login-field input:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.07);
}

/* --- Angemeldet bleiben --- */

.login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #555;
  cursor: pointer;
  margin: 4px 0 26px;
  user-select: none;
}

.login-remember input {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0;
  border: 1px solid #c9c9c4;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.login-remember input:checked {
  background: #111;
  border-color: #111;
}

.login-remember input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}

.login-remember input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(72, 172, 48, 0.35);
}

/* --- Absenden --- */

.login-submit {
  display: block;
  width: 100%;
  border: 0;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  padding: 17px 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}

.login-submit:hover {
  background: #48ac30;
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:focus-visible {
  outline: 2px solid #48ac30;
  outline-offset: 2px;
}

.login-back {
  margin: 30px 0 0;
  font-size: 12px;
}

.login-back a {
  color: #5f5f5c;
  text-decoration: none;
}

.login-back a:hover {
  color: #111;
}

/* --- Mobil: Markenpaneel wird zur Kopfzeile --- */

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 30px 26px 34px;
    min-height: 0;
  }

  .login-brand::after {
    width: 260px;
    height: 260px;
    right: -110px;
    bottom: -130px;
  }

  .login-brand-copy {
    margin: 26px 0 0;
  }

  .login-brand-copy h2 {
    font-size: 34px;
  }

  .login-brand-text,
  .login-brand-foot {
    display: none;
  }

  .login-panel {
    padding: 38px 24px 52px;
    align-items: flex-start;
  }

  .login-panel h1 {
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-field input,
  .login-remember input,
  .login-submit {
    transition: none;
  }
}

/* Abmelden-Knopf in der Seitenleiste und Kopfzeile */
.admin-logout-form {
  margin: 0 0 0 auto;
  display: flex;
}

.admin-top-actions .admin-logout-form {
  margin: 0;
}

.admin-logout-form button {
  background: none;
  border: 0;
  color: #888;
  font: inherit;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 6px 4px;
  transition: color 0.18s ease;
}

.admin-logout-form button:hover {
  color: #48ac30;
}

@media (max-width: 800px) {
  /* In der schmalen Leiste ist kein Platz fuer Text; die Kopfzeile bleibt. */
  .admin-sidebar .admin-logout-form {
    display: none;
  }
}


/* Mediathek: kompaktere, uebersichtlichere Darstellung */
.media-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.media-summary-item {
  background: #fff;
  border: 1px solid #e6e6e2;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.media-summary-number {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}
.media-summary-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.media-upload-panel {
  background: #fff;
  border: 1px solid #e6e6e2;
  margin-bottom: 18px;
}
.media-upload-panel > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.media-upload-panel > summary::-webkit-details-marker { display: none; }
.media-upload-panel > summary::before {
  content: "▸";
  font-size: 12px;
  color: #888;
  transition: transform 0.15s;
}
.media-upload-panel[open] > summary::before {
  transform: rotate(90deg);
}
.media-upload-icon {
  font-size: 16px;
  color: #48AC30;
}
.media-upload-summary strong {
  font-size: 14px;
  color: #111;
}
.media-upload-hint {
  font-size: 12px;
  color: #888;
  margin-left: auto;
}
.media-upload-form {
  padding: 0 18px 18px;
  margin: 0;
  border-top: 1px solid #eee;
}
.media-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.media-upload-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.media-status-error {
  color: #b00020 !important;
}
.media-filter-bar {
  margin-bottom: 18px;
}
.media-filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.media-filter-tab {
  background: #fff;
  border: 1px solid #e6e6e2;
  padding: 8px 14px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.media-filter-tab:hover {
  border-color: #48AC30;
  color: #111;
}
.media-filter-tab.active {
  background: #48AC30;
  border-color: #48AC30;
  color: #fff;
}
.media-filter-tab span {
  background: rgba(0,0,0,0.08);
  padding: 1px 7px;
  font-size: 11.5px;
  border-radius: 10px;
}
.media-filter-tab.active span {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.media-group {
  margin-bottom: 24px;
}
.media-group-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e6e6e2;
}
.media-group-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}
.media-group-count {
  font-size: 12px;
  color: #888;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.media-card {
  margin: 0;
  background: #fff;
  border: 1px solid #e6e6e2;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.media-card:hover {
  border-color: #48AC30;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.media-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f4f4f1;
  overflow: hidden;
}
.media-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-badge {
  position: absolute;
  top: 6px;
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.media-badge.primary {
  left: 6px;
  background: #48AC30;
}
.media-badge.upload {
  right: 6px;
  background: #111;
}
.media-badge.url {
  right: 6px;
  background: #888;
}
.media-card-info {
  padding: 8px 10px 4px;
  flex: 1;
}
.media-alt {
  margin: 0 0 3px;
  font-size: 12.5px;
  color: #333;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.media-alt.empty {
  color: #bbb;
  font-style: italic;
}
.media-meta {
  margin: 0;
  font-size: 11px;
  color: #999;
}
.media-card-actions {
  display: flex;
  gap: 4px;
  padding: 6px 8px 8px;
  border-top: 1px solid #f0f0ed;
  flex-wrap: wrap;
}
.media-action-btn {
  background: #f7f7f5;
  border: 1px solid #e6e6e2;
  padding: 4px 8px;
  font-size: 11.5px;
  color: #555;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.media-action-btn:hover {
  background: #48AC30;
  border-color: #48AC30;
  color: #fff;
}
.media-action-btn.danger:hover {
  background: #b00020;
  border-color: #b00020;
  color: #fff;
}
.media-action-btn span {
  font-size: 12px;
}
.media-hint {
  font-size: 11px;
  color: #aaa;
  padding: 4px 2px;
}
.media-empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 14px;
}
@media (max-width: 768px) {
  .media-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .media-upload-grid {
    grid-template-columns: 1fr;
  }
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* Mediathek: Suchfeld */
.media-search-row {
  margin-bottom: 12px;
}
.media-search-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 420px;
}
.media-search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: #888;
  pointer-events: none;
}
.media-search-input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border: 1px solid #e6e6e2;
  background: #fff;
  font-size: 13px;
  color: #111;
  transition: border-color 0.15s;
}
.media-search-input:focus {
  outline: none;
  border-color: #48AC30;
}
.media-search-input::placeholder {
  color: #aaa;
}
.media-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  line-height: 1;
}
.media-search-clear:hover {
  color: #b00020;
}
@media (max-width: 768px) {
  .media-search-box {
    max-width: 100%;
  }
}

/* Mediathek: Dropdown-Filter */
.media-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.media-dropdown-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.media-dropdown {
  padding: 8px 12px;
  border: 1px solid #e6e6e2;
  background: #fff;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.15s;
}
.media-dropdown:focus {
  outline: none;
  border-color: #48AC30;
}
@media (max-width: 768px) {
  .media-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .media-dropdown-filters {
    flex-direction: column;
  }
  .media-dropdown {
    width: 100%;
  }
}

/* Rundungen: generell keine harten Ecken mehr im Admin-Panel */
.admin-panel,
.stat-card,
.media-card,
.media-summary-item,
.media-upload-panel,
.admin-loading,
.draft-notice,
.media-empty,
.admin-form {
  border-radius: 12px;
}
.admin-button {
  border-radius: 8px;
}
.table-action,
.media-action-btn,
.media-filter-tab {
  border-radius: 8px;
}
.media-dropdown,
.media-search-input,
.admin-form input,
.admin-form select,
.admin-form textarea {
  border-radius: 8px;
}
.media-card-image {
  border-radius: 12px 12px 0 0;
}
.media-badge {
  border-radius: 4px;
}
.media-filter-tab span {
  border-radius: 10px;
}
.media-summary-item {
  border-radius: 10px;
}
.admin-nav {
  border-radius: 8px;
}
.admin-top h1 {
  letter-spacing: -0.02em;
}
.checkout-note {
  border-radius: 8px;
}
.admin-table {
  border-radius: 10px;
  overflow: hidden;
}
.admin-table th:first-child,
.admin-table td:first-child {
  border-top-left-radius: 0;
}
.admin-table th:last-child,
.admin-table td:last-child {
  border-top-right-radius: 0;
}
.order-status {
  border-radius: 6px;
}
.media-upload-panel > summary {
  border-radius: 12px;
}
.media-upload-panel[open] > summary {
  border-radius: 12px 12px 0 0;
}
.media-upload-form {
  border-radius: 0 0 12px 12px;
}
/* Eingabefelder und Buttons im allgemeinen Admin-Bereich */
.admin-form button,
.admin-form .admin-button {
  border-radius: 8px;
}
/* Karten und Panels: sanfter Schatten statt harter Kanten */
.admin-panel,
.media-card,
.media-summary-item {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
/* Hover-Effekte sanfter */
.media-card:hover,
.admin-panel:hover {
  transition: box-shadow 0.2s, border-color 0.2s;
}
/* Tabellen-Zeilen: abgerundete Ecken */
.admin-table tbody tr:first-child td:first-child {
  border-top-left-radius: 8px;
}
.admin-table tbody tr:first-child td:last-child {
  border-top-right-radius: 8px;
}
.admin-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}
.admin-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}
/* Scrollbar sanfter */
.admin-main ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.admin-main ::-webkit-scrollbar-track {
  background: #f4f4f1;
  border-radius: 4px;
}
.admin-main ::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.admin-main ::-webkit-scrollbar-thumb:hover {
  background: #48AC30;
}

/* Sidebar: groessere Schrift und schoenere Icons */
.admin-sidebar .logo {
  font-size: 28px;
  letter-spacing: 0.05em;
}
.admin-label {
  font-size: 12px;
  letter-spacing: 0.18em;
}
.admin-nav {
  font-size: 15px;
  padding: 12px 14px;
  gap: 12px;
  border-radius: 10px;
}
.admin-nav span {
  font-size: 15px;
  font-weight: 500;
}
.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.admin-nav:hover .nav-icon,
.admin-nav.active .nav-icon {
  opacity: 1;
}
.admin-nav.active {
  background: #292929;
  color: #fff;
}
.admin-nav.active .nav-icon {
  stroke: #48AC30;
}
.admin-nav:first-letter {
  font-size: inherit;
}
.admin-user strong {
  font-size: 14px;
}
.admin-user small {
  font-size: 12px;
}
.admin-sidebar .admin-logout-form button {
  font-size: 13px;
}

/* Body-Reset: kein weißer Rand um die Seite */
html, body {
  margin: 0;
  padding: 0;
}
.admin-body {
  margin: 0;
  padding: 0;
}
/* Sidebar: bessere Schriftart und Lesbarkeit */
.admin-sidebar {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.admin-nav span {
  font-weight: 500;
  letter-spacing: 0.01em;
}
.admin-sidebar .logo {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.admin-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.admin-user strong,
.admin-user small {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Hintergrund: kein Weiß mehr sichtbar */
html, body, .admin-body {
  background: #f0f0ed;
}
/* Schriftart durchgehend wie in der Sidebar */
.admin-body,
.admin-main,
.admin-top,
.admin-content,
.admin-panel,
.admin-form,
.admin-table,
.admin-loading,
.checkout-note,
.draft-notice,
.media-alt,
.media-meta,
.media-hint {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Admin-Top: weniger oberer Abstand */
.admin-top {
  padding-top: 30px;
}
/* Weißer Rand oben entfernen */
.admin-sidebar {
  margin-top: 0;
}

/* Sidebar-Logo */
.sidebar-logo {
  max-width: 160px;
  height: auto;
  display: block;
}
.admin-sidebar .logo {
  margin-bottom: 8px;
}
/* Sidebar-Hintergrund auf #111 (wie gewünscht) */
.admin-sidebar {
  background: #111;
}


/* Sidebar: schwarzer Hintergrund passend zum Logo */
.admin-sidebar {
  background: #000 !important;
}

/* Sidebar-Hintergrund zurück auf #111 */
.admin-sidebar { background: #111 !important; }

/* Sidebar-Hintergrund zurück auf #111 */
.admin-sidebar { background: #111 !important; }

/* Sidebar-Logo: höher und mittiger */
.admin-sidebar .logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 12px auto;
  padding: 0;
}
.sidebar-logo {
  max-width: 140px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.admin-label {
  margin-top: 8px;
}
/* Logo-Bereich kompakter */
.admin-sidebar > .logo {
  margin-bottom: 4px;
}

/* Sidebar-Logo: kleiner und mittiger */
.sidebar-logo {
  max-width: 120px;
  height: auto;
  display: block;
  margin: 0 auto 8px auto;
}
.admin-sidebar .logo {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
  padding: 0;
}
.admin-label {
  margin-top: 16px;
}

/* Sidebar-Logo: noch kleiner */
.sidebar-logo {
  max-width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 4px auto;
}
.admin-label {
  margin-top: 24px !important;
}

/* Produkte: verbesserte UI */
.product-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.product-summary-item {
  background: #fff;
  border: 1px solid #e6e6e2;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.product-summary-number {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}
.product-summary-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.product-filter-bar {
  margin-bottom: 18px;
}
.product-search-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 420px;
  margin-bottom: 10px;
}
.product-search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: #888;
  pointer-events: none;
}
.product-search-input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border: 1px solid #e6e6e2;
  background: #fff;
  font-size: 13px;
  color: #111;
  border-radius: 8px;
  transition: border-color 0.15s;
}
.product-search-input:focus {
  outline: none;
  border-color: #48AC30;
}
.product-search-input::placeholder {
  color: #aaa;
}
.product-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
}
.product-search-clear:hover {
  color: #b00020;
}
.product-filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.product-filter-tab {
  background: #fff;
  border: 1px solid #e6e6e2;
  padding: 8px 14px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  transition: all 0.15s;
}
.product-filter-tab:hover {
  border-color: #48AC30;
  color: #111;
}
.product-filter-tab.active {
  background: #48AC30;
  border-color: #48AC30;
  color: #fff;
}
.product-filter-tab span {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 7px;
  font-size: 11.5px;
  border-radius: 10px;
}
.product-filter-tab.active span {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.product-dropdown-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-dropdown {
  padding: 8px 12px;
  border: 1px solid #e6e6e2;
  background: #fff;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  min-width: 160px;
  border-radius: 8px;
  transition: border-color 0.15s;
}
.product-dropdown:focus {
  outline: none;
  border-color: #48AC30;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.product-cell img {
  width: 48px;
  height: 62px;
  object-fit: cover;
  border-radius: 6px;
  filter: grayscale(0.2);
}
.product-cell-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.product-cell-info strong {
  font-size: 13.5px;
  color: #111;
}
.product-sale-badge {
  display: inline-block;
  background: #b00020;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}
.product-sale-price {
  color: #b00020;
  font-weight: 600;
}
.table-empty {
  text-align: center;
  padding: 30px;
  color: #888;
  font-size: 14px;
}
.product-table tbody tr {
  transition: background 0.1s;
}
.product-table tbody tr:hover {
  background: #fafaf8;
}
@media (max-width: 768px) {
  .product-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-search-box {
    max-width: 100%;
  }
  .product-dropdown-filters {
    flex-direction: column;
  }
  .product-dropdown {
    width: 100%;
  }
  .product-cell img {
    width: 36px;
    height: 47px;
  }
}
.table-action.danger {
  color: #b00020;
}
.table-action.danger:hover {
  color: #fff;
  background: #b00020;
  border-radius: 4px;
  padding: 2px 6px;
}

/* Bestätigungsdialog (einheitlich für Produkte, Kategorien, Codes, Bilder) */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.confirm-modal {
  background: #fff;
  border-radius: 16px;
  padding: 30px 34px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
  animation: confirm-pop 0.16s ease-out;
}
@keyframes confirm-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  background: #eef6ea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.confirm-icon.danger {
  background: #fdecea;
}
.confirm-modal h3 {
  margin: 0 0 10px;
  font-size: 19px;
  color: #111;
}
.confirm-modal p {
  margin: 0 0 26px;
  font-size: 14.5px;
  color: #666;
  line-height: 1.55;
}
.confirm-modal .confirm-name {
  font-weight: 700;
  color: #111;
}
.confirm-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.confirm-buttons button {
  padding: 11px 26px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #e6e6e2;
  transition: all 0.15s;
}
.confirm-buttons .btn-cancel {
  background: #fff;
  color: #555;
}
.confirm-buttons .btn-cancel:hover {
  background: #f4f4f1;
}
.confirm-buttons .btn-delete {
  background: #b00020;
  color: #fff;
  border-color: #b00020;
}
.confirm-buttons .btn-delete:hover {
  background: #8a0019;
}
.confirm-buttons .btn-primary {
  background: #48AC30;
  color: #fff;
  border-color: #48AC30;
}
.confirm-buttons .btn-primary:hover {
  background: #3d9128;
}
.prompt-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 20px;
  padding: 11px 13px;
  border: 1px solid #dcdcd6;
  border-radius: 9px;
  font-size: 14.5px;
  font-family: inherit;
  color: #111;
  background: #fbfbf9;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.prompt-input:focus {
  border-color: #48AC30;
  background: #fff;
}
textarea.prompt-input {
  resize: vertical;
  line-height: 1.5;
}

/* Product action buttons */
.product-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.product-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #e6e6e2;
  background: #fff;
  color: #555;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.product-action-btn svg {
  width: 15px;
  height: 15px;
}
.product-action-btn.edit:hover {
  background: #48AC30;
  border-color: #48AC30;
  color: #fff;
}
.product-action-btn.delete:hover {
  background: #b00020;
  border-color: #b00020;
  color: #fff;
}
.product-action-btn.delete {
  color: #b00020;
  border-color: #f5c6cb;
}

/* ------------------------------------------------------------------ */
/* E-Mail-Vorlagen: Auswahl-Kacheln, Editor, Vorschau                  */
/* ------------------------------------------------------------------ */

.email-stats {
  margin-bottom: 16px;
}

/* Die vier Mailtypen als anklickbare Kacheln. */
.email-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.email-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid #e6e6e0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.email-card:hover {
  border-color: #cfe8c6;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.email-card.active {
  border-color: #48AC30;
  box-shadow: 0 0 0 2px rgba(72, 172, 48, 0.16);
}
.email-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: #111;
}
.email-card-trigger {
  font-size: 12.5px;
  line-height: 1.5;
  color: #777;
}
.email-card-counts {
  margin-top: 2px;
}
/* Kleines Etikett an Vorlagen, die angepasst wurden. */
.email-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef7ea;
  color: #2f7a1e;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Zweispaltig: links die Felder, rechts die Vorschau. */
.email-editor {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.1fr);
  gap: 22px;
  align-items: start;
}
@media (max-width: 1080px) {
  .email-editor {
    grid-template-columns: 1fr;
  }
}
.email-editor-fields label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.email-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid #dcdcd6;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 400;
  font-family: inherit;
  color: #111;
  background: #fbfbf9;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.email-input:focus {
  border-color: #48AC30;
  background: #fff;
}
.email-textarea {
  resize: vertical;
  line-height: 1.55;
}

/* Platzhalter zum Einfügen in den Text. */
.email-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
}
.email-chips-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.email-chip {
  padding: 5px 11px;
  border: 1px solid #dcdcd6;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.email-chip:hover {
  border-color: #48AC30;
  background: #eef7ea;
  color: #2f7a1e;
}

.email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-button.ghost {
  background: #fff;
  color: #333;
  border: 1px solid #dcdcd6;
}
.admin-button.ghost:hover {
  border-color: #48AC30;
  color: #2f7a1e;
  background: #f7fbf5;
}

/* Vorschau der Mail in einem eigenen Rahmen. */
.email-editor-preview {
  border: 1px solid #e6e6e0;
  border-radius: 14px;
  overflow: hidden;
  background: #f4f4f4;
}
.email-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
  font-size: 13.5px;
  color: #333;
}
.email-preview-frame {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
  background: #f4f4f4;
}
/* Über den Knopf in der Kopfzeile lässt sich die Vorschau ausblenden. */
.email-editor.preview-hidden .email-editor-preview {
  display: none;
}
.admin-icon-btn {
  padding: 6px 12px;
  border: 1px solid #dcdcd6;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.admin-icon-btn:hover {
  border-color: #48AC30;
  color: #2f7a1e;
}

/* ------------------------------------------------------------------ */
/* Klarheit fuer Nicht-Techniker: Buttons, Felder, Hinweise            */
/* ------------------------------------------------------------------ */

/* Aktionsspalte: Speichern und Löschen deutlich getrennt. */
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Tabellen-Buttons mit Icon und klarer Fläche. */
.admin-table .table-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #dcdcd6;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.admin-table .table-action svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.admin-table .table-action:hover {
  border-color: #48AC30;
  color: #2f7a1e;
  background: #f7fbf5;
}
.admin-table .table-action:disabled {
  opacity: 0.55;
  cursor: default;
}
.admin-table .table-action.danger {
  color: #b00020;
  border-color: #eccfd4;
}
.admin-table .table-action.danger:hover {
  color: #fff;
  background: #b00020;
  border-color: #b00020;
  border-radius: 8px;
  padding: 8px 14px;
}

/* Inline-Felder in Tabellen (Kategorien, Versand). Saubere Optik. */
.inline-input {
  display: inline-block;
  padding: 9px 12px;
  border: 1px solid #dcdcd6;
  border-radius: 8px;
  background: #fafaf8;
  color: #111;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  height: auto;
  min-height: 38px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.inline-input:focus {
  outline: none;
  border-color: #48AC30;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(72, 172, 48, 0.12);
}
.inline-input[type="number"] {
  text-align: right;
}
select.inline-input {
  padding-right: 30px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.inline-field .inline-input {
  width: 110px;
}

/* Zeilen in Bearbeitungs-Tabellen. */
.admin-table tbody tr {
  transition: background 0.12s;
}
.admin-table tbody tr:hover {
  background: #fafaf8;
}
.admin-table td {
  vertical-align: middle;
}
.admin-table td .row-actions {
  justify-content: flex-start;
}

/* Checkbox in Tabellenzeilen. */
.admin-table .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: #333;
  cursor: pointer;
}
.admin-table .check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #48AC30;
  cursor: pointer;
}
.admin-table .check span {
  font-weight: 500;
}

/* Hinweiszeile unter Tabellen. */
.admin-table + .draft-notice,
.table-wrap + .draft-notice {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f4f8f2;
  border: 1px solid #dcebd6;
  color: #46603c;
  font-size: 13px;
  line-height: 1.5;
}
.inline-field .unit {
  color: #666;
  font-size: 13px;
  font-weight: 600;
}

/* Zweizeilige Spaltenköpfe (Hauptbegriff + Erläuterung). */
.admin-table th small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #8a8a84;
}

/* Hinweiszeile unter Filtern. */
.product-filter-hint {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f4f8f2;
  border: 1px solid #dcebd6;
  color: #46603c;
  font-size: 13px;
  line-height: 1.5;
}

/* Hinweis zu kleinen Formularfeldern. */
.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #777;
  text-transform: none;
  letter-spacing: 0;
}

/* Zurücksetzen: sichtbar anders als Speichern, aber kein Alarmrot. */
.admin-button.danger-ghost {
  background: #fff;
  color: #b00020;
  border: 1px solid #eccfd4;
}
.admin-button.danger-ghost:hover {
  background: #fdf2f4;
  border-color: #b00020;
}

/* Zustandsetikett "In Vorbereitung". */
.order-status.pending {
  background: #fdf3e0;
  color: #9a6a10;
}

/* Deaktivierte Auswahlfelder klar erkennen. */
.product-dropdown:disabled,
.media-dropdown:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/* Produkt-Editor: klarere Struktur, Auswahl-Kacheln, rechte Spalte   */
/* ------------------------------------------------------------------ */

.admin-form.admin-form-wide.product-editor-form {
  max-width: none;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.product-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.product-editor-main {
  display: grid;
  gap: 18px;
}

.product-editor-section,
.product-editor-preview-card,
.product-editor-side-card {
  background: #fff;
  border: 1px solid #e6e6e2;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.product-editor-section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.product-editor-section-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #111;
}

.product-editor-copy {
  margin: 0;
  max-width: 320px;
  color: #777;
  font-size: 13px;
  line-height: 1.6;
}

.product-editor-grid {
  display: grid;
  gap: 16px;
}

.product-editor-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-field {
  display: block;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
}

.product-field > span,
.upload-label > span {
  display: block;
  margin-bottom: 8px;
  color: #444;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-field-full {
  grid-column: 1 / -1;
}

.product-field-nested {
  margin-top: 14px;
}

.product-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.product-choice-grid-audience {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-choice-card {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px;
}

.product-choice-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.product-choice-card-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 88px;
  padding: 14px 15px;
  border: 1px solid #dcdcd6;
  border-radius: 14px;
  background: #fafaf8;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.product-choice-card-box strong {
  color: #111;
  font-size: 14px;
  line-height: 1.3;
}

.product-choice-card-box small {
  color: #777;
  font-size: 12px;
  line-height: 1.45;
}

.product-choice-card:hover .product-choice-card-box {
  border-color: #cfe8c6;
  background: #f7fbf5;
}

.product-choice-card input:checked + .product-choice-card-box {
  border-color: #48ac30;
  background: #eef7ea;
  box-shadow: 0 0 0 3px rgba(72, 172, 48, 0.12);
  transform: translateY(-1px);
}

.product-choice-card input:checked + .product-choice-card-box strong,
.product-choice-card input:checked + .product-choice-card-box small {
  color: #1f4c14;
}

.product-choice-card input:focus-visible + .product-choice-card-box {
  border-color: #48ac30;
  box-shadow: 0 0 0 3px rgba(72, 172, 48, 0.16);
}

.product-editor-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 24px;
}

.product-editor-preview-media {
  border-radius: 14px;
  overflow: hidden;
  background: #f4f4f1;
  aspect-ratio: 1 / 1.15;
  margin-bottom: 14px;
}

.product-editor-preview-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-editor-preview-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: #8a8a84;
  font-size: 14px;
  line-height: 1.5;
}

.product-editor-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-editor-preview-copy strong {
  color: #111;
  font-size: 19px;
  line-height: 1.15;
}

.product-editor-preview-copy span {
  color: #777;
  font-size: 13px;
}

.product-editor-preview-copy b {
  margin-top: 4px;
  color: #111;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.product-editor-meta-list {
  display: grid;
  gap: 12px;
}

.product-editor-meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0ed;
}

.product-editor-meta-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.product-editor-meta-list span {
  color: #777;
  font-size: 13px;
}

.product-editor-meta-list strong {
  color: #111;
  font-size: 13px;
  text-align: right;
}

.product-editor-side-note {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.65;
}

.product-editor-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 18px;
}

.product-editor-actions .admin-button {
  min-width: 240px;
}

.product-editor-form .image-fieldset {
  border: 1px solid #e6e6e2;
  border-radius: 16px;
  padding: 18px;
  margin: 0;
  background: #fcfcfb;
}

.product-editor-form .image-fieldset legend {
  padding: 0 8px;
  color: #777;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-editor-form .image-preview {
  border: 1px solid #ecece8;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.product-editor-form .image-preview figcaption {
  color: #666;
  padding-bottom: 0;
}

.product-editor-form .image-preview-actions {
  display: flex;
  gap: 8px;
  padding: 10px;
}

.product-editor-form .image-order-btn,
.product-editor-form .image-remove-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #d9d9d4;
  border-radius: 10px;
  background: #f7f7f4;
  color: #222;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease;
}

.product-editor-form .image-order-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.product-editor-form .image-remove-btn {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.product-editor-form .image-order-btn:hover:not(:disabled),
.product-editor-form .image-remove-btn:hover {
  border-color: #48ac30;
  background: #eef7ea;
  color: #1f4c14;
}

.product-editor-form .image-order-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.product-editor-form .upload-label {
  display: block;
  max-width: none;
  text-transform: none;
  letter-spacing: normal;
}

.product-editor-form .upload-label input[type="file"] {
  width: 100%;
  padding: 12px 13px;
  border: 1px dashed #cfd7cb;
  border-radius: 12px;
  background: #fff;
  color: #555;
}

.product-editor-form .upload-label input[type="file"]::file-selector-button {
  border: 1px solid #dcdcd6;
  border-radius: 8px;
  background: #f7f7f5;
  color: #333;
}

@media (max-width: 1160px) {
  .product-editor-layout {
    grid-template-columns: 1fr;
  }

  .product-editor-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .product-editor-grid-two,
  .product-choice-grid-audience {
    grid-template-columns: 1fr;
  }

  .product-editor-section,
  .product-editor-preview-card,
  .product-editor-side-card {
    padding: 18px;
  }

  .product-editor-section-head {
    flex-direction: column;
    gap: 8px;
  }

  .product-editor-copy {
    max-width: none;
  }

  .product-editor-actions .admin-button {
    width: 100%;
    min-width: 0;
  }
}

/* Zusätzlicher Abstand in Felder-Tabellen. */
.admin-table-fields td {
  vertical-align: middle;
}

/* Kategorie-Links Editor im Admin */
.category-link-editor {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.category-link-editor input {
  padding: 8px 10px;
  border: 1px solid #dcdcd6;
  border-radius: 8px;
  background: #fafaf8;
  font-size: 13px;
  font-family: inherit;
}

.category-link-editor .cl-label { flex: 1; min-width: 100px; }
.category-link-editor .cl-url { flex: 1; min-width: 120px; }
.category-link-editor .cl-image { flex: 2; min-width: 150px; }
/* Seiteninhalte Editor */
.page-editor-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  margin-top: 18px;
}

.page-editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e6e6e0;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-align: left;
  width: 100%;
}

.page-nav-item:hover {
  border-color: #48AC30;
  background: #f7fbf5;
}

.page-nav-item.active {
  border-color: #48AC30;
  background: #48AC30;
  color: #fff;
}

.page-nav-icon {
  font-size: 16px;
}

.page-editor-main {
  min-width: 0;
}

.page-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.page-editor-header .page-editor-icon {
  font-size: 24px;
}

.page-editor-header h3 {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.02em;
}

.page-editor label {
  display: block;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 16px;
}

.page-editor label input,
.page-editor label textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #dcdcd6;
  border-radius: 8px;
  background: #fafaf8;
  font: inherit;
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
  box-sizing: border-box;
}

.page-editor label textarea {
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
}

.page-editor label input:focus,
.page-editor label textarea:focus {
  outline: none;
  border-color: #48AC30;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(72, 172, 48, 0.12);
}

@media (max-width: 700px) {
  .page-editor-layout {
    grid-template-columns: 1fr;
  }

  .page-editor-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .page-nav-item {
    flex: 1 1 45%;
    font-size: 12px;
    padding: 8px 10px;
  }
}
/* Seiteninhalte Baukasten */
.block-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.block-toolbar-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-right: 4px;
}

.block-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.block-item {
  border: 1px solid #e6e6e0;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  transition: border-color 0.15s;
  position: relative;
}

.block-item:hover {
  border-color: #48AC30;
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.block-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  font-weight: 600;
}

.block-remove {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.block-remove:hover {
  color: #b00020;
  background: #fdf2f4;
}

.block-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 4px 0;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
  color: #111;
}

.block-input:focus {
  outline: none;
}

.block-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.block-toolbar-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-right: 4px;
}

.block-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.page-preview {
  border: 1px solid #e6e6e0;
  border-radius: 8px;
  padding: 16px 20px;
  background: #fafaf8;
  margin-top: 16px;
}

.page-preview-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #999;
  margin: 0 0 10px;
  font-weight: 600;
}

.page-preview-content h2 {
  font-size: 17px;
  margin: 14px 0 6px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.page-preview-content p {
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  margin: 0 0 10px;
}


/* Seiteninhalte – Editor v2 */
.pe-root { display: grid; grid-template-columns: 210px minmax(0, 1fr) 340px; gap: 22px; align-items: start; margin-top: 8px; }
.pe-nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 16px; }
.pe-navitem { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid #e4e4de; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: #222; text-align: left; cursor: pointer; transition: all .15s; }
.pe-navitem:hover { border-color: #48AC30; }
.pe-navitem.active { background: #111; border-color: #111; color: #fff; }
.pe-icon { font-size: 16px; }
.pe-card { background: #fff; border: 1px solid #e4e4de; border-radius: 16px; padding: 28px 30px; min-width: 0; }
.pe-kicker { margin: 0 0 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8a8a84; font-weight: 700; }
.pe-head { margin: 0 0 22px; font-size: 26px; letter-spacing: -.03em; }
.pe-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #555; letter-spacing: .04em; }
.pe-title { width: 100%; padding: 13px 15px; border: 1px solid #dcdcd6; border-radius: 10px; background: #fafaf8; font: inherit; font-size: 16px; font-weight: 600; box-sizing: border-box; }
.pe-title:focus, .pe-input:focus { outline: none; border-color: #48AC30; background: #fff; box-shadow: 0 0 0 3px rgba(72, 172, 48, .14); }
.pe-field { margin-bottom: 26px; }
.pe-blocks { display: flex; flex-direction: column; gap: 14px; }
.pe-block { border: 1px solid #e4e4de; border-radius: 12px; padding: 14px 16px 12px; background: #fff; }
.pe-block.is-heading { background: #f7f7f4; }
.pe-block-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pe-badge { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #48AC30; }
.pe-remove { background: none; border: 0; color: #9a9a94; font: inherit; font-size: 12px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.pe-remove:hover { color: #b00020; background: #fdf2f4; }
.pe-input { width: 100%; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; background: transparent; font: inherit; font-size: 15px; line-height: 1.65; color: #111; resize: none; overflow: hidden; box-sizing: border-box; }
.pe-input:hover { border-color: #e4e4de; }
.is-heading .pe-input { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.pe-add { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.pe-addbtn { padding: 12px 18px; border: 1.5px dashed #bfbfb8; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: #333; cursor: pointer; transition: all .15s; }
.pe-addbtn:hover { border-color: #48AC30; color: #2f7a1e; background: #f7fbf5; }
.pe-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 26px; padding-top: 20px; border-top: 1px solid #efefea; }
.pe-status { font-size: 13px; color: #2f7a1e; margin-right: auto; }
.pe-save { padding: 13px 26px; border: 0; border-radius: 12px; background: #111; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pe-save:hover { background: #48AC30; }
.pe-save:disabled { opacity: .6; cursor: default; }
.pe-preview { background: #fff; border: 1px solid #e4e4de; border-radius: 16px; padding: 24px 26px; position: sticky; top: 16px; }
.pe-preview-body { margin-top: 12px; }
.pe-preview-body h2 { font-size: 20px; letter-spacing: -.02em; margin: 18px 0 8px; }
.pe-preview-body h2:first-child { margin-top: 0; }
.pe-preview-body p { font-size: 14px; line-height: 1.7; color: #444; margin: 0 0 12px; }
.pe-empty { color: #999; font-size: 13px; }
@media (max-width: 1100px) {
  .pe-root { grid-template-columns: 1fr; }
  .pe-nav { flex-direction: row; flex-wrap: wrap; position: static; }
  .pe-navitem { flex: 1 1 200px; }
  .pe-preview { position: static; }
}

/* Startseite – Editor v3 */
.hp-root { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; width: 100%; margin-top: 8px; }
.hp-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hp-card { background: #fff; border: 1px solid #e4e4de; border-radius: 16px; padding: 24px 26px; }
.hp-card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.hp-card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: 1; flex-wrap: wrap; }
.hp-step { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.hp-card h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.02em; }
.hp-desc { margin: 0; font-size: 13px; color: #6b6b65; line-height: 1.5; }
.hp-kicker { margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8a8a84; font-weight: 700; }
.hp-field { display: block; }
.hp-field > span { display: block; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 7px; letter-spacing: .03em; }
.hp-field input { width: 100%; padding: 12px 14px; border: 1px solid #dcdcd6; border-radius: 10px; background: #fafaf8; font: inherit; font-size: 15px; box-sizing: border-box; }
.hp-field input:focus { outline: none; border-color: #48AC30; background: #fff; box-shadow: 0 0 0 3px rgba(72, 172, 48, .14); }
.hp-switch { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 16px; cursor: pointer; font-size: 14px; font-weight: 600; }
.hp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.hp-switch-ui { width: 44px; height: 26px; border-radius: 99px; background: #d6d6d0; position: relative; flex: none; transition: background .2s; }
.hp-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.hp-switch input:checked + .hp-switch-ui { background: #48AC30; }
.hp-switch input:checked + .hp-switch-ui::after { transform: translateX(18px); }
.hp-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: center; }
.hp-hero-preview { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111 center / cover no-repeat; border: 1px dashed #bfbfb8; display: grid; place-items: center; }
.hp-hero-preview span { color: #888; font-size: 13px; }
.hp-upload { position: relative; display: inline-flex; padding: 12px 18px; border-radius: 12px; background: #111; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s; }
.hp-upload:hover { background: #48AC30; }
.hp-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hp-hint { font-size: 13px; color: #777; margin: 10px 0 0; line-height: 1.5; }
.hp-tools { display: flex; gap: 8px; margin-bottom: 12px; }
.hp-btn-ghost { padding: 8px 14px; border: 1px solid #dcdcd6; border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hp-btn-ghost:hover { border-color: #48AC30; color: #2f7a1e; }
.hp-count { font-size: 12px; font-weight: 700; color: #2f7a1e; background: #eef8ea; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.hp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hp-tile { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; border: 1.5px solid #e4e4de; border-radius: 12px; background: #fafaf8; cursor: pointer; transition: border-color .15s, background .15s; }
.hp-tile:hover { border-color: #48AC30; }
.hp-tile input { position: absolute; opacity: 0; pointer-events: none; }
.hp-tile-check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #bfbfb8; background: #fff; display: grid; place-items: center; color: transparent; font-size: 13px; font-weight: 800; }
.hp-tile-name { font-size: 13px; font-weight: 600; line-height: 1.35; color: #111; }
.hp-tile:has(input:checked) { border-color: #48AC30; background: #f4faf1; }
.hp-tile:has(input:checked) .hp-tile-check { background: #48AC30; border-color: #48AC30; color: #fff; }
.hp-tile:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(72, 172, 48, .2); }
.hp-empty { font-size: 13px; color: #888; margin: 0; }
.hp-cat { display: flex; gap: 14px; align-items: flex-end; padding: 16px; border: 1px solid #e4e4de; border-radius: 12px; background: #fafaf8; margin-bottom: 10px; }
.hp-cat-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; min-width: 0; }
.hp-wide { grid-column: 1 / -1; }
.hp-remove { padding: 11px 14px; border: 0; background: none; color: #9a9a94; font: inherit; font-size: 13px; cursor: pointer; border-radius: 8px; }
.hp-remove:hover { color: #b00020; background: #fdf2f4; }
.hp-add { width: 100%; padding: 14px; border: 1.5px dashed #bfbfb8; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .15s; }
.hp-add:hover { border-color: #48AC30; color: #2f7a1e; background: #f7fbf5; }
.hp-side { position: sticky; top: 16px; }
.hp-summary { list-style: none; padding: 0; margin: 14px 0 20px; }
.hp-summary li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; padding: 11px 0; border-bottom: 1px solid #efefea; }
.hp-summary li span { color: #555; }
.hp-save { width: 100%; padding: 15px; border: 0; border-radius: 12px; background: #111; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.hp-save:hover { background: #48AC30; }
.hp-save:disabled { opacity: .6; cursor: default; }
.hp-status { min-height: 18px; font-size: 13px; color: #2f7a1e; text-align: center; margin: 10px 0 0; }
.hp-link { display: block; text-align: center; margin-top: 10px; font-size: 14px; font-weight: 600; color: #2f7a1e; text-decoration: none; }
.hp-link:hover { text-decoration: underline; }
@media (max-width: 1100px) {
  .hp-root { grid-template-columns: 1fr; }
  .hp-side { position: static; order: -1; }
}
@media (max-width: 700px) {
  .hp-hero { grid-template-columns: 1fr; }
  .hp-cat { flex-direction: column; align-items: stretch; }
  .hp-cat-fields { grid-template-columns: 1fr; }
}

/* Startseite – Picker v4 */
.hp-picker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.hp-picker-col { min-width: 0; }
.hp-picker-label { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: #555; letter-spacing: .03em; }
.hp-picker-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hp-picker-head .hp-picker-label { margin-bottom: 0; }
.hp-picker-search { width: 100%; padding: 12px 14px; border: 1px solid #dcdcd6; border-radius: 10px; background: #fafaf8; font: inherit; font-size: 15px; box-sizing: border-box; margin-bottom: 10px; }
.hp-picker-search:focus { outline: none; border-color: #48AC30; background: #fff; box-shadow: 0 0 0 3px rgba(72, 172, 48, .14); }
.hp-results { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 2px; }
.hp-result { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 1px solid #e4e4de; border-radius: 10px; background: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.hp-result:hover { border-color: #48AC30; background: #f4faf1; }
.hp-result b { width: 24px; height: 24px; border-radius: 50%; background: #48AC30; color: #fff; display: grid; place-items: center; font-size: 15px; flex: none; }
.hp-selected { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.hp-sel-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border: 1px solid #e4e4de; border-radius: 10px; background: #fafaf8; }
.hp-sel-num { width: 24px; height: 24px; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.hp-sel-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-selected .hp-remove { padding: 6px 10px; font-size: 12px; }
.hp-btn-ghost { padding: 8px 14px; border: 1px solid #dcdcd6; border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.hp-btn-ghost:hover { border-color: #b00020; color: #b00020; }
@media (max-width: 760px) {
  .hp-picker { grid-template-columns: 1fr; }
}

/* Seiteninhalte – Bild-Blöcke */
.pe-block.is-image { background: #fff; }
.pe-image-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
.pe-image-thumb { width: 180px; height: 120px; object-fit: cover; border-radius: 12px; background: #f1f1ee; }
.pe-image-fields { min-width: 0; }
.pe-image-fields .pe-input { border: 1px solid #dcdcd6; background: #fafaf8; padding: 10px 12px; font-size: 14px; }
.pe-hint { margin: 8px 0 0; font-size: 12px; color: #8a8a84; }
.pe-figure { margin: 18px 0; }
.pe-figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 700px) {
  .pe-image-row { grid-template-columns: 1fr; }
  .pe-image-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

/* Startseite – Kategorie-Bilder */
.hp-cat { align-items: center; }
.hp-cat-thumb { position: relative; flex: none; width: 120px; height: 80px; border-radius: 10px; background: #ececE6 center / cover no-repeat; border: 1px dashed #bfbfb8; display: grid; place-items: center; }
.hp-cat-thumb.has-img { border-style: solid; border-color: #e4e4de; }
.hp-cat-thumb span { font-size: 12px; color: #888; }
.hp-cat-imgtools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hp-filebtn { position: relative; overflow: hidden; }
.hp-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
@media (max-width: 700px) {
  .hp-cat { flex-direction: column; align-items: stretch; }
  .hp-cat-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

/* Startseite – Slides v6 */
.hp-field textarea { width: 100%; padding: 12px 14px; border: 1px solid #dcdcd6; border-radius: 10px; background: #fafaf8; font: inherit; font-size: 15px; line-height: 1.5; resize: vertical; box-sizing: border-box; }
.hp-field textarea:focus { outline: none; border-color: #48AC30; background: #fff; box-shadow: 0 0 0 3px rgba(72, 172, 48, .14); }
.hp-slide { border: 1px solid #e4e4de; border-radius: 14px; padding: 18px; margin-bottom: 14px; background: #fcfcfa; }
.hp-slide:last-child { margin-bottom: 0; }
.hp-slide-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.hp-slide-num { font-size: 13px; font-weight: 800; letter-spacing: .04em; color: #111; }
.hp-slide-note { font-size: 12px; color: #8a8a84; }
.hp-slide-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.hp-media-preview { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111 center / cover no-repeat; border: 1px dashed #bfbfb8; display: grid; place-items: center; }
.hp-media-preview.has-media { border-style: solid; border-color: #e4e4de; }
.hp-media-preview span { font-size: 13px; color: #888; }
.hp-media-preview video { width: 100%; height: 100%; object-fit: cover; }
.hp-seg { display: inline-flex; margin-top: 12px; padding: 4px; border-radius: 999px; background: #efefea; }
.hp-seg button { padding: 7px 16px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: #555; cursor: pointer; }
.hp-seg button.active { background: #111; color: #fff; }
.hp-slide-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hp-slide-tools .hp-filebtn { background: #111; color: #fff; border-color: #111; }
.hp-slide-tools .hp-filebtn:hover { background: #48AC30; border-color: #48AC30; }
.hp-slide-text { display: grid; gap: 14px; min-width: 0; }
.hp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp-duration-row { display: flex; align-items: center; gap: 12px; }
.hp-duration-row input { width: 120px; padding: 12px 14px; border: 1px solid #dcdcd6; border-radius: 10px; background: #fafaf8; font: inherit; font-size: 15px; box-sizing: border-box; }
.hp-duration-row input:focus { outline: none; border-color: #48AC30; background: #fff; box-shadow: 0 0 0 3px rgba(72, 172, 48, .14); }
.hp-duration-row small { font-size: 12px; color: #8a8a84; }
@media (max-width: 900px) {
  .hp-slide-body { grid-template-columns: 1fr; }
  .hp-grid2 { grid-template-columns: 1fr; }
}
