.mfg-portal {
  --mfg-panel: #1b1c1f;
  --mfg-text: #f4f4f2;
  --mfg-muted: #a8abb1;
  --mfg-accent: #d8c7b0;
  color: var(--mfg-text);
  font: inherit;
}

/* Aktivitäten und der Hinweis neben dem Kundenkonto. */
.mfg-dashboard-links { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.mfg-customer-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.mfg-gallery-name .mfg-customer-line { white-space:normal; overflow:visible; }
.mfg-customer-line > span { min-width:0; overflow-wrap:anywhere; }
.mfg-activity-page .wp-block-post-title { display:none; }
.mfg-gallery-name .mfg-activity-link { display:inline-flex; align-items:center; gap:4px; padding:4px 6px; color:#666 !important; font-size:12px; line-height:1; text-decoration:none; border-radius:6px; }
.mfg-gallery-name .mfg-activity-link.has-unread { color:#8e3f12 !important; background:#fff0df; }
.mfg-activity-count { min-width:16px; font-weight:700; text-align:center; }
.mfg-activities { width:100%; min-width:0; }
.mfg-activity-filters { display:flex; align-items:end; flex-wrap:wrap; gap:14px; margin:28px 0 20px; }
.mfg-activity-filters label { display:flex; flex:1 1 160px; flex-direction:column; gap:7px; color:#4b4740; font-size:13px; font-weight:600; }
.mfg-activity-filters select { min-width:0; width:100%; min-height:42px; padding:8px 28px 8px 10px; border:1px solid #d8d5ce; border-radius:8px; color:#171717; background:#fff; font:inherit; }
.mfg-activity-filters > a { padding:10px 0; font-size:13px; }
.mfg-activity-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; color:#55524c; font-size:13px; }
.mfg-activity-toolbar p { margin:0; }
.mfg-activity-toolbar button { cursor:pointer; font:inherit; }
.mfg-activity-table-wrap { width:100%; overflow-x:auto; border:1px solid #dedbd4; border-radius:12px; background:#fff; }
.mfg-activity-table { width:100%; min-width:680px; border-collapse:collapse; color:#292723; font-size:13px; line-height:1.5; text-align:left; }
.mfg-activity-table th { padding:14px 16px; color:#605b52; background:#f0eee8; font-size:12px; font-weight:600; }
.mfg-activity-table td { padding:16px; border-top:1px solid #e9e5df; vertical-align:top; overflow-wrap:anywhere; }
.mfg-activity-table td:first-child { min-width:150px; }
.mfg-activity-table td:nth-child(2) { min-width:110px; overflow-wrap:normal; }
.mfg-activity-table td:nth-child(3) { min-width:120px; overflow-wrap:normal; }
.mfg-activity-table td:nth-child(4) { min-width:150px; overflow-wrap:normal; }
.mfg-activity-table td:nth-child(5) { min-width:200px; }
.mfg-activity-scroll-hint { display:none; }
.mfg-activity-table tr.is-unread { background:#fffbf3; }
.mfg-activity-table small { display:block; margin-top:4px; color:#746e63; }
.mfg-activity-table details { margin-top:8px; }
.mfg-activity-table summary { color:#805025; cursor:pointer; }
.mfg-activity-table ul { max-height:240px; margin:10px 0 0; padding-left:18px; overflow:auto; }
.mfg-activity-new { display:inline-block; margin:5px 0 0 6px; padding:1px 6px; color:#8e3f12; background:#ffe7c8; border-radius:4px; font-size:11px; font-weight:600; }
.mfg-activity-pagination { display:flex; justify-content:center; align-items:center; gap:24px; margin:24px 0; font-size:13px; }
.mfg-activity-note { margin:22px 0 0; color:#706a60; font-size:12px; line-height:1.7; }
.mfg-activity-link:focus-visible { outline:2px solid #8e3f12; outline-offset:3px; }
.mfg-activities .mfg-activity-filters select { color:#171717; background:#fff; border-color:#d8d5ce; }
.mfg-activities .mfg-activity-table { background:#fff; color:#292723; }
.mfg-activities .mfg-activity-toolbar button { color:#171717; background:#fff; border:1px solid #c9c5bd; padding:10px 14px; border-radius:8px; }
.mfg-activities .mfg-activity-filters button { color:#fff; background:#171717; min-height:42px; padding:10px 18px; border-radius:8px; }
@media(max-width:600px) {
 .mfg-activity-scroll-hint { display:block; margin:0 0 10px; color:#706a60; font-size:12px; }
 .mfg-activity-filters label { flex-basis:calc(50% - 14px); }
 .mfg-activity-toolbar form,.mfg-activity-toolbar button { max-width:100%; }
 .mfg-activity-toolbar button { white-space:normal; text-align:left; }
 .mfg-activity-table { min-width:640px; }
 .mfg-activity-table td,.mfg-activity-table th { padding:12px; }
 .mfg-activity-pagination { gap:16px; }
}

.mfg-portal,
.mfg-portal * {
  box-sizing: border-box;
}

/* Die Anmeldung bleibt auch bei starken Theme-Vorgaben gut lesbar. */
.mfg-portal.mfg-login-card {
  width: 100%;
  max-width: 720px;
  min-width: 0;
  padding: clamp(28px, 6vw, 64px);
  color: #171717;
  background: #f8f7f3;
  border: 1px solid #d8d5ce;
  border-radius: 24px;
  box-shadow: 0 16px 44px rgb(0 0 0 / 8%);
}

.mfg-login-card form,
.mfg-login-card form p,
.mfg-login-card input {
  min-width: 0;
  max-width: 100%;
}

.mfg-login-card .mfg-login-error {
  margin: 0 0 24px;
  padding: 12px 14px;
  border-left: 3px solid #a73831;
  background: #f4e8e5;
  color: #641d19 !important;
  overflow-wrap: anywhere;
}

.mfg-login-card .mfg-login-eyebrow {
  margin: 0 0 18px;
  color: #8d2b25 !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.mfg-login-card h2 {
  margin: 0 0 18px;
  color: #171717 !important;
  font-size: clamp(2.7rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.mfg-login-card .mfg-login-intro {
  margin: 0 0 34px;
  color: #55524c !important;
  font-size: 1rem;
}

.mfg-login-card form {
  display: grid;
  gap: 20px;
}

.mfg-login-card form p {
  margin: 0;
}

.mfg-login-card label,
.mfg-login-card .login-remember label {
  color: #171717 !important;
  font-size: 0.98rem;
  font-weight: 650;
}

.mfg-login-card input[type="text"],
.mfg-login-card input[type="password"] {
  display: block;
  width: 100%;
  min-height: 58px;
  margin-top: 9px;
  padding: 12px 16px;
  border: 1px solid #c9c5ba !important;
  border-radius: 8px;
  outline: none;
  background: #fffbd1 !important;
  color: #171717 !important;
  font: inherit;
  box-shadow: none !important;
}

.mfg-login-card input[type="text"]:focus,
.mfg-login-card input[type="password"]:focus {
  border-color: #171717 !important;
  box-shadow: 0 0 0 2px rgb(23 23 23 / 12%) !important;
}

.mfg-login-card .login-remember label {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 400;
}

.mfg-login-card .login-remember input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #171717;
}

.mfg-login-card .login-submit {
  margin: 4px 0 0;
}

.mfg-login-card input[type="submit"] {
  display: inline-flex;
  min-height: 50px;
  padding: 12px 24px;
  border: 1px solid #171717 !important;
  border-radius: 0;
  background: #171717 !important;
  color: #fff !important;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mfg-login-card input[type="submit"]:hover,
.mfg-login-card input[type="submit"]:focus-visible {
  background: #8d2b25 !important;
  border-color: #8d2b25 !important;
}

.mfg-login-card .mfg-login-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 24px 0 0;
}

.mfg-login-card .mfg-login-links a,
.mfg-login-card .mfg-portal-link {
  color: #4f4d48 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mfg-login-card .mfg-portal-help {
  margin: 30px 0 0;
  color: #68655f !important;
  font-size: 0.92rem;
}

@media (max-width: 600px) {
  .mfg-portal.mfg-login-card {
    max-width: 100%;
    padding: 28px 20px;
    border-radius: 14px;
  }
}

.mfg-portal h2,
.mfg-portal h3 {
  color: inherit;
}

.mfg-portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--mfg-accent);
  border-radius: 3px;
  background: var(--mfg-accent);
  color: #171717;
  text-decoration: none;
  cursor: pointer;
}

.mfg-portal-button:hover {
  filter: brightness(1.08);
  color: #171717;
}

.mfg-portal-link {
  color: inherit;
  text-underline-offset: 3px;
}

.mfg-gallery-meta,
.mfg-portal-heading p,
.mfg-gallery-tile p {
  color: var(--mfg-muted);
}

.mfg-portal-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.mfg-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.mfg-gallery-tile {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 24px;
  background: var(--mfg-panel);
  border: 1px solid #3a3c41;
  border-radius: 4px;
}

.mfg-gallery-tile > div {
  flex: 1;
}

.mfg-gallery-tile .mfg-portal-button {
  align-self: flex-start;
}

.mfg-portal-empty {
  padding: 24px;
  background: var(--mfg-panel);
}

.mfg-block-preview {
  padding: 24px;
  border: 1px dashed #757575;
  background: #f4f4f4;
  color: #1e1e1e;
}

.mfg-block-preview p {
  margin-bottom: 0;
}

.mfg-admin-portal .wrap {
  margin: 0;
}

.mfg-admin-portal form {
  margin: 12px 0;
}

.mfg-admin-portal input:not([type="checkbox"]):not([type="hidden"]),
.mfg-admin-portal textarea,
.mfg-admin-portal select {
  max-width: 100%;
  padding: 9px;
  border: 1px solid #62666c;
  background: #111216;
  color: #fff;
}

.mfg-admin-portal button,
.mfg-admin-portal .button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #666a70;
  background: #25272c;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.mfg-admin-portal .button-primary {
  background: var(--mfg-accent);
  border-color: var(--mfg-accent);
  color: #171717;
}

.mfg-admin-portal table {
  width: 100%;
  border-collapse: collapse;
  background: var(--mfg-panel);
}

.mfg-admin-portal th,
.mfg-admin-portal td {
  padding: 10px;
  border-bottom: 1px solid #45484e;
  text-align: left;
  vertical-align: top;
}

.mfg-admin-portal .notice {
  padding: 12px;
  border-left: 4px solid var(--mfg-accent);
  background: var(--mfg-panel);
}

@media (max-width: 700px) {
  .mfg-portal.mfg-login-card {
    border-radius: 14px;
  }

  .mfg-login-card h2 {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .mfg-portal-heading {
    display: block;
  }

  .mfg-admin-portal table {
    display: block;
    overflow-x: auto;
  }

  .mfg-admin-portal input[size] {
    width: 100%;
  }
}

/* Gestaltbare Galerie-Verwaltung im Stil der Fotografen-Website. */
.mfg-admin-portal {
  position: relative;
  left: auto;
  z-index: 2;
  width: 100% !important;
  max-width: 1480px !important;
  margin-right: auto !important;
  margin-left: auto !important;
  transform: none;
  font-family: var(--wp--preset--font-family--dm-sans, "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.mfg-admin-portal .mfg-dashboard {
  --mfg-brand: #9dff20;
  --mfg-brand-dark: #345c00;
  --mfg-ink: #111;
  --mfg-soft: #f6f6f6;
  --mfg-line: #dedede;
  width: 100%;
  color: var(--mfg-ink) !important;
  background: #fff;
}

.mfg-dashboard a {
  color: inherit;
}

.mfg-dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: clamp(36px, 6vw, 72px);
}

.mfg-dashboard-head .mfg-dashboard-eyebrow {
  margin: 0 0 12px;
  color: var(--mfg-brand-dark) !important;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mfg-dashboard-head h1 {
  margin: 0 0 22px;
  color: var(--mfg-ink) !important;
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-weight: 650;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.mfg-dashboard-head p:not(.mfg-dashboard-eyebrow) {
  max-width: 650px;
  margin: 0;
  color: #666 !important;
  font-size: clamp(1rem, 1.6vw, 1.28rem);
}

.mfg-users-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 11px 18px;
  border: 1px solid #aaa;
  border-radius: 8px;
  color: var(--mfg-ink) !important;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.mfg-users-link:hover,
.mfg-users-link:focus-visible {
  border-color: var(--mfg-ink);
  background: var(--mfg-soft);
}

.mfg-dashboard-notice {
  margin: -24px 0 32px;
  padding: 16px 18px;
  border-left: 5px solid var(--mfg-brand-dark);
  background: #eef8e4;
  color: #193000 !important;
}

.mfg-dashboard-tools {
  display: grid;
  grid-template-columns: minmax(280px, 500px) minmax(260px, 390px);
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  margin-bottom: clamp(44px, 7vw, 88px);
}

.mfg-create-panel,
.mfg-create-panel[open] {
  position: relative;
  margin: 0;
}

.mfg-create-panel[open] {
  z-index: 30;
}

.mfg-create-panel > summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--mfg-brand);
  color: var(--mfg-ink) !important;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.mfg-create-panel > summary::-webkit-details-marker {
  display: none;
}

.mfg-create-panel > summary span {
  font-size: 1.8rem;
  font-weight: 350;
  line-height: 1;
  transition: transform 160ms ease;
}

.mfg-create-panel[open] > summary span {
  transform: rotate(45deg);
}

.mfg-create-body {
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  left: 0;
  width: min(820px, calc(100vw - 64px));
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid #d5d5d5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 60px rgb(0 0 0 / 16%);
}

.mfg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.mfg-form-grid label {
  display: block;
  color: var(--mfg-ink) !important;
  font-weight: 700;
}

.mfg-form-grid label > span {
  display: block;
  margin-bottom: 8px;
}

.mfg-form-grid .mfg-form-wide {
  grid-column: 1 / -1;
}

.mfg-admin-portal .mfg-form-grid input,
.mfg-admin-portal .mfg-form-grid select,
.mfg-admin-portal .mfg-form-grid textarea,
.mfg-admin-portal .mfg-gallery-filter input {
  width: 100%;
  max-width: none;
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid #aaa !important;
  border-radius: 7px;
  background: #fff !important;
  color: var(--mfg-ink) !important;
  font: inherit;
  box-shadow: none !important;
}

.mfg-admin-portal .mfg-form-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.mfg-admin-portal .mfg-form-grid input:focus,
.mfg-admin-portal .mfg-form-grid select:focus,
.mfg-admin-portal .mfg-form-grid textarea:focus,
.mfg-admin-portal .mfg-gallery-filter input:focus {
  border-color: var(--mfg-ink) !important;
  outline: 3px solid rgb(157 255 32 / 36%);
}

.mfg-form-grid small {
  display: block;
  margin-top: 7px;
  color: #666;
  font-weight: 400;
}

.mfg-create-actions {
  margin-top: 26px;
}

.mfg-admin-portal .mfg-primary-action {
  min-height: 52px;
  padding: 12px 20px;
  border: 1px solid var(--mfg-ink);
  border-radius: 0;
  background: var(--mfg-ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mfg-admin-portal .mfg-primary-action:hover,
.mfg-admin-portal .mfg-primary-action:focus-visible {
  border-color: var(--mfg-brand-dark);
  background: var(--mfg-brand-dark);
}

.mfg-gallery-filter {
  position: relative;
  display: flex;
  align-items: center;
}

.mfg-gallery-filter > span[aria-hidden] {
  position: absolute;
  left: 17px;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 2px solid var(--mfg-ink);
  border-radius: 50%;
  color: var(--mfg-ink);
  font-size: 0;
  transform: none;
}

.mfg-gallery-filter > span[aria-hidden]::after {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  background: var(--mfg-ink);
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.mfg-admin-portal .mfg-gallery-filter input {
  min-height: 64px;
  padding-left: 52px !important;
  border-radius: 8px;
  font-size: 1.08rem;
}

.mfg-gallery-list {
  position: relative;
}

.mfg-gallery-list-head,
.mfg-gallery-row {
  display: grid;
  grid-template-columns: minmax(330px, 1.8fr) minmax(90px, 0.45fr) minmax(110px, 0.55fr) minmax(110px, 0.55fr) minmax(90px, 0.45fr) minmax(150px, 0.55fr);
  gap: 22px;
  align-items: center;
}

.mfg-gallery-list-head {
  padding: 0 18px 17px;
  border-bottom: 1px solid var(--mfg-line);
  color: #777;
  font-size: 0.88rem;
  font-weight: 650;
}

.mfg-gallery-letter {
  margin: 54px 0 14px;
  color: var(--mfg-ink) !important;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.mfg-gallery-row {
  min-height: 112px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--mfg-line);
  color: var(--mfg-ink) !important;
}

.mfg-gallery-row[hidden],
.mfg-gallery-letter[hidden] {
  display: none;
}

.mfg-gallery-name {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.mfg-gallery-name img,
.mfg-gallery-placeholder {
  display: grid;
  width: 92px;
  height: 68px;
  place-items: center;
  border-radius: 7px;
  background: var(--mfg-soft);
  object-fit: cover;
  color: #777;
  font-size: 1.4rem;
  font-weight: 700;
}

.mfg-gallery-name a {
  display: block;
  overflow: hidden;
  color: var(--mfg-ink) !important;
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mfg-gallery-name a:hover,
.mfg-gallery-name a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mfg-gallery-name p {
  overflow: hidden;
  margin: 5px 0 0;
  color: #777 !important;
  font-size: 0.84rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mfg-gallery-row time,
.mfg-gallery-files {
  color: #333;
  font-size: 0.94rem;
}

.mfg-gallery-files strong {
  font-weight: 750;
}

.mfg-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #444;
  font-size: 0.86rem;
}

.mfg-status::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #aaa;
  content: "";
}

.mfg-status.is-active::before {
  background: #4d8a00;
}

.mfg-row-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.mfg-row-actions > a {
  font-size: 0.88rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.mfg-row-actions details > summary {
  padding: 9px;
  color: var(--mfg-ink);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.mfg-row-actions details > summary::-webkit-details-marker {
  display: none;
}

.mfg-row-actions details > div {
  position: absolute;
  z-index: 10;
  top: 58px;
  right: 0;
  display: grid;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--mfg-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 35px rgb(0 0 0 / 15%);
}

.mfg-subgallery-dialog {
  width: min(560px, calc(100% - 32px));
  max-width: 560px;
  padding: 0;
  border: 1px solid #cfcfcf;
  border-radius: 12px;
  background: #fff;
  color: var(--mfg-ink);
  box-shadow: 0 24px 80px rgb(0 0 0 / 22%);
}

.mfg-subgallery-dialog::backdrop {
  background: rgb(0 0 0 / 42%);
  backdrop-filter: blur(2px);
}

.mfg-subgallery-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 20px;
}

.mfg-subgallery-dialog-head p {
  margin: 0 0 5px;
  color: var(--mfg-brand-dark) !important;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mfg-subgallery-dialog-head h2 {
  margin: 0 0 7px;
  color: var(--mfg-ink) !important;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  letter-spacing: -0.035em;
}

.mfg-subgallery-dialog-head span {
  color: #666;
}

.mfg-admin-portal .mfg-subgallery-dialog-head button {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid #bbb;
  border-radius: 50%;
  background: #fff;
  color: var(--mfg-ink);
  font-size: 1.65rem;
  line-height: 1;
}

.mfg-subgallery-dialog form {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 8px 30px 30px;
}

.mfg-subgallery-dialog label,
.mfg-subgallery-dialog label > span {
  display: block;
  color: var(--mfg-ink) !important;
  font-weight: 700;
}

.mfg-subgallery-dialog label > span {
  margin-bottom: 8px;
}

.mfg-admin-portal .mfg-subgallery-dialog input[name="title"] {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid #999;
  border-radius: 7px;
  background: #fff;
  color: var(--mfg-ink);
  font: inherit;
}

.mfg-subgallery-dialog form p {
  margin: 0;
  color: #666 !important;
  font-size: 0.92rem;
}

.mfg-row-actions details a,
.mfg-row-actions details button {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  background: #fff;
  color: var(--mfg-ink) !important;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mfg-row-actions details a:hover,
.mfg-row-actions details button:hover {
  background: var(--mfg-soft);
}

.mfg-row-actions details form {
  margin: 0;
}

.mfg-row-actions details .mfg-delete-gallery {
  border-top: 1px solid #ead1d1;
  color: #a12626 !important;
}

.mfg-row-actions details .mfg-delete-gallery:hover,
.mfg-row-actions details .mfg-delete-gallery:focus-visible {
  background: #fff0f0;
}

.mfg-dashboard-empty,
.mfg-filter-empty {
  padding: 48px 20px;
  color: #666 !important;
  text-align: center;
}

.mfg-dashboard .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body:has(.mfg-admin-portal) .wp-block-post-title {
  display: none;
}

@media (max-width: 1000px) {
  .mfg-gallery-list-head {
    display: none;
  }

  .mfg-gallery-row {
    grid-template-columns: minmax(280px, 1fr) repeat(2, minmax(90px, auto));
  }

  .mfg-gallery-row time:nth-of-type(1),
  .mfg-gallery-row > span[role="cell"]:has(.mfg-status) {
    display: none;
  }
}

@media (max-width: 700px) {
  .mfg-admin-portal {
    width: 100% !important;
  }

  .mfg-dashboard-head,
  .mfg-dashboard-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mfg-users-link {
    justify-self: start;
  }

  .mfg-create-body {
    position: static;
    width: 100%;
    margin-top: 12px;
    max-height: none;
  }

  .mfg-form-grid {
    grid-template-columns: 1fr;
  }

  .mfg-form-grid .mfg-form-wide {
    grid-column: auto;
  }

  .mfg-gallery-letter {
    margin-top: 36px;
  }

  .mfg-gallery-row {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding-inline: 0;
  }

  .mfg-gallery-name {
    grid-column: 1 / -1;
  }

  .mfg-gallery-row time,
  .mfg-gallery-row > span[role="cell"]:has(.mfg-status) {
    display: none;
  }

  .mfg-gallery-files {
    padding-left: 110px;
  }
}

/* Die persönliche Model-Startseite übernimmt die helle, ruhige Sprache der Anmeldung. */
body.mfg-model-page .wp-block-post-title,
body.mfg-model-page .entry-title {
  display: none !important;
}

body.mfg-model-page .wp-block-post-content {
  margin-block-start: 0 !important;
}

.mfg-portal.mfg-model-portal {
  --mfg-panel: #fff;
  --mfg-text: #171717;
  --mfg-muted: #625f59;
  --mfg-accent: #171717;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid #d8d5ce;
  border-radius: 24px;
  background: #f8f7f3;
  color: #171717 !important;
  box-shadow: 0 16px 44px rgb(0 0 0 / 8%);
}

.mfg-model-portal .mfg-portal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 clamp(24px, 4vw, 40px);
  padding: 0 0 18px;
  border-bottom: 1px solid #dedbd4;
}

.mfg-model-portal .mfg-portal-heading p {
  margin: 0;
  color: #625f59 !important;
  font-size: 0.96rem;
}

.mfg-model-portal .mfg-portal-heading strong {
  color: #171717 !important;
  font-weight: 700;
}

.mfg-model-portal .mfg-portal-link {
  flex: 0 0 auto;
  color: #4f4d48 !important;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mfg-model-portal .mfg-portal-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(16px, 2.5vw, 26px);
}

.mfg-model-portal .mfg-gallery-tile {
  min-width: 0;
  min-height: 260px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid #d8d5ce !important;
  border-radius: 18px;
  background: #fff !important;
  color: #171717 !important;
  box-shadow: 0 12px 32px rgb(0 0 0 / 7%);
}

.mfg-model-portal .mfg-gallery-tile h3 {
  margin: 0 0 14px;
  color: #171717 !important;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 450;
  line-height: 1.05;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.mfg-model-portal .mfg-gallery-tile p,
.mfg-model-portal .mfg-gallery-meta {
  color: #625f59 !important;
}

.mfg-model-portal .mfg-gallery-meta {
  margin: 24px 0 18px;
  font-size: 0.98rem;
  line-height: 1.5;
}

.mfg-model-portal .mfg-portal-button {
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid #171717 !important;
  border-radius: 0;
  background: #171717 !important;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
}

.mfg-model-portal .mfg-portal-button:hover,
.mfg-model-portal .mfg-portal-button:focus-visible {
  border-color: #8d2b25 !important;
  background: #8d2b25 !important;
  color: #fff !important;
}

.mfg-model-portal .mfg-portal-empty {
  margin: 0;
  padding: 24px;
  border: 1px solid #d8d5ce;
  border-radius: 14px;
  background: #fff !important;
  color: #625f59 !important;
}

@media (max-width: 600px) {
  .mfg-portal.mfg-model-portal {
    max-width: 100%;
    padding: 22px 18px;
    border-radius: 14px;
  }

  .mfg-model-portal .mfg-portal-heading {
    display: flex;
    align-items: baseline;
  }

  .mfg-model-portal .mfg-gallery-tile {
    min-height: 0;
    padding: 24px 20px;
    border-radius: 14px;
  }

  .mfg-model-portal .mfg-gallery-tile h3 {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }
}
