:root {
  color-scheme: light;
  --auth-primary: #2563eb;
  --auth-primary-dark: #1d4ed8;
  --auth-muted: #64748b;
}

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

html,
body {
  height: 100%;
}

body.auth-body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.35), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.25), transparent 60%),
    #0b1020;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-backdrop .light {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.7;
}

.auth-backdrop .light-1 {
  width: 420px;
  height: 420px;
  background: rgba(59, 130, 246, 0.55);
  top: -140px;
  right: -120px;
}

.auth-backdrop .light-2 {
  width: 360px;
  height: 360px;
  background: rgba(14, 165, 233, 0.45);
  bottom: -120px;
  left: -100px;
}

.auth-backdrop .light-3 {
  width: 280px;
  height: 280px;
  background: rgba(236, 72, 153, 0.35);
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 960px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.2));
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  isolation: isolate;
  z-index: 1;
}

.brand-panel {
  position: relative;
  padding: 3rem 2.5rem 2rem;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.65));
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 1.25rem;
}

.brand-logo {
  width: 220px;
  height: auto;
  object-fit: contain;
  max-width: 100%;
}


.brand-panel h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw + 0.8rem, 2.2rem);
  font-weight: 600;
}

.brand-panel p {
  margin: 0;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.6;
  max-width: 28rem;
}

.brand-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.brand-highlights li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.9);
}

.brand-highlights li::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: 0.4rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.65);
}

.form-panel {
  background: rgba(255, 255, 255, 0.85);
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.form-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 3.5rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.form-header {
  margin-bottom: 2rem;
}

.form-title {
  font-size: 1.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.form-subtitle {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.validation-summary {
  background: transparent;
  border: none;
  color: #b91c1c;
  border-radius: 0;
  padding: 0;
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.validation-summary:empty {
  display: none;
}

.form-floating > label {
  color: var(--auth-muted);
}

.form-floating > .form-control {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 1.05rem 1rem;
  height: auto;
  min-height: 3.5rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.form-floating > .form-control:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.form-floating.password-field .form-control {
  padding-right: 5.2rem;
}

.form-floating.password-field .form-control:focus + label {
  color: var(--auth-primary);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  border: 0;
  background: rgba(37, 99, 235, 0.08);
  color: var(--auth-primary);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-password:hover,
.toggle-password:focus-visible {
  background: rgba(37, 99, 235, 0.18);
  outline: none;
}

.toggle-password.is-active {
  background: var(--auth-primary);
  color: #ffffff;
}

.validation-message {
  display: block;
  margin-top: -0.65rem;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  color: #b91c1c;
  min-height: 1.2rem;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.form-actions .btn-primary {
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
  border: none;
  border-radius: 16px;
  padding: 0.95rem 1.2rem;
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-actions .btn-primary:hover,
.form-actions .btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(37, 99, 235, 0.45);
}

.form-help {
  margin: 0;
  font-size: 0.9rem;
  color: var(--auth-muted);
  text-align: center;
}

.form-help-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: center;
}

.form-help-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--auth-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.form-help-link:hover,
.form-help-link:focus-visible {
  color: var(--auth-primary-dark);
  text-decoration: underline;
  outline: none;
}

.form-help a {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
}

.form-help a:hover {
  text-decoration: underline;
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

.form-row.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field .validation-message {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.copyright {
  margin: 2.5rem 0 0;
  color: rgba(15, 23, 42, 0.55);
  font-size: 0.85rem;
  text-align: center;
}

.field-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.45rem;
}

.phone-field .iti {
  width: 100%;
}

.phone-field {
  position: relative;
}

.phone-field .iti {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  overflow: visible;
}

.phone-field .form-control {
  border: none;
  border-radius: 0;
  padding: 0.9rem 1rem 0.9rem 4.4rem;
  box-shadow: none;
}

.phone-field .form-control:focus {
  border: none;
  box-shadow: none;
}

.phone-field .iti__flag-container {
  padding: 0;
  border-right: 1px solid #e2e8f0;
  background: #f7f8fb;
}

.phone-field .iti--separate-dial-code .iti__selected-flag {
  border-radius: 0;
  padding: 0.55rem 0.7rem;
  min-width: 3.7rem;
}

.phone-field .iti--separate-dial-code .iti__selected-dial-code {
  font-weight: 600;
  color: #0f172a;
  margin-left: 0.25rem;
}

.phone-field .iti__selected-flag .iti__arrow {
  margin-left: 0.35rem;
  border-top-color: #4b5563;
}

.phone-field .iti__country-list {
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
  border-radius: 16px;
}

.phone-field .iti__country-list::-webkit-scrollbar {
  width: 8px;
}

.phone-field .iti__country-list::-webkit-scrollbar-thumb {
  background-color: rgba(15, 23, 42, 0.2);
  border-radius: 999px;
}

@media (max-width: 1024px) {
  body.auth-body {
    padding: 1.5rem 0.75rem !important;
    align-items: flex-start !important;
    padding-top: 1.5rem !important;
  }

  .auth-container {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px !important;
    margin: 0 !important;
  }

  .brand-panel {
    padding: 2rem 1.5rem !important;
    min-height: auto !important;
  }

  .brand-logo {
    width: 180px !important;
    max-width: 100% !important;
  }

  .brand-panel h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
  }

  .brand-panel p {
    font-size: clamp(0.85rem, 2vw, 1rem) !important;
  }

  .form-panel {
    padding: 2.5rem 1.5rem !important;
    min-height: auto !important;
  }

  .form-wrapper {
    padding: 2.5rem 1.75rem !important;
    max-width: 100% !important;
  }

  .form-title {
    font-size: clamp(1.3rem, 4vw, 1.6rem) !important;
  }

  .form-subtitle {
    font-size: clamp(0.85rem, 2vw, 0.9rem) !important;
  }

  .form-row.two-columns {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  body.auth-body {
    padding: 0.75rem !important;
    align-items: flex-start !important;
    padding-top: 1rem !important;
  }

  .auth-container {
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .brand-panel {
    padding: 1.25rem 0.75rem !important;
    display: flex !important;
  }

  .brand-logo {
    width: 150px !important;
    max-width: 80% !important;
    margin-bottom: 0.75rem !important;
  }

  .brand-panel h2 {
    font-size: clamp(1.1rem, 5vw, 1.4rem) !important;
    margin-bottom: 0.5rem !important;
  }

  .brand-panel p {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem) !important;
    max-width: 100% !important;
    line-height: 1.5 !important;
  }

  .brand-highlights {
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
  }

  .brand-highlights li {
    font-size: clamp(0.75rem, 2vw, 0.85rem) !important;
    padding-left: 1rem !important;
  }

  .form-panel {
    padding: 1.75rem 0.75rem !important;
  }

  .form-wrapper {
    padding: 2rem 1.25rem !important;
    border-radius: 12px !important;
    max-width: 100% !important;
  }

  .form-title {
    font-size: clamp(1.4rem, 5vw, 1.6rem) !important;
    margin-bottom: 0.75rem !important;
  }

  .form-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 0.95rem) !important;
  }

  .form-floating > .form-control {
    padding: 1rem 0.85rem !important;
    min-height: 3.25rem !important;
    font-size: 16px !important; /* iOS zoom önleme */
    border-radius: 12px !important;
  }

  .form-floating > label {
    font-size: 0.95rem !important;
    padding: 1rem 0.85rem !important;
  }

  .form-actions {
    gap: 1.25rem !important;
    margin-top: 1.75rem !important;
  }

  .form-actions .btn-primary {
    padding: 1rem 1.25rem !important;
    font-size: clamp(1rem, 3.5vw, 1.05rem) !important;
    border-radius: 12px !important;
  }

  .toggle-password {
    right: 0.5rem !important;
    padding: 0.25rem 0.6rem !important;
    font-size: 0.75rem !important;
  }

  .form-help-links {
    gap: 0.3rem !important;
  }

  .form-help-link {
    font-size: clamp(0.8rem, 2.5vw, 0.85rem) !important;
  }

  .form-help {
    font-size: clamp(0.75rem, 2vw, 0.8rem) !important;
    margin-top: 0.5rem !important;
  }

  .copyright {
    margin-top: 1rem !important;
    font-size: clamp(0.7rem, 2vw, 0.75rem) !important;
  }

  .validation-message {
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  body.auth-body {
    padding: 0.5rem !important;
    padding-top: 0.75rem !important;
  }

  .auth-container {
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .brand-panel {
    padding: 1rem 0.5rem !important;
    gap: 0.75rem !important;
  }

  .brand-logo {
    width: 120px !important;
    max-width: 70% !important;
    margin-bottom: 0.5rem !important;
  }

  .brand-panel h2 {
    font-size: 1rem !important;
  }

  .brand-panel p {
    font-size: 0.75rem !important;
  }

  .brand-highlights li {
    font-size: 0.7rem !important;
    padding-left: 0.9rem !important;
  }

  .form-panel {
    padding: 1.75rem 0.5rem !important;
  }

  .form-wrapper {
    padding: 1.75rem 0.75rem !important;
    border-radius: 10px !important;
  }

  .form-title {
    font-size: 1.3rem !important;
    margin-bottom: 0.6rem !important;
  }

  .form-subtitle {
    font-size: 0.85rem !important;
  }

  .form-header {
    margin-bottom: 1.25rem !important;
  }

  .form-floating > .form-control {
    padding: 0.9rem 0.75rem !important;
    min-height: 3rem !important;
    font-size: 16px !important;
  }

  .form-floating > label {
    font-size: 0.9rem !important;
    padding: 0.9rem 0.75rem !important;
  }

  .form-actions .btn-primary {
    padding: 0.9rem 1.1rem !important;
    font-size: 0.95rem !important;
  }

  .toggle-password {
    right: 0.4rem !important;
    padding: 0.2rem 0.5rem !important;
    font-size: 0.7rem !important;
  }

  .form-help-link {
    font-size: 0.75rem !important;
  }

  .form-help {
    font-size: 0.7rem !important;
  }

  .copyright {
    font-size: 0.65rem !important;
    margin-top: 0.75rem !important;
  }
}