:root {
  --ui-control-height: 54px;
  --ui-control-radius: 13px;
  --ui-card-radius: 26px;
  --ui-banner-radius: 34px;
  --ui-content-width: 1380px;
}

/* Gemeinsame Kopfzeile */
paw-site-header,
paw-brand { display: contents; }

.site-header,
.site-header.scrolled,
.dash-header {
  width: min(calc(100% - 24px), calc(var(--ui-content-width) + 48px));
  max-width: none;
  min-height: 76px;
  margin-inline: auto;
  padding: 10px 24px;
  border: 1px solid rgba(255,255,255,.72);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(118deg,rgba(215,223,207,.86),rgba(245,241,233,.78));
  box-shadow: 0 12px 38px rgba(23,35,28,.07);
  backdrop-filter: blur(20px) saturate(140%);
}

.site-header { left: 50%; right: auto; transform: translateX(-50%); }
.brand {
  display: block;
  margin: 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
}
.paw-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  min-width: 0;
  height: 72px;
}
.paw-logo-mark {
  display: grid;
  place-items: center;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  overflow: hidden;
}
.paw-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transform: scale(1.48);
  transform-origin: center;
}
.paw-logo-copy {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  height: 72px;
  line-height: 1;
}
.paw-logo-copy strong { font-size: 1.2rem; line-height: 1; letter-spacing: .16em; }
.paw-logo-copy small { display: block; margin-top: 9px; color: #667067; font-size: .68rem; line-height: 1; letter-spacing: .045em; }

/* Einheitliche Formelemente */
.field { gap: 8px; }
.field label, .member-search > span { line-height: 1.25; }
.field input,
.member-search input,
.location-search-row input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: var(--ui-control-height);
  min-height: var(--ui-control-height);
  padding: 0 16px;
  border-radius: var(--ui-control-radius);
  overflow: hidden;
  text-overflow: ellipsis;
}

.field,
.field-row,
.field-row > *,
.form-grid,
.form-grid > *,
.member-form-grid,
.member-form-grid > *,
.member-dog-row,
.member-dog-row > *,
.location-search-row,
.auth-form,
.admin-form-panel,
.admin-member-card { min-width: 0; }

input,
textarea,
select { max-width: 100%; }

.member-delete-confirm,
.local-note,
.profile-privacy-note,
.map-selection { overflow-wrap: anywhere; }

.event-form textarea {
  min-height: 132px;
  padding: 14px 16px;
  border-radius: var(--ui-control-radius);
}

.primary-button {
  min-height: var(--ui-control-height);
}

.ghost-button,
.danger-button,
.set-location-button,
.address-search-button {
  min-height: 46px;
}

.auth-tabs { width: min(100%,520px); margin-inline: auto; }
.auth-tabs button { min-height: 46px; }
.field-pin { max-width: none; }
.profile-privacy-note { min-height: 83px; }

/* Anmeldung im Stil des Startseiten-Banners */
.auth-view {
  display: block;
  width: min(100%,calc(var(--ui-content-width) + 48px));
  min-height: 0;
  margin: 0 auto;
  padding: 28px 24px 100px;
}

.auth-photo {
  min-height: 0;
  height: clamp(390px,42vw,570px);
  margin: 0;
  border-radius: var(--ui-banner-radius);
  background-image: linear-gradient(180deg,transparent 45%,rgba(16,26,20,.58)),url('assets/mitglieder.jpg');
  background-position: center 43%;
}

.auth-photo::after {
  inset: 18px;
  border-radius: 25px;
}

.auth-photo-copy {
  left: 30px;
  bottom: 28px;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 13px;
  width: auto;
  min-width: 250px;
  padding: 10px 18px 10px 10px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  background: rgba(251,249,244,.72);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
  text-align: left;
  transform: none;
  backdrop-filter: blur(16px) saturate(135%);
}

.auth-photo-mark {
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: none;
}

.auth-photo-copy p { display: flex; flex-direction: column; margin: 0; }
.auth-photo-copy span { margin: 0; color: #677168; font-size: .58rem; letter-spacing: .12em; }
.auth-photo-copy strong { width: auto; font: 400 1rem/1.25 Georgia,serif; letter-spacing: 0; }

.auth-panel { padding: 52px 0 0; }
.auth-panel-inner { width: min(100%,760px); }
.auth-logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-panel .eyebrow,
.auth-panel h1,
.auth-intro { margin-inline: auto; text-align: center; }
.auth-panel h1 { max-width: 700px; }
.auth-intro { max-width: 600px; }
.auth-form { margin-inline: auto; padding: clamp(24px,4vw,38px); border-radius: var(--ui-card-radius); }
.auth-form .field-row { align-items: stretch; }
.local-note { border-radius: 16px; }
.mini-legal-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px max(24px, calc((100vw - 1380px) / 2)); border-top: 1px solid rgba(23,35,28,.1); color: var(--muted); font-size: .68rem; }
.mini-legal-footer nav { display: flex; gap: 18px; }
.mini-legal-footer a { color: var(--ink); text-underline-offset: 3px; }

/* Admin-Anmeldung als gerundeter Banner */
.admin-login {
  position: relative;
  isolation: isolate;
  width: min(calc(100% - 48px),var(--ui-content-width));
  min-height: min(760px,calc(100vh - 124px));
  margin: 24px auto 70px;
  padding: clamp(28px,6vw,80px);
  place-items: center end;
  overflow: hidden;
  border-radius: var(--ui-banner-radius);
  background-position: center 48%;
  box-shadow: var(--shadow);
}

.admin-login::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 25px;
  pointer-events: none;
}

.admin-login-card { border-radius: var(--ui-card-radius); }
.admin-form-panel,
.admin-events-panel,
.admin-members-panel { border-radius: var(--ui-card-radius); }

@media (max-width: 760px) {
  .mini-legal-footer { align-items: flex-start; flex-direction: column; padding: 24px 18px; }
  :root { --ui-banner-radius: 22px; }

  .dash-header {
    width: 100%;
    grid-template-columns: auto minmax(0,1fr);
    min-height: 68px;
    padding: 5px 16px;
    border-inline: 0;
    border-radius: 0 0 18px 18px;
  }

  .site-header,
  .site-header.scrolled {
    width: 100%;
    min-height: 68px;
    padding: 5px 16px;
    border-inline: 0;
    border-radius: 0 0 18px 18px;
  }

  .site-header { justify-content: flex-start; }
  .site-header .paw-logo,
  .dash-header .paw-logo { gap: 2px; height: 58px; }
  .site-header .paw-logo-mark,
  .dash-header .paw-logo-mark { flex-basis: 58px; width: 58px; height: 58px; }
  .site-header .paw-logo-mark img,
  .dash-header .paw-logo-mark img { transform: scale(1.42); }
  .site-header .paw-logo-copy,
  .dash-header .paw-logo-copy { height: 58px; }
  .site-header .paw-logo-copy strong,
  .dash-header .paw-logo-copy strong { font-size: 1rem; }
  .site-header .paw-logo-copy small,
  .dash-header .paw-logo-copy small { margin-top: 7px; font-size: .58rem; }
  .brand { margin-right: auto; text-align: left; }
  .paw-logo-copy { align-items: flex-start; }
  .dash-header > .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-right: auto;
  }
  .paw-logo-copy small { display: block; }
  .header-meta {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .field input,
  .member-search input,
  .location-search-row input {
    padding-inline: 13px;
    font-size: 16px;
  }
  .field textarea,
  .field select { font-size: 16px; }
  .auth-form { scroll-margin-block: 74px 28px; }

  .auth-view { padding: 12px 12px 72px; }
  .auth-photo { height: 350px; margin: 0; border-radius: var(--ui-banner-radius); }
  .auth-photo::after { inset: 12px; border-radius: 15px; }
  .auth-photo-copy {
    left: 50%;
    bottom: 20px;
    width: min(330px,calc(100% - 36px));
    min-width: 0;
    transform: translateX(-50%);
  }
  .auth-panel { padding: 42px 6px 0; }
  .auth-panel h1 { font-size: clamp(2.75rem,13vw,3.45rem); }
  .auth-form { padding: 22px 17px; }
  .profile-privacy-note { min-height: 0; }

  .admin-login {
    width: calc(100% - 24px);
    min-height: 690px;
    margin: 12px auto 55px;
    padding: 22px 14px;
    place-items: end center;
  }
  .admin-login::after { inset: 12px; border-radius: 15px; }
}
