/*!
 * Quenara Auth Module v2 — Companion CSS
 * Vanilla bundle (auth.bundle.js) için class köprüleri.
 * Mevcut styles.css'e ek olarak yüklenir.
 */

/* === Reset: kill legacy .qnr-input rules from base auth.css ===
   Base CSS targets .qnr-input as an <input> element (floating-label era).
   Bundle uses .qnr-input as a wrapper div. Reset before re-styling. */
.qnr-auth .qnr-input {
  width: 100%;
  height: auto;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  color: inherit;
  position: static;
}
.qnr-auth .qnr-input:hover,
.qnr-auth .qnr-input:focus,
.qnr-auth .qnr-input:focus-visible {
  border: none;
  background: none;
  box-shadow: none;
  outline: none;
}

/* === Layout: 2-column shell === */
.qnr-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--qnr-paper, #FAF9F7);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--qnr-ink, #042F2E);
}
@media (max-width: 1023px) {
  .qnr-auth { grid-template-columns: 1fr; }
  .qnr-brand-side { display: none; }
}

/* Brand side (left) */
.qnr-brand-side {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #042F2E 0%, #064E3B 50%, #047857 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 40px 56px;
  min-height: 100vh;
}

.qnr-brand-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: auto;
}

.qnr-brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}
.qnr-brand-logo__img {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(2, 31, 31, 0.3);
}
.qnr-brand-logo__placeholder {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  color: #064E3B;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 22px;
}
.qnr-brand-logo__text strong { font-weight: 700; }

.qnr-lang-pill {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(10px);
}
.qnr-lang-pill__opt {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 200ms;
}
.qnr-lang-pill__opt.is-active {
  background: #fff;
  color: #042F2E;
}

.qnr-brand-head {
  position: relative;
  z-index: 3;
  margin-bottom: 60px;
}
.qnr-brand-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: #D4AF37;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.qnr-brand-eyebrow__line {
  width: 32px;
  height: 2px;
  background: #D4AF37;
}
.qnr-brand-headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.qnr-brand-headline__white { color: #fff; }
.qnr-brand-headline__gold { color: #D4AF37; }

.qnr-stats {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.qnr-stat__num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #fff;
  letter-spacing: -0.02em;
}
.qnr-stat__lbl {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
}

/* Form side (right) */
.qnr-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 56px;
  background: #FAF9F7;
  position: relative;
}
@media (max-width: 480px) {
  .qnr-form-side { padding: 32px 24px; }
  .qnr-brand-side { padding: 32px 24px; }
}

.qnr-form-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 8px 32px rgba(4, 47, 46, 0.06);
}
@media (max-width: 480px) {
  .qnr-form-card { padding: 32px 24px; border-radius: 20px; }
}

.qnr-form-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #042F2E;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.qnr-form-subtitle {
  font-size: 14px;
  color: #6B7B7A;
  margin: 0 0 28px;
}

.qnr-form { display: flex; flex-direction: column; gap: 16px; }

/* Input — bundle structure: .qnr-input > .qnr-input__inner > .qnr-input__field */
.qnr-input { width: 100%; }
.qnr-input__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6B7B7A;
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
}
.qnr-input__inner {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  background: #FAF9F7;
  border: 1.5px solid #E5E7E6;
  border-radius: 16px;
  transition: border-color 200ms, box-shadow 200ms, background 200ms;
}
.qnr-input__inner:focus-within {
  border-color: #047857;
  box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.10);
  background: #fff;
}
.qnr-input__lead {
  display: grid;
  place-items: center;
  width: 44px;
  color: #6B7B7A;
  flex-shrink: 0;
}
.qnr-input__inner:focus-within .qnr-input__lead { color: #047857; }
.qnr-input__field {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 16px 0 0;
  font-size: 15px;
  color: #042F2E;
  font-family: inherit;
}
.qnr-input--icon .qnr-input__field { padding-left: 0; }
.qnr-input:not(.qnr-input--icon) .qnr-input__field { padding-left: 18px; }
.qnr-input__field::placeholder { color: #9CA8A7; }
.qnr-input__trail {
  background: transparent;
  border: none;
  width: 44px;
  height: 100%;
  display: grid;
  place-items: center;
  color: #6B7B7A;
  cursor: pointer;
  flex-shrink: 0;
}
.qnr-input__trail:hover { color: #047857; }

[dir="rtl"] .qnr-input__field { padding: 0 0 0 16px; }

/* Caps lock hint */
.qnr-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6B7B7A;
  margin-top: -8px;
}
.qnr-hint--warn { color: #D97706; }

/* Form row: remember me + forgot */
.qnr-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
}
.qnr-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #4A5856;
}
.qnr-check input { display: none; }
.qnr-check__box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid #C5CFCD;
  display: grid; place-items: center;
  background: #fff;
  transition: all 200ms;
  color: #fff;
}
.qnr-check__box svg { opacity: 0; transition: opacity 200ms; }
.qnr-check input:checked + .qnr-check__box {
  background: #047857;
  border-color: #047857;
}
.qnr-check input:checked + .qnr-check__box svg { opacity: 1; }

.qnr-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #047857;
  cursor: pointer;
}
.qnr-link:hover { text-decoration: underline; }
.qnr-link--gold { color: #B8911E; }
.qnr-link--gold:hover { color: #92722B; }
.qnr-link--mute { color: #6B7B7A; font-weight: 500; }
.qnr-link--mute:hover { color: #042F2E; }

/* Buttons */
.qnr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms;
  text-decoration: none;
}
.qnr-btn--lg { height: 56px; font-size: 16px; width: 100%; white-space: nowrap; }
.qnr-btn--primary {
  background: linear-gradient(135deg, #047857, #10B981);
  color: #fff;
  box-shadow: 0 8px 24px rgba(4, 120, 87, 0.28);
}
.qnr-btn--primary:hover {
  box-shadow: 0 12px 32px rgba(4, 120, 87, 0.36);
  transform: translateY(-1px);
}
.qnr-btn--primary:active { transform: translateY(0); }
.qnr-btn--primary[disabled] { opacity: 0.6; pointer-events: none; }
.qnr-btn--ghost {
  background: transparent;
  border: 1.5px solid #047857;
  color: #047857;
}
.qnr-btn--ghost:hover {
  background: rgba(4, 120, 87, 0.06);
}

.qnr-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: qnr-spin 700ms linear infinite;
}
@keyframes qnr-spin { to { transform: rotate(360deg); } }

/* Divider */
.qnr-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 18px;
}
.qnr-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #E5E7E6, transparent);
}
.qnr-divider__txt {
  color: #9CA8A7;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
}

/* Social row */
.qnr-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.qnr-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  background: #fff;
  border: 1.5px solid #E5E7E6;
  border-radius: 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #4A5856;
  cursor: pointer;
  transition: all 200ms;
}
.qnr-social-btn:hover {
  border-color: #C5CFCD;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(4, 47, 46, 0.06);
}
.qnr-social-btn__icon { display: grid; place-items: center; }
.qnr-social-btn__lbl { font-size: 13px; }

/* Passkey card */
.qnr-passkey {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(16, 185, 129, 0.06);
  border: 1.5px solid rgba(16, 185, 129, 0.18);
  border-radius: 16px;
  cursor: pointer;
  transition: all 200ms;
  text-align: left;
  font-family: inherit;
}
.qnr-passkey:hover {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.28);
}
.qnr-passkey__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #047857;
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.qnr-passkey__body { flex: 1; }
.qnr-passkey__title {
  font-weight: 700;
  font-size: 14px;
  color: #042F2E;
}
.qnr-passkey__sub {
  font-size: 12px;
  color: #6B7B7A;
  margin-top: 2px;
}
.qnr-passkey__arrow { color: #047857; }

/* Register row */
.qnr-register-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #F0EFEC;
}
.qnr-register-row__txt { font-size: 13px; color: #6B7B7A; }
.qnr-register-row .qnr-btn--ghost { height: 40px; font-size: 13px; padding: 0 18px; }

/* Footer */
.qnr-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 440px;
  margin: 24px auto 0;
  padding: 0 8px;
  font-size: 12px;
  color: #6B7B7A;
}
.qnr-form-footer__left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #047857;
  font-weight: 500;
}
.qnr-form-footer__right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qnr-form-footer__dot { color: #C5CFCD; }

/* Alert */
.qnr-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 16px;
}
.qnr-alert--error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.18);
  color: #B91C1C;
}

/* Toast */
.qnr-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(4, 47, 46, 0.18);
  animation: qnr-toast-in 300ms ease;
}
.qnr-toast--success { background: #047857; color: #fff; }
.qnr-toast--info { background: #042F2E; color: #fff; }
.qnr-toast.is-leaving { opacity: 0; transition: opacity 400ms; }
@keyframes qnr-toast-in {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Focus visible (a11y) */
.qnr-btn:focus-visible,
.qnr-social-btn:focus-visible,
.qnr-passkey:focus-visible,
.qnr-input__field:focus-visible,
.qnr-input__trail:focus-visible,
.qnr-link:focus-visible,
.qnr-lang-pill__opt:focus-visible {
  outline: 3px solid #D4AF37;
  outline-offset: 2px;
}


/* === v3.0: Cross-device passkey card variant + centered footer === */
.qnr-passkey + .qnr-passkey { margin-top: 10px; }
.qnr-passkey--key .qnr-passkey__icon,
.qnr-passkey__icon--gold {
  background: linear-gradient(135deg, #FAEBA8, #D4AF37);
  color: #042F2E;
}
.qnr-form-footer__center {
  margin: 0 auto;
  justify-content: center;
}
.qnr-form-footer:has(.qnr-form-footer__center) {
  justify-content: center;
}
