/* =========================================================
   styles/auth.css
   Giriş ve Kayıt (Auth) Ekranı Stilleri
   ========================================================= */

#auth-shell {
  position: fixed; inset: 0; display: none; justify-content: center; align-items: flex-start;
  background: transparent; padding: 0; box-sizing: border-box; z-index: 10;
}
body.state-report-mode #auth-shell { display: none !important; }

/* Sol Üst: Finly Logosu ve Texti */
.finly-home-header { position: absolute; top: 40px; left: 40px; z-index: 999999; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; transition: all 0.3s ease; }
.finly-home-header img { height: 60px; width: auto; object-fit: contain; filter: drop-shadow(0px 0px 15px rgba(255, 255, 255, 0.3)); }
.finly-by-text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; font-weight: 700; color: #D2E6EA; letter-spacing: 0.5px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }

/* Sağ Alt: Data Connecta Logosu (Oval Cam Efektli) */
.dc-bottom-logo { position: absolute; bottom: 40px; right: 40px; z-index: 999999; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: all 0.3s ease; background: rgba(145, 150, 145, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 16px 45px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.25); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); }
.dc-bottom-logo img { height: 45px; width: auto; object-fit: contain; }

.auth-container { width: 100%; height: 100vh; position: relative; display: flex; align-items: center; justify-content: flex-end; padding-right: clamp(24px, 6vw, 140px); z-index: 1; box-sizing: border-box; }
.auth-promo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.auth-promo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.auth-promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.3) 100%); z-index: 1; pointer-events: none; }

#promo-header { font-family: "Crimson Pro", serif; position: absolute; top: 47px; left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; color: var(--brand) !important; font-size: 45px; font-weight: 900; line-height: 1.1; letter-spacing: 1px; z-index: 10; text-shadow: 0 0 6px rgba(255,255,255,0.95), 0 0 14px rgba(255,255,255,0.85); pointer-events: none; }

/* Subtitle css üzerinden de tamamen gizlendi */
#promo-subtitle { display: none !important; }

#auth-card {
  position: relative; width: 383px; height: 459px; flex: 0 0 auto; background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); border-radius: 14px; padding: 55px 25px 20px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: flex-start;
  --fs-title: 36px; --fs-base: 15px; --fs-sm: 13px; --radius: 12px; --row-gap: 8px; --helper-h: 14px;
}

/* GÜNCELLEME: İptal edilen alt başlığın boşluğunu doldurmak ve formu aşağı itmek için margin eklendi */
#auth-title { font-size: var(--fs-title); font-weight: 700; margin: 0 0 34px 0; line-height: 1.1; letter-spacing: -0.4px; }
#auth-subtitle { display: none; }

#btn-google-login.auth-btn, #auth-card .auth-btn.google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #2d4832; border: 1px solid rgba(32, 33, 36, 0.18); padding: 11px 14px; margin-bottom: 4px; width: 100%; cursor: pointer; font-size: var(--fs-base); font-weight: 600; }
#auth-card .auth-btn.google img { width: 18px; height: 18px; }
.auth-or-divider { display: flex; align-items: center; width: 100%; font-size: var(--fs-sm); font-weight: 600; color: rgba(32, 33, 36, 0.45); padding: 4.5px 0; margin: 7px 0; user-select: none; }
.auth-or-divider::before, .auth-or-divider::after { content: ""; flex: 1; border-bottom: 1px solid rgba(32, 33, 36, 0.14); }
.auth-or-divider:not(:empty)::before { margin-right: 0.6em; }
.auth-or-divider:not(:empty)::after { margin-left: 0.6em; }

#form-stage { position: relative; width: 100%; min-height: 185px; }
#login-form, #register-form { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr; grid-auto-rows: min-content; row-gap: var(--row-gap); grid-template-rows: auto var(--helper-h) auto auto auto; }
#auth-card input { width: 100%; padding: 11px 0; border: none; border-bottom: 1px solid rgba(32, 33, 36, 0.4); background: transparent; box-sizing: border-box; outline: none; font-size: var(--fs-base); font-weight: 600; }
#auth-card input:focus { border-bottom: 2px solid var(--brand); }
#login-button, #register-button { width: 100%; padding: 11px 14px; border-radius: var(--radius); border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; box-sizing: border-box; margin-top: 12px; font-size: var(--fs-base); font-weight: 600; }
#reset-password-link { text-align: right; font-size: var(--fs-sm); font-weight: 700; color: rgba(29, 62, 47, 0.85); height: var(--helper-h); line-height: var(--helper-h); margin-top: 2px; margin-bottom: -6px; cursor: pointer; user-select: none; }
.auth-switch-text { margin-top: 10px; width: 100%; font-size: var(--fs-sm); text-align: center; color: rgba(63, 95, 74, 0.95); user-select: none; }
.auth-link { color: var(--brand); font-weight: 700; cursor: pointer; }

#login-form .auth-row:first-of-type { grid-row: 1; }
#reset-password-link { grid-row: 2; }
#login-form .auth-row:nth-of-type(2) { grid-row: 3; }
#login-button, #register-button { grid-row: 4; }
#switch-login-block, #switch-register-block { grid-row: 5; display: flex; justify-content: center; gap: 6px; }

@media (max-width: 820px) {
  /* Ekranı sabitlemekten kurtarıp akışa alıyoruz. */
  #auth-shell { flex-direction: column !important; background: #fff !important; padding: 32px 24px 12px 24px !important; overflow-y: auto !important; overflow-x: hidden !important; }
  
  /* Kutu modellerini garantiye alalım (Taşmaları ve sağa/sola oynamaları önler) */
  #auth-card, #form-stage, #login-form, #register-form, #auth-card input, .auth-btn {
    box-sizing: border-box !important;
  }

  /* Masaüstü sabit konumlarını sıfırlıyoruz */
  .finly-home-header, .auth-container, #promo-header, #auth-card {
    position: static !important; transform: none !important; width: 100% !important;
  }

  /* 1. LOGO GRUBU */
  .finly-home-header { display: flex !important; flex-direction: column !important; align-items: flex-start !important; margin-bottom: 24px !important; }
  .finly-home-header img { height: 48px !important; border-radius: 10px !important; filter: none !important; }
  .finly-by-text { color: #4b5563 !important; font-weight: 700 !important; margin-top: 5px !important; text-shadow: none !important; font-size: 14px !important; }

  /* Kapsayıcı Dikey Akış */
  .auth-container { display: flex !important; flex-direction: column !important; padding: 0 !important; height: auto !important; }

  /* Reklam Kutusunu Dağıt ve İçini Serbest Bırak */
  .auth-promo { display: contents !important; }
  .auth-promo::after { display: none !important; }

  /* ========================================================
     2. SLOGAN 
     ======================================================== */
  #promo-header {
    order: 1 !important;
    font-family: "Crimson Pro", serif !important;
    font-size: 38px !important;
    font-weight: 900 !important;
    text-align: center !important;
    color: #000 !important;
    margin: 0 0 24px 0 !important;
    text-shadow: none !important;
    line-height: 1.15 !important;
    white-space: pre-wrap !important;
  }
  
  #promo-header:empty::before { 
    content: "Analiz\A Senin Kontrolünde" !important; 
  }

  #alert-login, #alert-signup { order: 2 !important; margin-bottom: 12px !important; }

  /* 3. FORM KARTI */
  #auth-card {
    order: 3 !important;
    height: auto !important; padding: 0 !important; background: none !important; border: none !important; box-shadow: none !important;
    display: flex !important; flex-direction: column !important;
  }
  #auth-title, .dc-bottom-logo { display: none !important; }
  
  /* Google ile Giriş Butonu */
  #btn-google-login.auth-btn { background: #f4f4f5 !important; color: #000 !important; border: none !important; border-radius: 99px !important; height: 50px !important; display: flex !important; justify-content: center !important; align-items: center !important; margin-bottom: 16px !important; font-weight: 600 !important; font-size: 15px !important; }
  #auth-card .auth-btn.google:not(#btn-google-login) { display: none !important; }

  /* ========================================================
     SIFIR TİTREME (Tüm elemanlar orantılı küçültüldü)
     ======================================================== */
  #form-stage { 
    height: 225px !important; /* Orantılı küçültmeye uygun olarak yüksekliği azalttık */
    min-height: 225px !important; 
    position: relative !important; 
    display: block !important; 
    width: 100% !important;
  }
  
  #login-form, #register-form {
    position: absolute !important; 
    width: 100% !important;
    top: 0 !important; 
    left: 0 !important;
    right: 0 !important; 
    margin: 0 !important;
    padding: 0 !important;
    row-gap: 6px !important; /* Elemanlar arası boşluk 8px'den 6px'e düştü */
  }

  /* Input Alanları: 48px -> 44px */
  #auth-card input { height: 44px !important; border: none !important; border-bottom: 1px solid #d1d5db !important; background: transparent !important; padding: 0 4px !important; border-radius: 0 !important; font-size: 16px !important; margin-bottom: 6px !important; width: 100% !important; }
  #auth-card input:focus { border-bottom: 1px solid #000 !important; outline: none !important; }

  /* Şifremi Unuttum ve Spacer: Farklılık yaratmaması için yükseklikler kilitlendi */
  #reset-password-link, .auth-spacer { 
    display: block !important;
    text-align: right !important; 
    color: #4b5563 !important; 
    font-weight: 600 !important; 
    margin: 2px 0 8px 0 !important; 
    height: 18px !important; 
    line-height: 18px !important; 
    width: 100% !important; 
    min-height: 18px !important; 
  }

  /* Siyah Giriş Yap / Kaydol Butonları: 52px -> 48px */
  #login-button, #register-button { 
    display: flex !important; 
    justify-content: center !important; 
    align-items: center !important; 
    background: #000000 !important; 
    color: #ffffff !important; 
    border: none !important; 
    border-radius: 99px !important; 
    height: 48px !important; 
    margin-top: 8px !important; 
    font-weight: 700 !important; 
    width: 100% !important;
    cursor: pointer !important;
  }

  /* Yönlendirme Metni ("Ücretsiz kayıt olun") */
  .auth-switch-text { 
    margin-top: 6px !important; 
    text-align: center !important; 
    width: 100% !important; 
  }
  /* ======================================================== */

  /* 4. REKLAM GÖRSELİ */
  .auth-promo > img {
    order: 4 !important;
    position: static !important;
    width: 100% !important;
    height: 96px !important;
    object-fit: cover !important;
    border-radius: 14px !important;
    margin-top: 32px !important;
    display: block !important;
  }
}