/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background-image: url('/images/efaturalogin.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #081033;
  background-attachment: fixed;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ===== Wrapper ===== */
.login-wrapper {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  margin-right: 4%;
}

/* ===== Card ===== */
.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 40px 36px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

/* ===== Logo ===== */
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.login-logo img {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.2));
}

/* ===== Divider ===== */
.login-divider {
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  border-radius: 2px;
  margin: 0 auto 20px;
}

/* ===== Titles ===== */
.login-title {
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 5px;
  letter-spacing: -0.4px;
}

.login-subtitle {
  color: #94a3b8;
  font-size: 0.82rem;
  text-align: center;
  margin: 0 0 28px;
  font-weight: 400;
}

/* ===== Alert ===== */
.login-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.82rem;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  text-align: center;
}

/* ===== Form Groups ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 7px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===== Input Wrapper ===== */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 13px;
  color: #c0ccd8;
  display: flex;
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrapper:focus-within .input-icon {
  color: #2563eb;
}

.input-wrapper input {
  width: 100%;
  padding: 11px 42px 11px 42px;
  background: #f8fafc;
  border: 1.5px solid #e8eef4;
  border-radius: 10px;
  color: #0f172a;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.input-wrapper input::placeholder {
  color: #c0ccd8;
  font-size: 0.875rem;
}

.input-wrapper input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== Toggle Password ===== */
.toggle-password {
  position: absolute;
  right: 11px;
  background: none;
  border: none;
  color: #c0ccd8;
  cursor: pointer;
  display: flex;
  padding: 4px;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #64748b;
}

/* ===== Field Error ===== */
/* Field errors hidden until form is submitted (client) or server-side validation requested */
.field-error {
  display: none;
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 4px;
  padding-left: 2px;
}

/* Üst özet mesajını göster */
.login-alert {
  display: block;
}

/* Alan bazlı hata mesajlarını göster */
.field-error {
  display: block;
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 4px;
  padding-left: 2px;
}

/* Hatalı input için kırmızı kenarlık */
.submitted .field-error,
.submitted .input-wrapper input[aria-invalid="true"],
.submitted .input-wrapper input.input-validation-error {
  display: block;
}

.submitted .input-wrapper input[aria-invalid="true"],
.submitted .input-wrapper input.input-validation-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.06) !important;
}

/* ===== Form Options (beni hatırla + şifremi unuttum) ===== */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  margin-bottom: 4px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 0.825rem;
  color: #64748b !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin-bottom: 0 !important;
}

.remember-me input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  cursor: pointer;
  border-radius: 4px;
}

.forgot-link {
  font-size: 0.825rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #1d4ed8;
}

.forgot-link--disabled {
  color: #c0ccd8;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Submit Button ===== */
.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.925rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.15px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.38);
}

.btn-login:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* ===== Footer ===== */
.login-footer {
  color: #c0ccd8;
  font-size: 0.7rem;
  text-align: center;
  margin: 24px 0 0;
  letter-spacing: 0.1px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  body {
    justify-content: center;
  }
  .login-wrapper {
    width: 100%;
    margin-right: 0;
    padding: 20px 16px;
  }
  .login-card {
    padding: 32px 22px 26px;
  }
}
