/* Praxis Ragnitz - Admin-Login (Meldesystem Etappe 3.2).
   Versteckter Einstieg an der Copyright-Zeile + Login-Maske.
   Designsprache aus legal-modal.css uebernommen, eigener adm-/#admin-cpr-Namespace. */

/* ---- Versteckter Einstieg an der Copyright-Zeile ---- */
#admin-cpr {
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;   /* iOS: kein Lupe/Callout beim langen Druecken */
  touch-action: pan-y;           /* vertikales Scrollen bleibt, kein Gesten-Hijack */
}
#admin-cpr .adm-press-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: currentColor;       /* dezent: nimmt die Textfarbe des Footers */
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: 2px;
  pointer-events: none;
  transition: opacity 200ms ease; /* nur Opacity animiert; Breite wird per rAF gesetzt */
}

/* ---- Modal ---- */
.adm-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,30,21,0);
  -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px);
  z-index: 9998; pointer-events: none;
  transition: background 320ms cubic-bezier(0.16,1,0.3,1),
              backdrop-filter 320ms cubic-bezier(0.16,1,0.3,1);
}
.adm-backdrop.is-open {
  background: rgba(15,30,21,0.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  pointer-events: auto;
}
.adm-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-48%) scale(0.96);
  width: min(420px, calc(100vw - 32px));
  background: #F8F5EE; border-radius: 24px;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.10),
    0 24px 48px -8px rgba(28,49,37,0.30),
    0 64px 120px -24px rgba(28,49,37,0.40);
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.16,1,0.3,1),
              transform 420ms cubic-bezier(0.16,1,0.3,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.adm-modal.is-open {
  opacity: 1; transform: translate(-50%,-50%) scale(1); pointer-events: auto;
}
.adm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid rgba(26,31,27,0.08);
  background: rgba(255,255,255,0.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.adm-eyebrow {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #1C3125; font-weight: 700;
}
.adm-close {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(26,31,27,0.12); background: #FFFFFF; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 220ms cubic-bezier(0.16,1,0.3,1); color: #1C3125; flex-shrink: 0;
}
.adm-close:hover {
  background: #1C3125; color: #FFFFFF; transform: rotate(90deg); border-color: #1C3125;
}
.adm-close svg { width: 18px; height: 18px; }

.adm-body { padding: 26px 26px 30px; }

.adm-form:not([hidden]) { display: flex; flex-direction: column; }
.adm-done:not([hidden]) { display: flex; flex-direction: column; align-items: center; text-align: center; }

.adm-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #5A615C; margin-bottom: 8px;
}
.adm-input {
  font-size: 16px;                 /* >=16px verhindert iOS-Auto-Zoom beim Fokus */
  padding: 12px 14px; border: 1px solid rgba(26,31,27,0.18); border-radius: 12px;
  background: #FFFFFF; color: #0F1E15; width: 100%; box-sizing: border-box;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.adm-input:focus {
  outline: none; border-color: #1C3125; box-shadow: 0 0 0 3px rgba(28,49,37,0.12);
}
.adm-submit, .adm-logout {
  margin-top: 16px; padding: 12px 18px; border: 0; border-radius: 12px;
  background: #1C3125; color: #FFFFFF; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 180ms ease, opacity 180ms ease;
}
.adm-submit:hover, .adm-logout:hover { background: #0F1E15; }
.adm-submit:disabled, .adm-logout:disabled { opacity: 0.6; cursor: default; }
.adm-status {
  min-height: 18px; margin: 12px 0 0; font-size: 13px; color: #9B2C2C; text-align: center;
}
.adm-done-text { font-size: 18px; font-weight: 600; color: #1C3125; margin: 6px 0 4px; }

body.adm-locked { overflow: hidden; }

@media (max-width: 640px) {
  .adm-modal { width: calc(100vw - 16px); border-radius: 20px; }
  .adm-head { padding: 14px 16px; }
  .adm-body { padding: 20px 18px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .adm-modal, .adm-backdrop, .adm-close, #admin-cpr .adm-press-bar { transition: none !important; }
}
