/* ==========================================================================
   Arı CRM — Kurumsal Giriş (Login) Tasarım Sistemi (Daylight Enterprise)
   ========================================================================== */

.login-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
  background-color: #f8fafc;
  background-image: radial-gradient(#cbd5e1 0.85px, transparent 0.85px);
  background-size: 24px 24px;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 36px 32px 28px;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.04),
    0 12px 32px -8px rgba(15, 23, 42, 0.07);
  box-sizing: border-box;
}

.login-header {
  text-align: left;
  margin-bottom: 24px;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.login-brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.login-brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1;
}

.login-brand-name b {
  color: #0d0d0d;
  background: #ffd400;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
}

.login-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.login-title b {
  color: #0f172a;
  font-weight: 700;
}

.login-subtitle {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-forgot-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-forgot-link:hover {
  color: #0f172a;
  text-decoration: underline;
}

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

.login-input {
  width: 100%;
  height: 42px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 13px;
  color: #0f172a;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.login-input::placeholder {
  color: #94a3b8;
}

.login-input:hover {
  border-color: #94a3b8;
}

.login-input:focus {
  outline: none;
  border-color: #0d0d0d;
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.45);
  background: #ffffff;
}

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 5000s ease-in-out 0s;
}

.login-input-pw {
  padding-right: 40px;
}

.login-toggle-pw {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.login-toggle-pw:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.login-toggle-pw svg {
  width: 17px;
  height: 17px;
}

.login-btn {
  height: 42px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.login-btn:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.login-btn:active {
  background: #0f172a;
}

.login-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.2);
}

.login-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-err {
  font-size: 13px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 8px;
  display: none;
  line-height: 1.45;
}

.login-err.show {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 2FA Kutusu */
.login-2fa-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.login-2fa-box h4 {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.login-2fa-box p {
  margin: 0;
  font-size: 12.5px;
  color: #475569;
}

.login-totp-input {
  letter-spacing: 0.35em;
  font-size: 19px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 0 14px !important;
}

.login-2fa-back {
  background: none;
  border: none;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px;
  text-decoration: none;
  margin-top: 2px;
  transition: color 0.15s ease;
}

.login-2fa-back:hover {
  color: #0f172a;
  text-decoration: underline;
}

/* Footer Bilgileri */
.login-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-copyright {
  font-size: 12px;
  color: #64748b;
}

/* Zorunlu şifre yenileme: canlı kural listesi */
.pw-rules {
  list-style: none;
  margin: 10px 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: #475569;
}

.pw-rules li {
  position: relative;
  padding-left: 22px;
  transition: color 0.15s ease;
}

.pw-rules li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pw-rules li.ok {
  color: #15803d;
}

.pw-rules li.ok::before {
  border-color: #16a34a;
  background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 9px no-repeat;
}

#fp-logout {
  display: block;
  margin: 10px auto 0;
}

/* Hesap aç bağlantısı (platform giriş sayfası) */
.signup-cta {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 13px;
  color: #475569;
}

.signup-cta .login-2fa-back {
  display: inline-block;
  margin-left: 4px;
  font-weight: 700;
  color: #0d0d0d;
  text-decoration: underline;
  text-decoration-color: #ffd400;
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

.signup-cta .login-2fa-back:hover {
  color: #0d0d0d;
  background: #ffd400;
}

/* Google / Apple ile giriş */
.social-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
  color: #64748b;
  font-size: 12px;
}

.social-sep::before,
.social-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.social-btn {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.social-btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.social-btn.google {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.social-btn.google:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.social-btn.apple {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
}

.social-btn.apple:hover {
  background: #1e293b;
}

.social-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

/* iOS Safari & Mobil Uyumluluk Kalkanı */
@media (max-width: 768px) {
  .login-input {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px 22px;
    border-radius: 12px;
  }
  .login-title {
    font-size: 19px;
  }
  .login-subtitle {
    font-size: 13px;
  }
}

/* Cloudflare Turnstile kutusu: anahtar tanımlı değilse boş kalır ve yer kaplamaz */
.ts-box:not(:empty) {
  margin-top: 14px;
  min-height: 65px;
}
