/* Login — modern centered layout (light theme) */

:root {
  --auth-bg: #f4f7fb;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-border: rgba(15, 23, 42, 0.08);
  --auth-card: #ffffff;
  --auth-accent: #0891b2;
  --auth-accent2: #7c3aed;
  --auth-radius: 1.35rem;
  --auth-font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--auth-font);
  font-feature-settings: "ss01" on, "cv11" on;
  color: var(--auth-text);
  background: var(--auth-bg);
  overflow-x: hidden;
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
}

/* ── Ambient background (soft & bright) ── */
.auth-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(56, 189, 248, 0.16), transparent 52%),
    radial-gradient(ellipse 55% 42% at 95% 15%, rgba(167, 139, 250, 0.1), transparent 50%),
    radial-gradient(ellipse 45% 38% at 5% 95%, rgba(45, 212, 191, 0.08), transparent 48%),
    linear-gradient(180deg, #fafcff 0%, #f1f5f9 45%, #eef2f7 100%);
  animation: auth-mesh-shift 18s ease-in-out infinite alternate;
}

@keyframes auth-mesh-shift {
  0% {
    filter: hue-rotate(-4deg) saturate(1.02);
    transform: scale(1);
  }
  100% {
    filter: hue-rotate(6deg) saturate(1.06);
    transform: scale(1.015);
  }
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(88px);
  opacity: 0.42;
  animation: auth-float 14s ease-in-out infinite;
}

.auth-orb--a {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  top: -18%;
  left: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, transparent 72%);
  animation: auth-float-center 16s ease-in-out infinite;
}

@keyframes auth-float-center {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-12px);
  }
}

.auth-orb--b {
  width: 300px;
  height: 300px;
  bottom: 8%;
  right: -8%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.28) 0%, transparent 72%);
  animation-delay: -4s;
}

.auth-orb--c {
  width: 220px;
  height: 220px;
  bottom: 22%;
  left: 3%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.2) 0%, transparent 72%);
  animation-delay: -7s;
}

@keyframes auth-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(10px, -14px) scale(1.04);
  }
}

.auth-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.022;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Card shell ── */
.auth-center {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.auth-card {
  position: relative;
  border-radius: calc(var(--auth-radius) + 4px);
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(226, 232, 240, 0.65) 45%,
    rgba(203, 213, 225, 0.45) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 24px 56px -16px rgba(15, 23, 42, 0.1),
    0 12px 24px -12px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

.auth-card-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.12),
    transparent 42%,
    rgba(167, 139, 250, 0.1)
  );
  opacity: 0.85;
  filter: blur(18px);
  z-index: -1;
}

.auth-card-inner {
  border-radius: var(--auth-radius);
  background: var(--auth-card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  padding: clamp(1.75rem, 4vw, 2.25rem);
}

/* ── Header ── */
.auth-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-brand-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.auth-mark-svg {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow:
    0 10px 28px rgba(99, 102, 241, 0.22),
    0 2px 8px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.auth-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #0d9488;
  margin: 0 0 0.5rem;
}

.auth-title {
  font-size: clamp(1.35rem, 3.5vw, 1.6rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 0.4rem;
  color: #0f172a;
}

.auth-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--auth-muted);
  font-weight: 500;
}

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-alert {
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-alert.validation-summary-valid {
  display: none !important;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.auth-label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.auth-input-shell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.95rem;
  min-height: 52px;
  border-radius: 0.9rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input-shell:focus-within {
  background: #ffffff;
  border-color: rgba(8, 145, 178, 0.45);
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.15),
    0 1px 2px rgba(15, 23, 42, 0.05);
}

.auth-input-icon {
  flex-shrink: 0;
  color: #94a3b8;
  display: flex;
}

.auth-input-shell:focus-within .auth-input-icon {
  color: #0891b2;
}

.auth-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
}

.auth-input::placeholder {
  color: #94a3b8;
}

span.auth-field-error {
  font-size: 0.78rem;
  color: #dc2626;
}

/* Remember me */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0.15rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-check-input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  border-radius: 0.3rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  accent-color: #0891b2;
  cursor: pointer;
}

.auth-check-label {
  font-size: 0.86rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  margin: 0;
}

/* Submit */
.auth-submit {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  padding: 0 1.25rem;
  border: none;
  border-radius: 0.95rem;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff !important;
  cursor: pointer;
  background: linear-gradient(105deg, #06b6d4 0%, #6366f1 48%, #a855f7 100%);
  background-size: 120% 100%;
  background-position: 0% 50%;
  box-shadow:
    0 10px 32px rgba(99, 102, 241, 0.28),
    0 4px 12px rgba(8, 145, 178, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.35s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow:
    0 14px 40px rgba(99, 102, 241, 0.35),
    0 6px 16px rgba(8, 145, 178, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit-arrow {
  opacity: 0.95;
  transition: transform 0.2s ease;
}

.auth-submit:hover .auth-submit-arrow {
  transform: translateX(3px);
}

/* Footer */
.auth-foot {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .auth-mesh,
  .auth-orb,
  .auth-submit {
    animation: none !important;
    transition: none !important;
  }
  .auth-mesh {
    animation: none;
  }
}

/* ── Giriş sırasında tam ekran yükleme ── */
.auth-page.auth-page--loading {
  overflow: hidden;
}

.auth-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.38s ease,
    visibility 0.38s ease;
}

.auth-login-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-login-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(241, 245, 249, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: auth-login-backdrop-in 0.45s ease forwards;
}

.auth-login-overlay__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  padding: 2rem 1.75rem 1.85rem;
  text-align: center;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.05),
    0 28px 64px -20px rgba(15, 23, 42, 0.18),
    0 12px 28px -14px rgba(99, 102, 241, 0.15);
  animation: auth-login-panel-in 0.55s cubic-bezier(0.34, 1.25, 0.64, 1) forwards;
}

.auth-login-spinner {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.35rem;
}

.auth-login-spinner__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #06b6d4;
  border-right-color: #6366f1;
  border-bottom-color: rgba(168, 85, 247, 0.35);
  border-left-color: #e2e8f0;
  animation: auth-login-spin 0.88s linear infinite;
}

.auth-login-spinner__glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(6, 182, 212, 0.22),
    rgba(99, 102, 241, 0.28),
    rgba(168, 85, 247, 0.18),
    transparent 55%
  );
  filter: blur(12px);
  opacity: 0.85;
  animation: auth-login-spin 2.4s linear infinite;
  pointer-events: none;
}

.auth-login-overlay__title {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.auth-login-overlay__hint {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: #64748b;
}

.auth-login-dots span {
  display: inline-block;
  width: 0.22em;
  animation: auth-login-dot 1.15s ease-in-out infinite;
  opacity: 0.2;
}

.auth-login-dots span:nth-child(1) {
  animation-delay: 0s;
}
.auth-login-dots span:nth-child(2) {
  animation-delay: 0.18s;
}
.auth-login-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes auth-login-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes auth-login-dot {
  0%,
  100% {
    opacity: 0.15;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes auth-login-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes auth-login-panel-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-login-overlay__backdrop,
  .auth-login-overlay__panel {
    animation: none !important;
  }

  .auth-login-spinner__ring,
  .auth-login-spinner__glow {
    animation: none !important;
  }

  .auth-login-spinner__ring {
    border-right-color: #6366f1;
    border-bottom-color: #a855f7;
  }

  .auth-login-dots span {
    animation: none !important;
    opacity: 0.75;
  }
}
