/* ═══════════════════════════════════════════════════════
   NOVA Support Pool — Login Screen · Dark Glassmorphism
   ═══════════════════════════════════════════════════════ */

:root {
  --login-bg:          #000000;
  --login-card-bg:     transparent;
  --login-card-border: transparent;
  --login-text-1:      #ffffff;
  --login-text-2:      rgba(255,255,255,0.65);
  --login-text-3:      rgba(255,255,255,0.40);
  --login-text-4:      rgba(255,255,255,0.20);
  --login-accent:      #a78bfa;
  --login-accent-2:    #67e8f9;
  --login-success:     #10b981;
  --login-danger:      #ef4444;
}

/* ── Screen base ─────────────────────────────────────── */
.screen--login {
  background: var(--login-bg);
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--login-text-1);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  flex-direction: column;
}

#screen-login.active {
  position: fixed;
  inset: 0;
  z-index: 110;
  overflow: hidden;
}

@supports (padding-top: env(safe-area-inset-top)) {
  .screen--login { padding-top: 0; }
}

/* ── Background & Glow Orb ───────────────────────────── */
.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: #000;
}

/* Radial glow behind logo — depth and atmosphere */
.login-bg::after {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  height: 70vw;
  max-width: 420px;
  max-height: 420px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(124,58,237,0.22) 0%,
    rgba(103,232,249,0.08) 45%,
    transparent 72%
  );
  filter: blur(28px);
  pointer-events: none;
}

.login-orb-1,
.login-orb-2 {
  display: none;
}

/* ── Top bar ─────────────────────────────────────────── */
.login-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(56px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-inline: 16px;
  background: rgba(5,3,10,0.85);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
}

.login-top-logo {
  display: flex;
  align-items: center;
}
.login-top-logo__text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, #d4bbff 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: inherit;
  user-select: none;
}

.login-lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--login-text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.login-lang-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Main scroll container ───────────────────────────── */
.login-main {
  position: relative;
  z-index: 2;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding:
    calc(80px + env(safe-area-inset-top, 0px))
    20px
    calc(16px + env(safe-area-inset-bottom, 0px))
    20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex: 1;
  box-sizing: border-box;
}

/* PIN-Mode: Höhe auf 100dvh begrenzen, kein Scrollen */
.login-main--pin {
  height: 100dvh;
  overflow: hidden;
}

/* ── Card ────────────────────────────────────────────── */
.login-card > * {
  position: relative;
  z-index: 2;
}

.login-card {
  width: 100%;
  position: relative;
  background: var(--login-card-bg);
  border: 1px solid var(--login-card-border);
  border-radius: 32px;
  padding: 6px 22px 10px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  overflow: visible;
  box-sizing: border-box;
}

/* ── Text readability ────────────────────────────────── */
.login-eyebrow,
.login-subtitle,
.login-micro,
.login-footer {
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.login-h1 {
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
}
.login-h2 {
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 10px rgba(0,0,0,0.7);
}

/* ── Eyebrow ─────────────────────────────────────────── */
.login-eyebrow {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--login-text-3);
  margin-bottom: 4px;
  overflow: hidden;
  max-height: 40px;
  transition: max-height 0.35s ease-in-out, opacity 0.35s ease-in-out, margin-bottom 0.35s;
}

/* ── Logo ────────────────────────────────────────────── */
.login-logo {
  display: block;
  margin: 0 auto;
  width: min(72vw, 280px);
  height: 110px;
  object-fit: cover;
  object-position: center 55%;
  user-select: none;
  -webkit-user-drag: none;
  flex-shrink: 0;
  transition: height 0.35s ease-in-out;
}

.login-logo-fallback {
  display: none;
  text-align: center;
  margin: 0 auto;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  background: linear-gradient(100deg, #a78bfa 0%, #7c3aed 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Subtitle ────────────────────────────────────────── */
.login-subtitle {
  text-align: center;
  margin-top: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 5.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  overflow: hidden;
  max-height: 30px;
  transition: max-height 0.35s ease-in-out, opacity 0.35s ease-in-out;
}

/* ── Divider ─────────────────────────────────────────── */
.login-divider {
  width: 48px;
  height: 1px;
  margin: 4px auto;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  overflow: hidden;
  max-height: 20px;
  transition: max-height 0.35s ease-in-out, opacity 0.35s ease-in-out, margin 0.35s;
}

/* ── Headlines ───────────────────────────────────────── */
.login-h1 {
  font-size: 22px;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  overflow: hidden;
  max-height: 80px;
  transition: max-height 0.35s ease-in-out, opacity 0.35s ease-in-out, margin 0.35s;
}

.login-h2 {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
  letter-spacing: 1.5px;
  text-align: center;
  text-transform: uppercase;
  overflow: hidden;
  max-height: 60px;
  transition: max-height 0.35s ease-in-out, opacity 0.35s ease-in-out, margin-top 0.35s;
}

/* ── Stat tiles ──────────────────────────────────────── */
.login-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
  transition: margin-top 0.35s ease-in-out, gap 0.35s;
}

.login-stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px 8px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  text-align: center;
  transition: border-color 0.25s, transform 0.15s, padding 0.3s ease-in-out;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 4px 24px rgba(0,0,0,0.3);
}

.login-stat-tile--mid {
  background: rgba(124,58,237,0.09);
  border-color: rgba(124,58,237,0.25);
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(167,139,250,0.12),
    0 4px 24px rgba(0,0,0,0.3),
    0 0 20px rgba(124,58,237,0.12);
}

.login-stat-tile--mid::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: linear-gradient(135deg, rgba(124,58,237,0.28) 0%, rgba(103,232,249,0.15) 100%);
  pointer-events: none;
  z-index: 0;
}

.login-stat-tile--mid > * { position: relative; z-index: 1; }

.login-stat-icon {
  stroke: rgba(167,139,250,0.55);
  flex-shrink: 0;
  margin-bottom: 1px;
  overflow: hidden;
  max-height: 24px;
  transition: max-height 0.25s ease, opacity 0.25s ease, margin-bottom 0.25s;
}
.login-stat-tile--mid .login-stat-icon {
  stroke: rgba(167,139,250,0.9);
}

.login-stat-val {
  font-size: 21px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, #c4b5fd 0%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-height: 1.1em;
  transition: font-size 0.3s ease-in-out;
}

.login-stat-tile--mid .login-stat-val {
  background: linear-gradient(120deg, #a78bfa 0%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.login-stat-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
}

.login-stat-tile--mid .login-stat-label {
  color: rgba(167,139,250,0.6);
}

.login-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--login-danger);
  box-shadow: 0 0 8px var(--login-danger);
  flex-shrink: 0;
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── Input area ──────────────────────────────────────── */
.login-input-wrap {
  position: relative;
  z-index: 10;
  margin-top: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.085) 0%,
    rgba(255,255,255,0.022) 100%);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(197,181,255,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 0 36px rgba(120,60,255,0.18),
    0 8px 32px rgba(0,0,0,0.30);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-input-wrap::before { display: none; }

.login-input-wrap:focus-within {
  border-color: rgba(197,181,255,0.50);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.26),
    0 0 0 1px rgba(124,58,237,0.20),
    0 0 64px rgba(124,58,237,0.38),
    0 0 24px rgba(103,232,249,0.16),
    0 8px 40px rgba(0,0,0,0.40);
}

/* ── @ Orb ───────────────────────────────────────────── */
.login-at-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%,
    #ffffff 0%,
    #b89eff 18%,
    #7c3aed 48%,
    #2d0d6e 80%,
    #110430 100%);
  box-shadow:
    0 0 18px rgba(138,92,255,0.88),
    0 0 8px  rgba(103,232,249,0.35),
    inset -4px -5px 14px rgba(0,0,0,0.50);
  color: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
  animation: orbPulse 5s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% {
    box-shadow:
      0 0 18px rgba(138,92,255,0.88),
      0 0 8px  rgba(103,232,249,0.35),
      inset -4px -5px 14px rgba(0,0,0,0.50);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      0 0 30px rgba(103,232,249,0.70),
      0 0 14px rgba(138,92,255,0.55),
      inset -4px -5px 14px rgba(0,0,0,0.50);
    filter: brightness(1.14);
  }
}

/* ── Text input ──────────────────────────────────────── */
.login-input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 62px;
  border-radius: 999px;
  background: transparent;
  border: none;
  padding-inline-start: 58px;
  padding-inline-end: 16px;
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.login-input::placeholder { color: rgba(255,255,255,0.34); }
.login-input:focus { background: transparent; }

/* ── Autocomplete ────────────────────────────────────── */
.login-autocomplete {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: rgba(12,6,32,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0,0,0,0.65);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.login-autocomplete.open { display: block; }
.login-ac-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; cursor: pointer;
  color: rgba(255,255,255,0.8); font-size: 15px;
  transition: background 0.15s;
}
.login-ac-item:hover { background: rgba(168,85,247,0.15); }
.login-ac-item + .login-ac-item { border-top: 1px solid rgba(255,255,255,0.06); }
.login-ac-item__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* ── Login button ────────────────────────────────────── */
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  width: 100%;
  height: 60px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 750;
  font-family: inherit;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(255,255,255,0.14),
    inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 0.15s, opacity 0.15s;
}
.login-btn:hover  { transform: translateY(-1px); }
.login-btn:active { transform: scale(0.98); }
.login-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── Micro badges ────────────────────────────────────── */
.login-micro {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
}
.login-micro b { color: rgba(255,255,255,0.65); font-weight: 700; }

/* ── Broadcast banner ────────────────────────────────── */
.login-broadcast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(124,58,237,0.5);
  border-radius: 16px;
  margin-bottom: 16px;
  animation: slideDown 0.3s ease-out both;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-bc__icon { font-size: 18px; flex-shrink: 0; }
.login-bc__text { flex: 1; font-size: 13px; font-weight: 500; color: #fff; word-break: break-word; }
.login-bc__btn {
  background: none; border: none;
  color: rgba(255,255,255,0.7);
  font-size: 14px; cursor: pointer; padding: 4px; flex-shrink: 0;
  transition: color 0.15s;
}
.login-bc__btn:hover { color: #fff; }
.login-bc__btn--close { font-size: 16px; }

/* ── Footer ──────────────────────────────────────────── */
.login-footer {
  text-align: center;
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
  margin-top: 8px;
}
.login-footer__link {
  color: rgba(255,255,255,0.28);
  text-decoration: none;
  transition: color 0.15s;
}
.login-footer__link:hover { color: rgba(255,255,255,0.55); }

/* ════════════════════════════════════════════════════════
   PIN STEP — Dark Glassmorphism Overhaul
   ════════════════════════════════════════════════════════ */

.login-pin__greet {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 4px 0 2px;
}
.login-pin__label {
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 2px;
}

/* ── PIN Dots (login screen only) ───────────────────── */
#screen-login .pin-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 8px 0 6px;
}

#screen-login .pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

#screen-login .pin-dot.filled {
  background: var(--login-accent);
  border-color: var(--login-accent);
  box-shadow:
    0 0 12px rgba(167,139,250,0.75),
    0 0 24px rgba(167,139,250,0.35);
  transform: scale(1.1);
}

/* All-filled pulse */
#screen-login .pin-dots--complete .pin-dot.filled {
  animation: pinDotPulse 0.42s ease-in-out;
}
@keyframes pinDotPulse {
  0%   { transform: scale(1.1); }
  40%  { transform: scale(1.35); box-shadow: 0 0 20px rgba(167,139,250,1), 0 0 40px rgba(167,139,250,0.5); }
  100% { transform: scale(1.1); }
}

/* Shake on wrong PIN */
@keyframes pinShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}
#screen-login .pin-dots.shake { animation: pinShake 0.4s ease; }

/* ── PIN Pad Grid (login screen only) ───────────────── */
#screen-login .pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 2px;
  width: 100%;
}

/* Spacer in grid position 10 (bottom-left) */
#screen-login .pin-key-spacer {
  height: 58px;
  background: transparent;
  border: none;
  pointer-events: none;
}

/* ── PIN Key buttons (login screen only — dark glass) ── */
#screen-login .pin-key {
  -webkit-appearance: none;
  appearance: none;
  height: 58px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  font-size: 24px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', sans-serif;
  letter-spacing: -0.5px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 2px 8px rgba(0,0,0,0.25);
  transition: background 0.12s ease, transform 0.1s ease, box-shadow 0.12s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer line at top */
#screen-login .pin-key::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}

#screen-login .pin-key:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.14);
}

#screen-login .pin-key:active {
  transform: scale(0.93);
  background: rgba(124,58,237,0.30);
  border-color: rgba(167,139,250,0.50);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 16px rgba(124,58,237,0.50),
    0 0 32px rgba(124,58,237,0.20);
}

/* Delete key */
#screen-login .pin-key--del {
  font-size: 20px;
  color: rgba(255,255,255,0.60);
}
#screen-login .pin-key--del:active {
  color: rgba(255,255,255,0.90);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 2px 8px rgba(0,0,0,0.25);
}

/* ── Forgot PIN link (below numpad) ──────────────────── */
.pin-forgot-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.38);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.2px;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.15);
}
.pin-forgot-btn:hover {
  color: rgba(255,255,255,0.75);
  text-decoration-color: rgba(255,255,255,0.4);
}

/* ── Forgot PIN card ─────────────────────────────────── */
.pin-forgot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 8px 0 4px;
}
.pin-forgot-card__icon  { font-size: 40px; line-height: 1; }
.pin-forgot-card__title { font-size: 20px; font-weight: 700; color: #fff; }
.pin-forgot-card__sub   { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.5; }
.pin-forgot-card .btn   { width: 100%; }

/* ── Register step ───────────────────────────────────── */
.login-reg__icon  { text-align: center; font-size: 40px; margin: 8px 0 12px; }
.login-reg__title { text-align: center; font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.login-reg__sub   { text-align: center; font-size: 14px; color: rgba(255,255,255,0.58); line-height: 1.5; margin-bottom: 8px; }
.login-card .btn--primary {
  background: linear-gradient(100deg, #8b5cf6 0%, #6366f1 30%, #06b6d4 100%);
  color: #fff; border: none;
  box-shadow: 0 8px 24px rgba(139,92,246,0.35);
}
.login-card .btn--ghost {
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.15);
  background: transparent;
}
.login-card .btn--ghost:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
}

/* ── Loading bar ─────────────────────────────────────── */
.login-loader {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  margin: 2px 0;
}
.login-loader__bar {
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, transparent, #a78bfa, #67e8f9, transparent);
  border-radius: 99px;
  animation: login-load 1.4s ease-in-out infinite;
}
@keyframes login-load {
  0%   { transform: translateX(-220%); }
  100% { transform: translateX(490%); }
}

/* ── Language modal ──────────────────────────────────── */
.login-lang-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.login-lang-modal-content {
  width: 100%;
  max-width: 420px;
  background: #1a1830;
  border-radius: 24px 24px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.3s ease;
  max-height: 80dvh;
  overflow-y: auto;
  box-sizing: border-box;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.login-lang-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.login-lang-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.login-lang-modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}

.login-lang-modal-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  font-weight: 500;
  border: none;
  background: transparent;
  width: 100%;
  text-align: start;
  font-family: inherit;
}
.login-lang-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.login-lang-item.active {
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.4);
  color: #fff;
}
.login-lang-item__flag { font-size: 22px; flex-shrink: 0; line-height: 1; }
.login-lang-item__check { margin-left: auto; color: var(--login-accent); font-weight: 700; }

/* ── Responsive: iPhone SE ───────────────────────────── */
@media (max-width: 375px) {
  .login-card { padding: 24px 18px 18px; }
  .login-h1   { font-size: 20px; }
  #screen-login .pin-key    { height: 52px; font-size: 20px; }
}

/* ── Counter pop on live update ──────────────────────── */
.login-stat-val.pop {
  animation: counterPop 0.35s ease-out forwards;
}
@keyframes counterPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.22); text-shadow: 0 0 22px #a855f7, 0 0 40px #a855f7; }
  100% { transform: scale(1); text-shadow: none; }
}

/* Old pin-key--sm is now unused — hidden for safety */
#screen-login .pin-key--sm { display: none; }

/* ══════════════════════════════════════════════════════════
   PIN ACTIVE STATE — nahtlose animierte State-Transitions
   ══════════════════════════════════════════════════════════ */

/* Pin step: starts invisible (opacity:0), slides in when card.pin-active */
#login-pin-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease-out 0.1s, transform 0.3s ease-out 0.1s;
}

.login-card.pin-active #login-pin-step {
  opacity: 1;
  transform: translateY(0);
}

/* Logo: vollständig sichtbar im PIN-Mode */
.login-card.pin-active .login-logo {
  height: 76px;
  object-fit: cover;
  object-position: center 50%;
}

/* Header elements collapse with animation */
.login-card.pin-active .login-eyebrow {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}
.login-card.pin-active .login-subtitle {
  max-height: 0;
  opacity: 0;
}
.login-card.pin-active .login-divider {
  max-height: 0;
  opacity: 0;
  margin: 0;
}
.login-card.pin-active #login-h1 {
  max-height: 0;
  opacity: 0;
  margin: 0;
}
.login-card.pin-active #login-h2 {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

/* Broadcast and loader hidden in pin mode */
.login-card.pin-active .login-broadcast { display: none; }
.login-card.pin-active .login-loader    { display: none; }

/* Stats: compact horizontal tiles */
.login-card.pin-active .login-stats-row {
  margin-top: 8px;
  gap: 6px;
}
.login-card.pin-active .login-stat-tile {
  padding: 5px 4px 5px;
}
.login-card.pin-active .login-stat-val {
  font-size: 15px;
}
.login-card.pin-active .login-stat-icon {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

/* Pin mode: compact top padding */
.login-card.pin-active {
  padding-top: 8px;
}

/* Pin mode: kompakteres Numpad */
.login-main--pin #screen-login .pin-key {
  height: 46px;
}
.login-main--pin #screen-login .pin-pad {
  gap: 4px;
}

/* Forgot PIN: im Numpad-Grid (Spacer-Position) — kein Overflow-Problem */
#screen-login .pin-key--forgot {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: rgba(255,255,255,0.38);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,0.15);
  white-space: normal;
  line-height: 1.2;
  padding: 4px 2px;
  word-break: break-word;
}
#screen-login .pin-key--forgot:hover,
#screen-login .pin-key--forgot:active {
  color: rgba(255,255,255,0.75);
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none;
}
