/* ─── Auth Gate Overlay ──────────────────────────────────────────── */
#sn-auth-gate {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.sn-auth-gate-box {
  background: #1e293b;
  border: 1px solid rgba(51, 153, 255, 0.25);
  border-radius: 20px;
  padding: 44px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.sn-auth-gate-icon {
  color: #3399ff;
  margin-bottom: 20px;
}

.sn-auth-gate-box h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #3399ff, #66d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sn-auth-gate-box p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 28px;
}

.sn-auth-gate-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sn-auth-gate-btn {
  display: block;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.sn-auth-gate-btn.primary {
  background: linear-gradient(135deg, #3399ff, #1e7fd4);
  color: #fff;
  box-shadow: 0 4px 16px rgba(51, 153, 255, 0.4);
}

.sn-auth-gate-btn.primary:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.sn-auth-gate-secondary {
  display: block;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.sn-auth-gate-secondary:hover {
  color: #66d9ff;
}

/* ─── Custom Toast (ersetzt window.alert) ────────────────────────── */
#sn-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e293b;
  border: 1px solid rgba(51, 153, 255, 0.4);
  border-left: 3px solid #3399ff;
  border-radius: 10px;
  padding: 13px 16px;
  color: #e2e8f0;
  font-family: Inter, sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: sn-toast-in 0.22s ease;
}

.sn-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0 0 6px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.sn-toast-close:hover { color: #fff; }

@keyframes sn-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  #sn-toast {
    top: auto;
    bottom: 88px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* ─── Custom Confirm / Prompt Modal ─────────────────────────────────── */
#sn-confirm, #sn-prompt {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: sn-toast-in 0.18s ease;
}

.sn-confirm-box {
  background: #1e293b;
  border: 1px solid rgba(51, 153, 255, 0.35);
  border-radius: 14px;
  padding: 28px 24px 20px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.sn-confirm-text {
  color: #e2e8f0;
  font-family: Inter, sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 22px;
  white-space: pre-line;
}

.sn-confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.sn-confirm-cancel {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: Inter, sans-serif;
  transition: all 0.15s;
}

.sn-confirm-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.sn-confirm-ok {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: Inter, sans-serif;
  font-weight: 600;
  transition: opacity 0.15s;
}

.sn-confirm-ok:hover { opacity: 0.85; }

.sn-confirm-ok.sn-ok-save {
  background: linear-gradient(135deg, #3399ff, #66d9ff);
}

.sn-prompt-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(51, 153, 255, 0.35);
  border-radius: 8px;
  color: #e2e8f0;
  font-family: Inter, sans-serif;
  font-size: 0.9rem;
  outline: none;
  margin-bottom: 18px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.sn-prompt-input:focus {
  border-color: #3399ff;
}

/* Screenreader-only (visuell versteckt) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* Shared message styles — used by einstellungen.html, 2fa.html */
.msg-box { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; display: none; }
.msg-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }
.msg-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.4); color: #86efac; }
.msg-info    { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

/* ===== CUSTOM SELECT DROPDOWN ===== */
.custom-select-wrapper { position: relative; min-width: 0; }
.custom-select-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; padding: 12px 14px; background: var(--bg);
    border: 1px solid rgba(59,130,246,0.25); border-radius: 8px;
    color: white; font-size: 15px; font-family: Inter, sans-serif;
    cursor: pointer; white-space: nowrap; text-align: left; box-sizing: border-box;
}
.custom-select-btn:hover { border-color: rgba(59,130,246,0.5); }
.cs-arrow { font-size: 18px !important; color: #64748b; transition: transform 0.2s; flex-shrink: 0; }
.custom-select-wrapper.open .cs-arrow { transform: rotate(180deg); }
.custom-select-list {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--bg-card); border: 1px solid rgba(59,130,246,0.3); border-radius: 10px;
    list-style: none; margin: 0; padding: 6px; z-index: 50000; display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.custom-select-wrapper.open .custom-select-list { display: block; }
.custom-select-list li {
    padding: 10px 12px; border-radius: 6px; color: #cbd5e1;
    cursor: pointer; font-size: 14px; font-family: Inter, sans-serif;
    transition: background 0.15s; list-style: none;
}
.custom-select-list li:hover { background: rgba(51,153,255,0.12); color: #66d9ff; }
.custom-select-list li.cs-active { background: rgba(51,153,255,0.2); color: #66d9ff; }
