/*
  IDN CRM - giris / kayit ekrani.
  Iki bolmeli duzen: solda marka bolmesi, sagda form.
  Dar ekranda marka bolmesi gizlenir, form tam genislige gecer.
  Renkler token'lardan gelir; ham hex yalnizca marka bolmesinin kendi
  koyu zemininde kullanilir (her iki temada da ayni kalmasi icin).
*/

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--c-bg);
}

/* ---------- Sol: marka bolmesi ---------- */

.auth-brand-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 64px);
  overflow: hidden;
  color: #eef3ff;
  background:
    radial-gradient(120% 90% at 12% 8%, #1b3a8f 0%, transparent 55%),
    radial-gradient(90% 80% at 92% 92%, #0a2a6b 0%, transparent 60%),
    linear-gradient(152deg, #0b1e46 0%, #0a1733 55%, #070f24 100%);
}

/* Ince izgara dokusu: duz zemine derinlik katar, dikkat dagitmaz. */
.auth-brand-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 30% 25%, #000 0%, transparent 78%);
  pointer-events: none;
}

/* Yumusak isik halesi */
.auth-brand-pane::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -160px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 132, 255, .30) 0%, transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

.auth-brand-pane > * { position: relative; z-index: 1; }

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: #fff;
}

.auth-logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #0b1e46;
  background: linear-gradient(145deg, #ffffff 0%, #d8e4ff 100%);
  box-shadow: 0 6px 18px rgba(11, 95, 255, .35);
}

.auth-headline {
  max-width: 30ch;
  margin: clamp(32px, 6vh, 56px) 0 0;
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 620;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: #fff;
}

.auth-sub {
  max-width: 44ch;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(226, 235, 255, .74);
}

.auth-points {
  list-style: none;
  margin: clamp(28px, 5vh, 44px) 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 42ch;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(226, 235, 255, .88);
}

.auth-points svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: #7ca8ff;
}

.auth-brand-foot {
  margin-top: clamp(32px, 6vh, 56px);
  font-size: 12.5px;
  color: rgba(226, 235, 255, .5);
}

/* ---------- Sag: form bolmesi ---------- */

.auth-form-pane {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 48px);
  background: var(--c-surface);
  /* Koyu temada iki bolme birbirine yakin tonda kalir; ince kenar ayrimi netlestirir. */
  border-left: 1px solid var(--c-border);
}

.auth-card { width: 100%; max-width: 408px; }

/* Dar ekranda gorunen kompakt marka basligi */
.auth-card-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 17px;
  font-weight: 650;
  color: var(--c-text);
}

.auth-card-brand .auth-logo-mark {
  width: 34px;
  height: 34px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--c-accent) 0%, #2f7bff 100%);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 640;
  letter-spacing: -.02em;
  color: var(--c-text);
}

.auth-lead {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text-muted);
}

/* ---------- Form ogeleri ---------- */

.auth-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }

.auth-label { font-size: 13px; font-weight: 600; color: var(--c-text); }
.auth-label .req { color: var(--c-danger); margin-left: 2px; }

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

.auth-input-wrap > svg {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--c-text-subtle);
  pointer-events: none;
  transition: color .15s ease;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  font: inherit;
  font-size: 14px;
  color: var(--c-text);
  /* Alanlar, form bolmesinin yuzeyinden bir ton ayrilir. */
  background: var(--c-surface-muted);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.auth-input::placeholder { color: var(--c-text-subtle); }
.auth-input:hover { border-color: var(--c-border-strong); }

.auth-input:focus {
  outline: none;
  background: var(--c-surface);
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px var(--c-accent-soft);
}

.auth-input-wrap:focus-within > svg { color: var(--c-accent); }
.auth-input[aria-invalid="true"] { border-color: var(--c-danger); }

/* Sifre goster/gizle */
.auth-reveal {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--c-text-subtle);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}

.auth-reveal:hover { color: var(--c-text); background: var(--c-surface-muted); }
.auth-reveal:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.auth-reveal svg { width: 18px; height: 18px; }
.auth-reveal svg[hidden] { display: none; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 22px;
  font-size: 13px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text-muted);
  cursor: pointer;
  user-select: none;
}

.auth-link { color: var(--c-accent); text-decoration: none; font-weight: 550; }
.auth-link:hover { text-decoration: underline; }

/* ---------- Gonder dugmesi ---------- */

.auth-submit {
  position: relative;
  width: 100%;
  height: 46px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(180deg, #1668ff 0%, var(--c-accent) 100%);
  box-shadow: 0 6px 18px rgba(11, 95, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .12s ease, box-shadow .18s ease, filter .15s ease;
}

.auth-submit:hover { filter: brightness(1.05); box-shadow: 0 8px 22px rgba(11, 95, 255, .34); }
.auth-submit:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(11, 95, 255, .26); }
.auth-submit:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.auth-submit[disabled] { cursor: progress; filter: saturate(.7) brightness(.95); box-shadow: none; }

.auth-submit .spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

.auth-submit.is-busy .spinner { display: inline-block; }

@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ---------- Alt bilgi ve uyarilar ---------- */

.auth-foot {
  margin-top: 24px;
  font-size: 13.5px;
  text-align: center;
  color: var(--c-text-muted);
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  border-radius: 11px;
  color: var(--c-danger);
  background: var(--c-danger-soft);
  border: 1px solid var(--c-danger);
}

.auth-alert svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }

.auth-hint { font-size: 12.5px; color: var(--c-text-muted); }

/* Kayit formunda yan yana alanlar */
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.auth-grid .auth-field.span-2 { grid-column: 1 / -1; }

/* ---------- Duyarli davranis ---------- */

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand-pane { display: none; }
  .auth-card-brand { display: flex; }
  .auth-form-pane { border-left: 0; }
}

@media (max-width: 460px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit,
  .auth-input,
  .auth-reveal,
  .auth-input-wrap > svg { transition: none; }
  .auth-submit .spinner { animation-duration: 2s; }
}
