/* Bayi giriş/kayıt sayfaları.
 *
 * Düzen, Django admin girişiyle (templates/admin/login.html) AYNI: tam ekran iki panel -
 * solda marka + dikeyde ortalanmış form kartı, sağda yuvarlatılmış görsel panel.
 * Birincil renk Avgo turuncusu (--b2b-primary): masaüstü ve mobil uygulamalarla aynı
 * değer (`desktop/app/assets/css/colors.css` → --color-primary). Gentelella'nın
 * turkuazı derlenmiş tema CSS'inde de bu renge çevrildi, yani giriş → panel geçişi
 * tek renkte kalıyor.
 *
 * --b2b-ok-* bilerek yeşil bırakıldı: o "başarılı" anlamının rengi, markanın değil.
 *
 * Gentelella'nın derlenmiş CSS'i de `.auth-page` / `.form-control` / `.btn` gibi
 * sınıflar tanımlıyor. Çakışmayı önlemek için buradaki her şey `.auth-shell` altına
 * yazıldı ve form alanları temanın adlarını DEĞİL admin girişinin adlarını kullanıyor
 * (`.field`, `.field-wrap`, `.submit-btn`).
 */

.auth-shell {
  --b2b-primary: #d46a27;
  --b2b-primary-dark: #c05e22;
  --b2b-primary-soft: rgba(212, 106, 39, 0.1);
  --b2b-bg: #fff;
  --b2b-bg-alt: #f8fafc;
  --b2b-border: #e2e8f0;
  --b2b-text: #0f172a;
  --b2b-text-muted: #64748b;
  --b2b-text-dim: #94a3b8;
  --b2b-error-bg: rgba(220, 38, 38, 0.06);
  --b2b-error-border: rgba(220, 38, 38, 0.2);
  --b2b-error-text: #b91c1c;
  --b2b-ok-bg: rgba(22, 159, 133, 0.07);
  --b2b-ok-border: rgba(22, 159, 133, 0.22);
  --b2b-ok-text: #0f766e;

  display: flex;
  min-height: 100vh;
  color: var(--b2b-text);
  background: var(--b2b-bg);
}

/* ── Sol: form paneli ── */
.auth-shell .form-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  padding: 28px 24px;
}

@media (min-width: 640px) {
  .auth-shell .form-panel { padding: 40px 56px; }
}

@media (min-width: 1024px) {
  .auth-shell .form-panel { width: 46%; flex: none; }
}

.auth-shell .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.auth-shell .brand__mark {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 5px;
  background: #f1f1f1;
  border-radius: 10px;
}

.auth-shell .brand__mark img { width: 100%; height: 100%; object-fit: contain; }

.auth-shell .brand__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--b2b-text);
}

.auth-shell .brand__name small {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 400;
  color: var(--b2b-text-muted);
}

.auth-shell .form-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

.auth-shell .form-card { width: 100%; max-width: 376px; }

/* Kayıt formu uzun; orada kart genişler ve alanlar iki kolona düşer. */
.auth-shell .form-card--wide { max-width: 560px; }

.auth-shell .form-card h1 {
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.auth-shell .form-card .subtitle {
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--b2b-text-muted);
  text-align: center;
}

/* ── Uyarı kutuları (Django messages) ── */
.auth-shell .notice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 10px;
}

.auth-shell .notice--error {
  color: var(--b2b-error-text);
  background: var(--b2b-error-bg);
  border: 1px solid var(--b2b-error-border);
}

.auth-shell .notice--ok {
  color: var(--b2b-ok-text);
  background: var(--b2b-ok-bg);
  border: 1px solid var(--b2b-ok-border);
}

.auth-shell .notice--info {
  color: var(--b2b-text-muted);
  background: var(--b2b-bg-alt);
  border: 1px solid var(--b2b-border);
}

.auth-shell .notice svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }

/* ── Alanlar ── */
.auth-shell .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-shell .field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--b2b-text);
}

.auth-shell .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .auth-shell .field-row { grid-template-columns: 1fr; }
}

.auth-shell .field-wrap { position: relative; display: flex; align-items: center; }

.auth-shell .field-wrap svg.ico {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--b2b-text-dim);
  pointer-events: none;
}

.auth-shell .field input,
.auth-shell .field select,
.auth-shell .field textarea {
  width: 100%;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--b2b-text);
  background: #fff;
  border: 1.5px solid var(--b2b-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* İkonlu alanlarda metin ikonun altına girmesin. */
.auth-shell .field-wrap svg.ico ~ input { padding-left: 38px; }

.auth-shell .field input:focus,
.auth-shell .field select:focus,
.auth-shell .field textarea:focus {
  border-color: var(--b2b-primary);
  box-shadow: 0 0 0 3px var(--b2b-primary-soft);
}

.auth-shell .field input::placeholder { color: var(--b2b-text-dim); }

.auth-shell .field input[type="file"] {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--b2b-text-muted);
}

.auth-shell .field-hint {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--b2b-text-muted);
}

.auth-shell .eye-btn {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--b2b-text-muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
}

.auth-shell .eye-btn:hover { color: var(--b2b-text); background: var(--b2b-bg-alt); }
.auth-shell .eye-btn svg { width: 17px; height: 17px; }

.auth-shell .forgot {
  margin: -4px 0 16px;
  font-size: 13px;
  text-align: right;
}

.auth-shell .forgot a { font-weight: 500; color: var(--b2b-primary); text-decoration: none; }
.auth-shell .forgot a:hover { text-decoration: underline; }

/* Sözleşme onayı - kutunun kendisi TEMANIN `.form-check` bileşeni: `appearance:
 * none` ile çizilmiş kare, birincil renkte tik, hover ve odak halkası. Tarayıcı
 * varsayılanı + `accent-color` kullanılıyordu, işletim sistemine göre değişiyor
 * ve panelin geri kalanına benzemiyordu.
 *
 * Aşağısı yalnızca İKİ SATIRA TAŞAN metin için: tema `.form-check`i tek satırlık
 * seçenekler için yazılmış, `align-items: center` veriyor - uzun metinde kutu
 * satırların ortasına kayıyor. */
.auth-shell .agreement-check {
  align-items: flex-start;
  margin: 2px 0 18px;
  line-height: 1.55;
  color: var(--b2b-text-muted);
}

/* Kutu ilk satırın hizasına otursun (16px kutu, ~20px satır yüksekliği). */
.auth-shell .agreement-check input { margin-top: 2px; }

.auth-shell .agreement-check a { color: var(--b2b-primary); text-decoration: none; }
.auth-shell .agreement-check a:hover { text-decoration: underline; }

/* ── Butonlar ── */
.auth-shell .submit-btn {
  width: 100%;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  background: var(--b2b-primary);
  border: 0;
  border-radius: 10px;
  transition: background 0.15s, transform 0.05s;
}

.auth-shell .submit-btn:hover { background: var(--b2b-primary-dark); }
.auth-shell .submit-btn:active { transform: translateY(1px); }

.auth-shell .ghost-btn {
  display: block;
  width: 100%;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--b2b-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--b2b-border);
  border-radius: 10px;
}

.auth-shell .ghost-btn:hover { background: var(--b2b-bg-alt); }
.auth-shell .ghost-btn + .ghost-btn,
.auth-shell .submit-btn + .ghost-btn { margin-top: 10px; }

.auth-shell .form-footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--b2b-text-muted);
  text-align: center;
}

.auth-shell .form-footer a { font-weight: 500; color: var(--b2b-primary); text-decoration: none; }
.auth-shell .form-footer a:hover { text-decoration: underline; }

/* Uzun metinli sayfalar (sözleşme / KVKK) */
.auth-shell .prose {
  font-size: 13px;
  line-height: 1.75;
  color: var(--b2b-text-muted);
}

.auth-shell .prose p { margin-bottom: 10px; }

/* ── Sağ: görsel panel ── */
.auth-shell .side-panel {
  display: none;
  width: 54%;
  padding: 20px 20px 20px 0;
}

@media (min-width: 1024px) {
  .auth-shell .side-panel { display: flex; }
}

.auth-shell .side-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* Görsel paneli doğrudan kaplar. Panel dar ve uzun, görseller yatay olduğu için
 * kenarlardan kırpılıyor - bu bilinçli: bulanık dolgu + `contain` denendi, görselin
 * etrafında çirkin bir bant bırakıyordu. */
.auth-shell .side-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Alt köşedeki yazının okunması için gradyan.
 *
 * Yalnızca ALT şeridi karartır: yazının oturduğu yerde koyu, %55'ten yukarısı
 * tamamen şeffaf. Önceki sürüm tepede bile 0.25 basıyordu, yani görselin
 * tamamını griye çekiyordu - görsel net görünsün diye üst kısım açıldı. */
.auth-shell .side-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.6) 12%,
    rgba(0, 0, 0, 0.26) 30%,
    rgba(0, 0, 0, 0) 55%
  );
}

.auth-shell .side-content { position: relative; z-index: 1; }

.auth-shell .side-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  height: 100%;
  padding: 40px 44px;
  color: #fff;
}

.auth-shell .side-spacer { flex: 1; }

.auth-shell .side-copy { max-width: 420px; }

.auth-shell .side-copy h2 {
  margin-bottom: 12px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.auth-shell .side-copy p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
}

/* ── Kenar çubuğu marka rozeti (panel - giriş sayfası değil) ────────────────
 *
 * Bu dosya her sayfada yükleniyor, o yüzden panele ait tek tük düzeltmeler de
 * burada. Tema `.brand-icon`ı birincil renkle DOLDURUP içine "A" harfi
 * koyuyordu. Gerçek logo konunca turuncu pin turuncu zeminde kayboluyor:
 * zemin açık renge çekildi, görsel `contain` ile oturtuldu.
 *
 * `contain` şart - pin dar ve uzun (164×239, oran 0,69). Kare kutuya
 * gerdirilirse ezilir. Kutunun kendisi korunuyor: tema onu daraltılmış
 * kenar çubuğunda (`body.sidebar-rail`) 32px olarak yeniden kullanıyor.
 */
.sidebar-brand .brand-icon--logo {
  padding: 4px;
  background: #f1f1f1;
}

.sidebar-brand .brand-icon--logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
