/* Vibe Coding Hamburg — Auth UI styles
   Used by scripts/auth.js (login modal) and the auth-widget in site nav. */

[x-cloak] { display: none !important; }

/* ------------- auth widget in nav ------------- */
.auth-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}
.auth-widget button { font: inherit; cursor: pointer; }

.auth-login-btn {
  background: transparent;
  color: var(--neon-cyan, #00f0ff);
  border: 1px solid rgba(0,240,255,0.32);
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  transition: background .2s, transform .15s, border-color .2s;
}
.auth-login-btn:hover {
  background: rgba(0,240,255,0.08);
  transform: translateY(-1px);
}
.auth-login-btn:active { transform: translateY(0); }

.auth-user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 14px;
  border: 1px solid rgba(0,240,255,0.18);
  border-radius: 999px;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  background: rgba(255,255,255,0.02);
}
.auth-user-pill:hover { border-color: rgba(0,240,255,0.32); }
.auth-user-pill .avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f0ff, #ff00aa);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700;
  color: #0a0a0f; flex-shrink: 0;
  letter-spacing: 0;
}
.auth-user-pill .name {
  color: #e0e0e8;
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.auth-user-pill .badge {
  font-size: 0.58rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0,212,170,0.15);
  border: 1px solid rgba(0,212,170,0.4);
  color: #5feedb;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}
.auth-user-pill .badge.vorstand {
  background: rgba(255,170,51,0.15);
  border-color: rgba(255,170,51,0.4);
  color: #ffd690;
}
.auth-logout-btn {
  background: none; border: 0;
  color: rgba(255,255,255,0.4);
  font-size: 0.95rem;
  padding: 0 4px;
  line-height: 1;
  transition: color .15s;
}
.auth-logout-btn:hover { color: #ff4d6d; }

@media (max-width: 720px) {
  .auth-widget { font-size: 0.7rem; gap: 6px; }
  .auth-user-pill .name { display: none; }
}

/* ------------- login modal ------------- */
.vch-modal-bg {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5,5,12,0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: vch-fade-in .25s ease-out;
}
@keyframes vch-fade-in { from { opacity: 0 } to { opacity: 1 } }

.vch-modal {
  position: relative;
  background: linear-gradient(155deg, #14141c 0%, #0e0e16 100%);
  border: 1px solid rgba(0,240,255,0.45);
  border-radius: 18px;
  padding: 36px 32px 32px;
  max-width: 460px; width: 100%;
  font-family: 'Work Sans', sans-serif;
  color: #e0e0e8;
  box-shadow:
    0 30px 80px -30px rgba(0,240,255,0.35),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: vch-pop-in .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes vch-pop-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.vch-modal::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(0,240,255,0.5), rgba(255,0,170,0.3) 60%, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.vch-modal__brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #00f0ff;
  margin-bottom: 22px;
}
.vch-modal__title {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.vch-modal__lead {
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 22px;
}
.vch-modal__lead strong { color: #e0e0e8; font-weight: 500; }
.vch-modal__lead small { font-size: 0.85rem; display: block; margin-top: 6px; }

.vch-modal__close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: 0;
  color: rgba(255,255,255,0.35);
  font-size: 1.6rem; cursor: pointer;
  line-height: 1;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.vch-modal__close:hover { color: #fff; background: rgba(255,255,255,0.05); }

/* form inputs */
.vch-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,240,255,0.18);
  background: rgba(5,5,12,0.6);
  color: #e0e0e8;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.vch-input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 0 3px rgba(0,240,255,0.12);
}
.vch-input:disabled { opacity: 0.5; }

.vch-input--otp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  letter-spacing: 8px;
  text-align: center;
  color: #00f0ff;
  padding-left: 24px;
}

.vch-btn-primary {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(95deg, #00f0ff, #00d4ff);
  color: #0a0a0f;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  transition: transform .15s, box-shadow .2s, opacity .15s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.vch-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(0,240,255,0.5);
}
.vch-btn-primary:active:not(:disabled) { transform: translateY(0); }
.vch-btn-primary:disabled { opacity: 0.5; cursor: wait; }

.vch-btn-back {
  background: none; border: 0;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 14px;
  cursor: pointer;
  padding: 6px 0;
}
.vch-btn-back:hover { color: #00f0ff; }

/* notice / error */
.vch-notice {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  border-left: 3px solid;
  display: flex; align-items: flex-start; gap: 10px;
  animation: vch-slide-in .25s ease-out;
}
@keyframes vch-slide-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.vch-notice--success { border-color: #00d4aa; background: rgba(0,212,170,0.07); color: #5feedb; }
.vch-notice--info    { border-color: #00f0ff; background: rgba(0,240,255,0.06); color: #88f1ff; }
.vch-notice--error   { border-color: #ff4d6d; background: rgba(255,77,109,0.08); color: #ffb3c1; }
.vch-notice__icon { font-family: 'JetBrains Mono', monospace; font-weight: 700; flex-shrink: 0; }

/* spinner */
.vch-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: vch-spin .8s linear infinite;
  vertical-align: -2px;
}
@keyframes vch-spin { to { transform: rotate(360deg); } }

/* code-mail-hint chip on phase 2 */
.vch-mail-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,240,255,0.06);
  border: 1px solid rgba(0,240,255,0.2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #88f1ff;
  margin-bottom: 10px;
}

/* ------------- toast system ------------- */
.vch-toast-stack {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 10000;
  display: flex; flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
  width: 360px;
}
.vch-toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(155deg, #14141c 0%, #0e0e16 100%);
  border: 1px solid rgba(0,240,255,0.32);
  border-left: 3px solid #00f0ff;
  border-radius: 12px;
  padding: 14px 18px 14px 16px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6);
  font-family: 'Work Sans', sans-serif;
  font-size: 0.92rem;
  color: #e0e0e8;
  pointer-events: auto;
  animation: toast-slide .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 200px;
}
@keyframes toast-slide {
  from { opacity: 0; transform: translateX(40px) scale(0.92); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.vch-toast.fadeout {
  animation: toast-fadeout .3s ease-in forwards;
}
@keyframes toast-fadeout {
  to { opacity: 0; transform: translateX(40px); }
}
.vch-toast--success { border-left-color: #00d4aa; }
.vch-toast--success .vch-toast__icon { color: #00d4aa; }
.vch-toast--error { border-left-color: #ff4d6d; }
.vch-toast--error .vch-toast__icon { color: #ff4d6d; }
.vch-toast--info .vch-toast__icon { color: #00f0ff; }
.vch-toast__icon {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  flex-shrink: 0;
}
.vch-toast__body { flex: 1 1 auto; line-height: 1.4; }
.vch-toast__title { font-weight: 600; margin-bottom: 2px; font-size: 0.95rem; }
.vch-toast__msg { color: rgba(255,255,255,0.7); font-size: 0.86rem; }
.vch-toast__close {
  background: none; border: 0; cursor: pointer;
  color: rgba(255,255,255,0.35);
  font-size: 1.2rem; line-height: 1;
  padding: 0 4px; flex-shrink: 0;
  transition: color .15s;
}
.vch-toast__close:hover { color: #fff; }
