/* ═══════════════════════════════════════
   REGISTER FORM — Glass Multi-Step
   Kentdeks
═══════════════════════════════════════ */

/* ── Full-screen overlay ── */
#m-register {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#m-register.open {
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop */
#m-register .reg-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.5);
  backdrop-filter: blur(8px);
}

/* Gradient blobs */
#m-register .reg-grad {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
#m-register .reg-grad svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Close button */
#m-register .reg-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: oklch(from var(--navy-800, #0f1c3f) l c h / 0.5);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#m-register .reg-close:hover {
  background: oklch(from var(--navy-800, #0f1c3f) l c h / 0.8);
}

/* Logo top */
#m-register .reg-logo {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Logo PNG artık şeffaf zeminli — koyu/bulanık modal arka planında görünür
   kalması için beyaz, yuvarlatılmış bir çip zemini burada CSS ile veriliyor. */
#m-register .reg-logo img,
#m-login .reg-logo img {
  background: #fff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
#m-register .reg-logo-icon {
  background: var(--blue-500, #2563eb);
  color: #fff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
#m-register .reg-logo-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

/* Form container */
#m-register .reg-body {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 440px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Step panels */
.reg-step {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: reg-step-in 0.3s cubic-bezier(0.25,1,0.5,1) both;
}
.reg-step.active {
  display: flex;
}
@keyframes reg-step-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Title */
.reg-title {
  text-align: center;
  font-family: var(--font-display, serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}
.reg-sub {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

/* User type cards */
.reg-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}
@media (max-width: 420px) {
  .reg-type-grid { grid-template-columns: 1fr; }
}
.reg-type-card {
  padding: 20px 12px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
}
.reg-type-card:hover {
  border-color: rgba(255,255,255,0.3);
}
.reg-type-card.selected {
  border-color: var(--blue-400, #60a5fa);
  background: rgba(96,165,250,0.12);
  color: #fff;
}
.reg-type-card .reg-type-icon {
  font-size: 28px;
}
.reg-type-card .reg-type-label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

/* Glass input */
@property --angle-1 { syntax: "<angle>"; inherits: false; initial-value: -75deg; }
@property --angle-2 { syntax: "<angle>"; inherits: false; initial-value: -45deg; }

.glass-input-wrap {
  position: relative;
  z-index: 2;
  border-radius: 12px;
}
.glass-input {
  display: flex;
  position: relative;
  width: 100%;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(4px);
  transition: all 0.4s cubic-bezier(0.25,1,0.5,1);
  background: linear-gradient(-75deg, rgba(255,255,255,0.03), rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,0.05),
    inset 0 -2px 2px rgba(0,0,0,0.2),
    0 4px 2px -2px rgba(0,0,0,0.2),
    inset 0 0 1.5px 4px rgba(0,0,0,0.1);
}
.glass-input-wrap:focus-within .glass-input {
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,0.07),
    inset 0 -2px 2px rgba(0,0,0,0.2),
    0 2px 1px -1.5px rgba(255,255,255,0.15),
    inset 0 0 1px 2px rgba(255,255,255,0.1);
}
.glass-input::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 12px;
  width: calc(100% + 1.5px);
  height: calc(100% + 1.5px);
  top: -0.75px;
  left: -0.75px;
  padding: 1.5px;
  box-sizing: border-box;
  background:
    conic-gradient(from var(--angle-1) at 50% 50%,
      rgba(255,255,255,0.5) 0%, transparent 5% 40%,
      rgba(255,255,255,0.5) 50%, transparent 60% 95%,
      rgba(255,255,255,0.5) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0.25));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all 0.4s cubic-bezier(0.25,1,0.5,1), --angle-1 500ms ease;
  pointer-events: none;
}
.glass-input-wrap:focus-within .glass-input::after {
  --angle-1: -125deg;
}
.glass-input-text-area {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
}
.glass-input-text-area::after {
  content: "";
  display: block;
  position: absolute;
  width: calc(100% - 1.5px);
  height: calc(100% - 1.5px);
  top: 0.75px;
  left: 0.75px;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: clip;
  background: linear-gradient(var(--angle-2), transparent 0%, rgba(255,255,255,0.35) 40% 50%, transparent 55%);
  z-index: 3;
  mix-blend-mode: screen;
  pointer-events: none;
  background-size: 200% 200%;
  background-position: 0% 50%;
  transition: background-position 0.5s cubic-bezier(0.25,1,0.5,1), --angle-2 0.5s;
}
.glass-input-wrap:focus-within .glass-input-text-area::after {
  background-position: 25% 50%;
}
.glass-input .gi-icon {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.glass-input input {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
}
.glass-input input::placeholder {
  color: rgba(255,255,255,0.4);
}
/* Remove autofill color */
.glass-input input:-webkit-autofill,
.glass-input input:-webkit-autofill:hover,
.glass-input input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px transparent inset !important;
  -webkit-text-fill-color: #fff !important;
  background-color: transparent !important;
  transition: background-color 5000s ease-in-out 0s !important;
}
.glass-input .gi-toggle {
  position: relative;
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  padding: 0;
  transition: color 0.2s;
}
.glass-input .gi-toggle:hover {
  color: rgba(255,255,255,0.9);
}
.glass-input .gi-file-label {
  position: relative;
  z-index: 10;
  flex: 1;
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.glass-input .gi-file-label.has-file {
  color: rgba(255,255,255,0.9);
}

/* Fields layout */
.reg-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Glass button */
.glass-btn-wrap {
  --anim-time: 400ms;
  --anim-ease: cubic-bezier(0.25,1,0.5,1);
  --border-width: 1.5px;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  transition: transform var(--anim-time) var(--anim-ease);
  border-radius: 9999px;
  cursor: pointer;
  width: 100%;
}
.glass-btn-wrap:has(button:active) {
  transform: rotateX(25deg);
}
.glass-btn {
  position: relative;
  z-index: 10;
  width: 100%;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: all var(--anim-time) var(--anim-ease);
  background: linear-gradient(-75deg, rgba(255,255,255,0.03), rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,0.05),
    inset 0 -2px 2px rgba(0,0,0,0.3),
    0 4px 2px -2px rgba(0,0,0,0.3),
    inset 0 0 1.5px 4px rgba(0,0,0,0.12);
  padding: 0;
}
.glass-btn:hover {
  transform: scale(0.975);
}
.glass-btn:disabled,
.glass-btn-wrap:has(button:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}
.glass-btn-wrap:has(button:disabled) {
  pointer-events: none;
}
.glass-btn::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 9999px;
  width: calc(100% + var(--border-width));
  height: calc(100% + var(--border-width));
  top: calc(0% - var(--border-width) / 2);
  left: calc(0% - var(--border-width) / 2);
  padding: var(--border-width);
  box-sizing: border-box;
  background:
    conic-gradient(from var(--angle-1) at 50% 50%,
      rgba(255,255,255,0.5) 0%, transparent 5% 40%,
      rgba(255,255,255,0.5) 50%, transparent 60% 95%,
      rgba(255,255,255,0.5) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0.25));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--anim-time) var(--anim-ease), --angle-1 500ms ease;
  pointer-events: none;
}
.glass-btn:hover::after { --angle-1: -125deg; }
.glass-btn-text {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 1px rgba(0,0,0,0.1);
  transition: all var(--anim-time) var(--anim-ease);
}
.glass-btn-text::after {
  content: "";
  display: block;
  position: absolute;
  width: calc(100% - var(--border-width));
  height: calc(100% - var(--border-width));
  top: calc(0% + var(--border-width) / 2);
  left: calc(0% + var(--border-width) / 2);
  box-sizing: border-box;
  border-radius: 9999px;
  overflow: clip;
  background: linear-gradient(var(--angle-2), transparent 0%, rgba(255,255,255,0.35) 40% 50%, transparent 55%);
  z-index: 3;
  mix-blend-mode: screen;
  pointer-events: none;
  background-size: 200% 200%;
  background-position: 0% 50%;
  transition: background-position 0.5s, --angle-2 0.5s;
}
.glass-btn:hover .glass-btn-text::after {
  background-position: 25% 50%;
}

/* Back button */
.reg-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.reg-back-btn:hover { color: rgba(255,255,255,0.9); }

/* Actions row */
.reg-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.reg-actions .glass-btn-wrap {
  flex: 1;
}

/* Loading overlay */
#reg-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border-radius: 20px;
}
#reg-loading.active { display: flex; }
.reg-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--blue-400, #60a5fa);
  border-radius: 50%;
  animation: reg-spin 0.8s linear infinite;
}
@keyframes reg-spin { to { transform: rotate(360deg); } }
.reg-loading-msg {
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  animation: reg-fade-cycle 1.5s ease-in-out infinite;
}
@keyframes reg-fade-cycle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Success overlay */
#reg-success {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
}
#reg-success.active { display: flex; }
.reg-success-icon {
  font-size: 56px;
  color: #4ade80;
  animation: reg-pop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes reg-pop {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.reg-success-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.reg-success-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

/* Error message */
.reg-error {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fca5a5;
  font-size: 0.85rem;
  width: 100%;
}
.reg-error.active { display: flex; }

/* Confetti canvas */
#reg-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* Password strength dots */
.reg-pw-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-top: -4px;
}

/* Validation check marks */
.field-check {
  position: relative;
}
.field-check .gi-valid {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #4ade80;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 20;
}
.field-check.is-valid .gi-valid {
  opacity: 1;
}

/* ── SELECT (Bina Bilgileri adımı) ── */
.glass-input select {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.glass-input select option {
  background: #0F1C3F;
  color: #fff;
}
.glass-input select:invalid,
.glass-input select option[value=""] {
  color: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════
   LOGIN MODAL — #m-register ile birebir aynı
   kapsayıcı davranışı (backdrop/grad/logo/body),
   iç bileşenler (.reg-type-card, .glass-input,
   .glass-btn vb.) yukarıdaki kurallardan miras alır.
═══════════════════════════════════════ */
#m-login {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#m-login.open {
  opacity: 1;
  pointer-events: auto;
}
#m-login .reg-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.5);
  backdrop-filter: blur(8px);
}
#m-login .reg-grad {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
#m-login .reg-grad svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#m-login .reg-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: oklch(from var(--navy-800, #0f1c3f) l c h / 0.5);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#m-login .reg-close:hover {
  background: oklch(from var(--navy-800, #0f1c3f) l c h / 0.8);
}
#m-login .reg-logo {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}
#m-login .reg-body {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 440px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
#m-login .modal-note {
  text-align: center;
  font-size: 13px;
}
#m-login .modal-note a { font-weight: 600; text-decoration: none; }

/* ── Google ile devam et (opsiyonel — GOOGLE_CLIENT_ID yoksa görünmez kalır;
      js/google-auth.js yapılandırıldığını doğrulayınca .kd-oauth-wrap'i açar) ── */
.kd-oauth-wrap { display: none; flex-direction: column; gap: 10px; }
.kd-oauth-wrap.on { display: flex; }
.kd-oauth-divider {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.4); font-size: 12px; margin: 2px 0;
}
.kd-oauth-divider::before, .kd-oauth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.16);
}
.kd-oauth-slot { display: flex; justify-content: center; }
