/* ===== Genel Sayfa Yapısı ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f3f4f6;
  color: #0f172a;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #0f172a;

  /* Fallback renk */
  background-color: #f3f4f6;

  /* Arkaplan görseli */
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.35)),
    url("https://static.denizkariyer.cloud/img/ent-login-bg.webp");

  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed; /* mobilde sıkıntı çıkarırsa kaldır */
}

/* Sayfayı ortalama */
.page-wrapper {
  min-height: 100vh;
  padding: 32px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Kart (Banka Login Tarzı) ===== */
.login-card {
  display: flex;
  flex-direction: row;
  max-width: 1040px;
  width: 100%;
  border-radius: 8px;
  padding: 1px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
}

/* İç panel */
.login-left,
.login-right {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

/* Sol panel (promo) */
.login-left {
  flex: 0 0 38%;
  padding: 32px 32px 40px;
  color: #e5f3ff;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.4);
}

.left-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.left-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 18px 0 10px;
}

.left-content p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.9);
}

.ship-icon {
  height: 29px;
  filter: brightness(0) invert(1) !important;
}

input {
  padding: 14px;
}

h1 {
  color: #fff;
}

.check::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 9px;
  border: solid #1e3a8a00;
  border-width: 0 2px 2px 0;
  left: 6px;
  top: 3px;
  transform: rotate(46deg);
}

/* Sağ panel (form) */
.login-right {
  flex: 1;
  padding: 32px 40px 40px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
}

.login-form {
  margin-left: auto;
}

.btn.btn--login {
  margin: 16px auto 0;
  width: auto;
  display: flex !important;
}

.login-form .title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 4px 0 4px;
  color: #1e3a8a;
}

.login-form > p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: #6b7280;
}

/* Şifre göster ikonu */
.eye-icon {
  pointer-events: auto;
}

/* ===== Form alt seçenekler ===== */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 6px;
  font-size: 0.85rem;
}

/* Şifremi Unuttum */
/* Şifremi Unuttum – sade */
.form-options a[href="/sifremi-unuttum"] {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 10px;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.form-options a[href="/sifremi-unuttum"]:hover {
  color: #1d4ed8;
  text-underline-offset: 3px;
}

.form-options a[href="/sifremi-unuttum"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Butonlar ===== */
.btn {
  border: none;
  cursor: pointer;
}

.btn.btn--login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-transform: none;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.45);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.btn.btn--login:hover {
  filter: brightness(1.05);
  box-shadow: 0 20px 55px rgba(30, 64, 175, 0.55);
  transform: translateY(-1px);
}

.btn.btn--login:active {
  transform: translateY(0);
  box-shadow: 0 12px 30px rgba(30, 64, 175, 0.4);
}

/* Kayıt linki */
.register {
  margin-top: 14px;
  font-size: 0.9rem;
  color: #6b7280;
}

.register a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.register a:hover {
  text-decoration: underline;
}

/* ===== Responsive ===== */

/* Orta cihazlar */
@media (max-width: 992px) {
  .login-card {
    max-width: 720px;
  }
}

/* Mobil & küçük tabletler */
@media (max-width: 768px) {
  .page-wrapper {
    padding: 16px;
  }

  .login-card {
    flex-direction: column-reverse;
    border-radius: 22px;
  }

  .login-right {
    border-radius: 20px 20px 18px 18px;
    padding: 24px 18px 26px;
  }

  .login-left {
    display: none;
    /* Mobilde sadece form kalsın, daha “banka uygulaması” hissi */
  }

  .login-form {
    max-width: 100%;
    margin: 0;
  }
}

/* Çok küçük ekranlar */
@media (max-width: 480px) {
  .float-field fieldset {
    padding-left: 40px;
    padding-right: 40px;
  }

  .float-field .placeholder {
    left: 40px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

.float-field {
  position: relative;
  width: 100%;
}

fieldset {
  border: 0.1rem solid var(--border-color);
  border-radius: 8px;
  padding: 20px 5px;
  transition: border-color 0.25s;
  position: relative;
}

.dropdown-box fieldset input {
  transition:
    background 0.3s ease,
    padding-left 0.3s ease,
    filter 0.3s ease,
    color 0.3s ease;
}

.dropdown-box fieldset input:focus {
  background: url("https://static.denizkariyer.cloud/img/search2.svg") no-repeat
    10px center;
  background-size: 16px;
  padding-left: 30px;
}

:root {
  --border-color: #cbd5e1;
  --active-color: #0096c7;
  --success-color: #28dc4c;
}

.form-group {
  margin-bottom: 0.5rem;
}

fieldset:hover {
  box-shadow: 0 5px 5px -1px rgb(0 0 0 / 8%);
}

.float-field:has(input:focus) fieldset {
  border-width: 0.1rem;
  border-color: var(--active-color) !important;
}

.float-field.active fieldset {
  border-color: #4ad6084f;
  border-width: 0.1rem;
}

input {
  width: 100%;
  font-size: 0.875rem;
  border: none;
  background: transparent;
  outline: none;
  position: absolute;
  left: 0;
  top: -8px;
}

.numInputWrapper input {
  position: static;
}

textarea {
  width: 100%;
  font-size: 0.875rem;
  border: none;
  background: transparent;
  outline: none;
  left: 0;
  top: -20px;
  position: relative;
}

legend {
  padding: 0;
  font-size: 12px;
  color: #a3a3a3;
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  transform: translateX(5px);
  transition: max-width 0.25s ease;
  display: flex;
  align-items: center;
  z-index: 1;
  position: relative;
}

.float-field.active legend {
  max-width: 200px;
  padding-right: 15px;
  z-index: 9;
  color: #1e3a8a;
  font-weight: 700;
}

.placeholder {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 12px;
  color: #999;
  pointer-events: none;
  transition: 0.25s;
  display: flex;
}

.float-field.active .placeholder {
  opacity: 0;
  transform: translateY(-35%);
}

.input-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  pointer-events: none;
  filter: invert(45%) sepia(90%) saturate(400%) hue-rotate(150deg);
  margin-right: 4px;
}

input:focus {
  box-shadow: none;
}

.edit-email {
  background: linear-gradient(to right, #0096c7, #63bdf1);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: -2px;
  top: -24%;
  padding: 17px;
  border-radius: 0px 8px 8px 0px;
}

.edit-email img {
  width: 16px;
  height: 16px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.edit-email:hover img {
  transform: scale(1.2);
  opacity: 0.8;
}
.btn.btn--login[disabled],
.btn.btn--login.btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ===========================
   Password eye-toggle FIX
   (Mevcut absolute input yapısını bozmadan)
=========================== */

/* Fieldset katmanlarını netleştir */
.float-field fieldset {
  position: relative; /* zaten var ama garanti */
}

/* Input aynı kalsın, sadece katmanını düşür ve sağdan boşluk bırak */
.float-field input {
  z-index: 1; /* eye-toggle üstte kalsın */
}

/* Sadece password input: ikon üstüne yazmayı engelle */
#password {
  padding-right: 48px; /* sağda ikon için alan */
}

/* Toggle butonu: her şeyin üstünde ve tıklanabilir */
.eye-toggle {
  position: absolute;
  right: 10px;
  top: 44%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #1e3a8a;
  z-index: 10; /* kritik: input’u ezer */
  pointer-events: auto; /* kritik */
}

/* SVG görünürlüğü garanti */
.eye-toggle svg {
  display: block;
}

/* state'e göre ikon göster */
.eye-toggle .eye {
  display: none;
}
.eye-toggle[data-state="off"] .eye-off {
  display: inline-flex;
}
.eye-toggle[data-state="on"] .eye-on {
  display: inline-flex;
}
/* ===========================
   Password eye-toggle FIX
   (Mevcut absolute input yapısını bozmadan)
=========================== */

/* Fieldset katmanlarını netleştir */
.float-field fieldset {
  position: relative; /* zaten var ama garanti */
}

/* Input aynı kalsın, sadece katmanını düşür ve sağdan boşluk bırak */
.float-field input {
  z-index: 1; /* eye-toggle üstte kalsın */
}

/* Sadece password input: ikon üstüne yazmayı engelle */
#password {
  padding-right: 48px; /* sağda ikon için alan */
}

/* Toggle butonu: her şeyin üstünde ve tıklanabilir */
.eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;

  z-index: 10; /* kritik: input’u ezer */
  pointer-events: auto; /* kritik */
}

/* SVG görünürlüğü garanti */
.eye-toggle svg {
  display: block;
}

/* state'e göre ikon göster */
.eye-toggle .eye {
  display: none;
}
.eye-toggle[data-state="off"] .eye-off {
  display: inline-flex;
}
.eye-toggle[data-state="on"] .eye-on {
  display: inline-flex;
}

/* ===========================
   Eye toggle soft transition
   (DOM yapısı bozulmaz)
=========================== */

/* Buton hover/focus mikro etkileşim */
.eye-toggle {
  transition:
    transform 160ms ease,
    opacity 160ms ease;
  transform-origin: 50% 50%;
}
.eye-toggle:hover {
  transform: translateY(-50%) scale(1.04);
}
.eye-toggle:active {
  transform: translateY(-50%) scale(0.96);
}
.eye-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  border-radius: 10px;
}

/* İkonlar üst üste + animasyonlu geçiş */
.eye-toggle .eye {
  display: inline-flex; /* senin display:none kuralını override ediyoruz */
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: scale(0.88) rotate(-6deg);
  filter: blur(0.2px);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 220ms ease;
  will-change: opacity, transform, filter;
  pointer-events: none;
}

/* OFF -> eye-off görünür */
.eye-toggle[data-state="off"] .eye-off {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  filter: blur(0);
}

/* ON -> eye-on görünür */
.eye-toggle[data-state="on"] .eye-on {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  filter: blur(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .eye-toggle,
  .eye-toggle .eye {
    transition: none !important;
  }
}

.checkbox input:checked ~ .check {
  background-color: #1e3a8a !important;
  border-color: transparent;
}

.checkbox input:checked ~ .check::after {
  border: solid #fff;
  border-width: 0 2px 2px 0;
}
