/* ═══════════════════════════════════════════════
   KESTOSIPS — AUTH MODAL
═══════════════════════════════════════════════ */
#ks-auth-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
#ks-auth-overlay.open { opacity: 1; pointer-events: all; }

#ks-auth-panel {
  background: #0e0e0e;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 44px 40px 36px;
  width: 100%; max-width: 400px;
  position: relative;
  transform: translateY(20px);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
}
#ks-auth-overlay.open #ks-auth-panel { transform: translateY(0); }

.ks-auth-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: .95rem; font-weight: 900;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.4);
  text-align: center; margin-bottom: 28px;
}
.ks-auth-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem; font-weight: 400;
  color: #fff; text-align: center;
  margin: 0 0 8px; line-height: 1.2;
}
.ks-auth-sub {
  font-size: .78rem; color: rgba(255,255,255,.38);
  text-align: center; margin: 0 0 28px;
  line-height: 1.65;
}
.ks-auth-sub strong { color: rgba(255,255,255,.65); font-weight: 500; }

.ks-auth-err {
  background: rgba(220,60,60,.1);
  border: 1px solid rgba(220,60,60,.25);
  color: #e07070; font-size: .78rem;
  padding: 10px 14px; border-radius: 8px;
  margin-bottom: 16px; display: none; line-height: 1.5;
}

.ks-auth-form { display: flex; flex-direction: column; gap: 14px; }

.ks-auth-field { display: flex; flex-direction: column; gap: 7px; }
.ks-auth-field label {
  font-size: .62rem; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(255,255,255,.3);
}
.ks-auth-field input {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px; padding: 12px 14px;
  color: #fff; font-size: .88rem;
  outline: none; width: 100%; box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  transition: border-color .2s, background .2s;
}
.ks-auth-field input:focus {
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
}
.ks-auth-field input::placeholder { color: rgba(255,255,255,.18); }
.ks-auth-field input[type="text"].otp-input {
  letter-spacing: .5em; font-size: 1.4rem;
  text-align: center; font-family: monospace;
}

.ks-auth-btn-primary {
  background: #fff; color: #000;
  border: none; border-radius: 9px;
  padding: 14px 20px; width: 100%;
  font-size: .7rem; letter-spacing: .2em;
  text-transform: uppercase; font-weight: 700;
  cursor: none; margin-top: 4px;
  transition: background .2s, opacity .2s;
  font-family: 'Inter', sans-serif;
}
.ks-auth-btn-primary:hover:not(:disabled) { background: #e8e8e8; }
.ks-auth-btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.ks-auth-btn-link {
  background: none; border: none;
  color: rgba(255,255,255,.3); font-size: .75rem;
  cursor: none; padding: 0; text-align: center;
  font-family: 'Inter', sans-serif;
  transition: color .2s;
}
.ks-auth-btn-link:hover { color: rgba(255,255,255,.65); }

.ks-auth-divider {
  border: none; border-top: 1px solid rgba(255,255,255,.07);
  margin: 8px 0;
}

.ks-auth-switch {
  margin-top: 22px; text-align: center;
  font-size: .74rem; color: rgba(255,255,255,.28);
  line-height: 1.6;
}
.ks-auth-switch button {
  background: none; border: none;
  color: rgba(255,255,255,.6); font-size: .74rem;
  cursor: none; padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: 'Inter', sans-serif;
  transition: color .2s;
}
.ks-auth-switch button:hover { color: #fff; }

.ks-auth-close {
  position: absolute; top: 16px; right: 18px;
  background: none; border: none;
  color: rgba(255,255,255,.25); font-size: 1rem;
  cursor: none; padding: 6px 8px;
  transition: color .2s; line-height: 1;
}
.ks-auth-close:hover { color: rgba(255,255,255,.7); }

.ks-auth-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
  margin: 0 auto 14px;
  font-family: 'Playfair Display', Georgia, serif;
}
.ks-auth-account-email {
  text-align: center; color: rgba(255,255,255,.4);
  font-size: .8rem; margin-bottom: 4px;
}

/* ── Nav auth button ────────────────────────── */
#ks-auth-btn {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.6);
  font-size: .62rem; letter-spacing: .15em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 20px;
  cursor: none; display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s, color .2s;
  white-space: nowrap; font-family: 'Inter', sans-serif;
  margin-left: 12px;
}
#ks-auth-btn:hover { background: rgba(255,255,255,.14); color: #fff; }

/* Flip to dark when nav is transparent over light POTM */
#ks-nav:not(.solid) #ks-auth-btn {
  background: rgba(0,0,0,.07);
  border-color: rgba(0,0,0,.12);
  color: rgba(0,0,0,.55);
}
#ks-nav:not(.solid) #ks-auth-btn:hover {
  background: rgba(0,0,0,.14); color: #000;
}

@media (max-width: 640px) {
  #ks-auth-btn { display: none; }
  #ks-auth-panel { padding: 36px 24px 28px; }
}
