/* ══════════════════════════════════════════════════════════════
   ANTI-AI-UI AUTH MODAL (GİRİŞ YAP & KAYIT OL) & USER PROFILE
   ══════════════════════════════════════════════════════════════ */

/* Auth Modal Backdrop & Container */
.auth-modal-backdrop,
.user-menu-wrap {
  --auth-surface: #FFFFFF;
  --auth-surface-raised: #F7F8F9;
  --auth-surface-hover: #EFF1F3;
  --auth-text: #15181C;
  --auth-text-muted: #596270;
  --auth-placeholder: #7A8491;
  --auth-border: #D3D8DE;
  --auth-border-soft: #E4E7EA;
  --auth-shadow: 0 24px 60px rgba(15, 17, 19, 0.22), 0 0 0 1px rgba(15, 17, 19, 0.04);
  --auth-hover: rgba(15, 17, 19, 0.07);
  --auth-danger: #B4233A;
  --auth-danger-bg: #FDECEF;
  --auth-success: #176B49;
  --auth-success-bg: #E8F6EF;
}

[data-theme='dark'] .auth-modal-backdrop,
[data-theme='dark'] .user-menu-wrap,
body.dark-theme .auth-modal-backdrop,
body.dark-theme .user-menu-wrap,
body.theme-dark .auth-modal-backdrop,
body.theme-dark .user-menu-wrap {
  --auth-surface: #14171C;
  --auth-surface-raised: #1C2026;
  --auth-surface-hover: #222730;
  --auth-text: #E2E6ED;
  --auth-text-muted: #A4ACB8;
  --auth-placeholder: #737D8B;
  --auth-border: rgba(255, 255, 255, 0.12);
  --auth-border-soft: rgba(255, 255, 255, 0.08);
  --auth-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --auth-hover: rgba(255, 255, 255, 0.08);
  --auth-danger: #FF7675;
  --auth-danger-bg: rgba(235, 59, 90, 0.12);
  --auth-success: #55D89A;
  --auth-success-bg: rgba(46, 158, 107, 0.12);
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  background: var(--auth-surface);
  color: var(--auth-text);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--auth-shadow);
  transform: scale(0.95);
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow: hidden;
  position: relative;
}

.auth-modal-backdrop.is-open .auth-modal {
  transform: scale(1);
}

/* Modal Header & Tabs */
.auth-modal__header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--auth-border-soft);
}

.auth-modal__tabs {
  display: flex;
  gap: 8px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--auth-text-muted);
  font-size: 15px;
  font-weight: 700;
  padding: 10px 14px 14px;
  position: relative;
  cursor: pointer;
  transition: color 0.18s ease;
}

.auth-tab-btn:hover {
  color: var(--auth-text);
}

.auth-tab-btn.is-active {
  color: var(--auth-text);
}

.auth-tab-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #E4941B; /* Komparent Amber */
  border-radius: 2px;
}

.auth-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--auth-surface-raised);
  border: 1px solid var(--auth-border);
  color: var(--auth-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.16s ease;
}

.auth-modal__close:hover {
  background: var(--auth-surface-hover);
  color: var(--auth-text);
}

.auth-tab-btn:focus-visible,
.auth-modal__close:focus-visible,
.auth-submit-btn:focus-visible,
.user-dropdown-item:focus-visible,
.navbtn--user-logged:focus-visible {
  outline: 3px solid rgba(228, 148, 27, 0.35);
  outline-offset: 2px;
}

/* Modal Body & Forms */
.auth-modal__body {
  padding: 24px;
}

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

.auth-form.is-active {
  display: flex;
}

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

.auth-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--auth-text-muted);
}

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

.auth-input {
  width: 100%;
  height: 44px;
  background: var(--auth-surface-raised);
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--auth-text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-input:focus {
  outline: none;
  border-color: #E4941B;
  background: var(--auth-surface-hover);
  box-shadow: 0 0 0 3px rgba(228, 148, 27, 0.18);
}

.auth-input::placeholder {
  color: var(--auth-placeholder);
}

/* Error/Success Banner */
.auth-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 8px;
}

.auth-alert.is-error {
  display: flex;
  background: var(--auth-danger-bg);
  border: 1px solid rgba(180, 35, 58, 0.35);
  color: var(--auth-danger);
}

.auth-alert.is-success {
  display: flex;
  background: var(--auth-success-bg);
  border: 1px solid rgba(23, 107, 73, 0.35);
  color: var(--auth-success);
}

/* Checkbox & Forgot row */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--auth-text-muted);
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input {
  accent-color: #E4941B;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.auth-link {
  color: #E4941B;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

button.auth-link {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.auth-link:hover {
  text-decoration: underline;
  color: #FFAA2C;
}

/* Submit Button */
.auth-submit-btn {
  height: 46px;
  background: #E4941B;
  color: #14171C;
  border: none;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
  margin-top: 4px;
}

.auth-submit-btn:hover {
  background: #FF9F1C;
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* User Profile Nav Dropdown in Topbar */
.user-menu-wrap {
  position: relative;
  display: inline-flex;
}

.navbtn--user-logged {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--auth-surface) !important;
  color: var(--auth-text) !important;
  border: 1px solid var(--auth-border) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.18s ease;
}

.navbtn--user-logged:hover {
  border-color: #E4941B !important;
  background: var(--auth-surface-raised) !important;
}

.user-avatar-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #E4941B;
  color: #14171C;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--auth-shadow);
  display: none;
  flex-direction: column;
  z-index: 1000;
}

.user-dropdown.is-open {
  display: flex;
}

.user-dropdown-item {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--auth-text-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, color 0.15s ease;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.user-dropdown-item:hover {
  background: var(--auth-hover);
  color: var(--auth-text);
}

.user-dropdown-item.is-danger:hover {
  background: var(--auth-danger-bg);
  color: var(--auth-danger);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--auth-border-soft);
  margin: 4px 0;
}

.user-dropdown__identity {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--auth-border-soft);
  color: var(--auth-text-muted);
  font-size: 12px;
}

.user-dropdown__email {
  font-size: 11px;
  opacity: 0.85;
}
