/* Denfe CRM - Login (scoped) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.login-body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2847 0%, #1a4d7c 45%, #2d7bc4 100%);
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  top: -200px;
  right: -200px;
  animation: login-float 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes login-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 30px); }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 36px 32px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
  animation: login-slide 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes login-slide {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.login-logo {
  display: block;
  width: 110px;
  height: auto;
  max-height: 56px;
  margin: 0 auto 24px;
  object-fit: contain;
}

.login-title {
  text-align: center;
  margin-bottom: 28px;
}

.login-title h1 {
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f2847;
  margin: 0 0 6px;
  line-height: 1.3;
}

.login-title p {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Form */
.login-form {
  margin: 0;
  padding: 0;
  width: 100%;
}

.login-form .form-group {
  margin: 0 0 18px;
  padding: 0;
  width: 100%;
}

.login-form .form-label {
  display: block;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
  line-height: 1.2;
}

.login-form .input-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.login-form .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
}

.login-form .input-icon .denfe-icon {
  display: block;
}

.login-form .form-control {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 14px 44px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-form .form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.login-form .form-control:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.login-form .form-control:focus {
  border-color: #1e5a96;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(30, 90, 150, 0.12);
}

/* Şifre alanı: sağda göz ikonu için ekstra padding */
.login-form .input-wrap--password .form-control {
  padding-right: 48px;
}

.login-form .password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  z-index: 3;
  transition: color 0.2s ease, background 0.2s ease;
}

.login-form .password-toggle:hover {
  color: #1e5a96;
  background: rgba(30, 90, 150, 0.06);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 4px 0 22px;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
}

.login-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  color: #475569;
  font-weight: 500;
  user-select: none;
}

.login-options input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1e5a96;
  cursor: pointer;
}

.btn-login {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #1e5a96 0%, #2d7bc4 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-login__icon {
  display: flex;
  align-items: center;
  line-height: 0;
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(30, 90, 150, 0.35);
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-demo-hint {
  margin: 20px 0 0;
  padding: 12px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #0369a1;
  text-align: center;
  line-height: 1.5;
}

.login-demo-hint code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 4px;
  color: #0c4a6e;
}

.login-footer {
  text-align: center;
  margin: 20px 0 0;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  color: #94a3b8;
}

.login-error {
  display: none;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

.login-error.show {
  display: block;
  animation: login-shake 0.4s ease;
}

@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 480px) {
  .login-page {
    padding: 16px;
    align-items: flex-start;
    padding-top: max(16px, env(safe-area-inset-top));
  }

  .login-card {
    padding: 32px 24px 28px;
    border-radius: 16px;
  }

  .login-title h1 {
    font-size: 20px;
  }
}
