/* Giris ekrani - yalniz login.php kullanir.
   Panelin renk token'lari app.css icinden gelir (--accent-blue, --bg-dark ...). */

.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

/* --- Arka plan: yavas suzulen isik lekeleri + ince izgara ---------------- */

.login-aura {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
}
.login-aura::before,
.login-aura::after {
  content: "";
  position: absolute;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}
.login-aura::before {
  top: 4%;
  left: 12%;
  background: radial-gradient(circle, rgba(99, 102, 241, .55), transparent 68%);
  animation: login-drift-a 22s ease-in-out infinite;
}
.login-aura::after {
  right: 8%;
  bottom: 6%;
  background: radial-gradient(circle, rgba(6, 182, 212, .42), transparent 68%);
  animation: login-drift-b 27s ease-in-out infinite;
}
@keyframes login-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(8vw, 6vh, 0) scale(1.12); }
}
@keyframes login-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.08); }
  50%      { transform: translate3d(-7vw, -5vh, 0) scale(1); }
}

.login-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 62% 55% at 50% 45%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 62% 55% at 50% 45%, #000 20%, transparent 78%);
}

/* --- Kart --------------------------------------------------------------- */

.login-card {
  position: relative;
  z-index: 1;
  width: min(408px, 100%);
  padding: 34px 32px 26px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, .14);
  background: linear-gradient(180deg, rgba(23, 32, 54, .82), rgba(12, 18, 33, .88));
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  box-shadow:
    0 32px 80px -24px rgba(0, 0, 0, .8),
    0 0 0 1px rgba(255, 255, 255, .03) inset;
  animation: login-rise .5s cubic-bezier(.16, 1, .3, 1) both;
}
/* ust kenarda ince isik cizgisi */
.login-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .95), rgba(96, 165, 250, .95), transparent);
}
@keyframes login-rise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.login-card.shake { animation: login-shake .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes login-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

/* --- Baslik ------------------------------------------------------------- */

.login-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
}
.login-logo {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  box-shadow:
    0 10px 26px -8px rgba(99, 102, 241, .8),
    0 0 0 1px rgba(255, 255, 255, .12) inset;
}
.login-head h1 {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -.015em;
}
.login-host {
  margin: 3px 0 0;
  font-size: .8rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* --- Hata --------------------------------------------------------------- */

.login-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: .875rem;
  color: #fecdd3;
  background: rgba(244, 63, 94, .13);
  border: 1px solid rgba(244, 63, 94, .3);
}
.login-alert svg { flex: none; margin-top: 1px; }

/* --- Alanlar ------------------------------------------------------------ */

.login-field { margin-bottom: 16px; }
.login-field label {
  display: block;
  margin: 0 0 7px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-secondary);
}
.login-input {
  position: relative;
  display: flex;
  align-items: center;
}
.login-input .icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color .18s ease;
}
.login-input input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: rgba(2, 6, 23, .55);
  color: var(--text-primary);
  font: inherit;
  font-size: .94rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.login-input input::placeholder { color: rgba(100, 116, 139, .75); }
.login-input input:hover { border-color: rgba(148, 163, 184, .26); }
.login-input input:focus {
  border-color: rgba(139, 148, 250, .8);
  background: rgba(2, 6, 23, .75);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .3);
}
.login-input:focus-within .icon { color: #a5b4fc; }
.login-input input[type="password"] { padding-right: 44px; }

/* Chrome autofill koyu temayi eziyordu - kutunun ici zorla koyu kalsin. */
.login-input input:-webkit-autofill,
.login-input input:-webkit-autofill:hover,
.login-input input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f1f5f9;
  -webkit-box-shadow: 0 0 0 1000px #0b1120 inset;
  box-shadow: 0 0 0 1000px #0b1120 inset;
  caret-color: #f1f5f9;
  transition: background-color 9999s ease-in-out 0s;
}
.login-input input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0b1120 inset, 0 0 0 3px rgba(99, 102, 241, .3);
  box-shadow: 0 0 0 1000px #0b1120 inset, 0 0 0 3px rgba(99, 102, 241, .3);
}

/* parola goster / gizle */
.login-eye {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease;
}
.login-eye:hover { color: var(--text-primary); background: rgba(148, 163, 184, .12); }
.login-eye:focus-visible { outline: 2px solid rgba(129, 140, 248, .7); outline-offset: 1px; }
.login-eye .eye-off { display: none; }
.login-eye.on .eye-on  { display: none; }
.login-eye.on .eye-off { display: block; }

.login-caps {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 8px 0 0;
  font-size: .76rem;
  color: #fcd34d;
}
.login-caps[hidden] { display: none; }

/* --- Buton -------------------------------------------------------------- */

.login-btn {
  width: 100%;
  height: 46px;
  margin-top: 22px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  box-shadow: 0 12px 28px -12px rgba(99, 102, 241, .9);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow: 0 18px 34px -12px rgba(99, 102, 241, 1);
}
.login-btn:active { transform: translateY(0); filter: brightness(.96); }
.login-btn:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.login-btn[disabled] { cursor: progress; opacity: .78; transform: none; }
.login-btn .spin {
  display: none;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .7s linear infinite;
}
.login-btn[disabled] .spin { display: inline-block; }
@keyframes login-spin { to { transform: rotate(360deg); } }

/* --- Alt bilgi ---------------------------------------------------------- */

.login-foot {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .1);
  font-size: .76rem;
  color: var(--text-muted);
}
.login-foot.warn { color: #fbbf24; }
.login-foot svg { flex: none; }
.login-foot a { color: inherit; }

/* --- Duyarli / erisilebilirlik ------------------------------------------ */

@media (max-width: 420px) {
  .login-body { padding: 16px; }
  .login-card { padding: 28px 22px 22px; border-radius: 18px; }
  .login-head { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-aura::before,
  .login-aura::after,
  .login-card,
  .login-card.shake,
  .login-btn .spin { animation: none !important; }
  .login-btn:hover { transform: none; }
}
