/* ---------------- Paylaşılan Modern Uyarı/Onay Penceresi (window.alert/confirm yerine) ---------------- */
.ok-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 36, 25, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ok-modal-overlay.show { display: flex; opacity: 1; }
.ok-modal {
  width: min(380px, 100%);
  background: linear-gradient(165deg, #ffffff, #fbfbf9);
  border: 1px solid var(--ok-border, #e3e8e4);
  border-radius: var(--ok-radius, 14px);
  padding: 26px 24px 20px;
  box-shadow: 0 24px 60px rgba(10, 30, 20, 0.35);
  text-align: center;
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1.3), opacity 0.25s ease;
}
.ok-modal-overlay.show .ok-modal { transform: translateY(0) scale(1); opacity: 1; }
.ok-modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.ok-modal.type-error .ok-modal-icon { background: rgba(192,57,43,0.12); border: 1px solid rgba(192,57,43,0.35); }
.ok-modal.type-info .ok-modal-icon { background: rgba(11,110,79,0.12); border: 1px solid rgba(11,110,79,0.35); }
.ok-modal-title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ok-ink, #1c2b24);
}
.ok-modal-msg {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ok-muted, #6b7d74);
  white-space: pre-line;
}
.ok-modal-buttons {
  display: flex;
  gap: 10px;
}
.ok-modal-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform 0.1s, filter 0.1s;
}
.ok-modal-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ok-modal-cancel {
  background: #eef1ee;
  color: var(--ok-ink, #1c2b24);
  border: 1px solid var(--ok-border, #e3e8e4);
}
.ok-modal-ok {
  background: linear-gradient(160deg, var(--ok-green, #0b6e4f), var(--ok-green-dark, #084d38));
  color: #fff;
  box-shadow: 0 4px 12px rgba(11,110,79,0.35);
}
.ok-modal.type-error .ok-modal-ok {
  background: linear-gradient(160deg, var(--ok-red, #c0392b), #8c2a20);
  box-shadow: 0 4px 12px rgba(192,57,43,0.35);
}

/* ---------------- Puan Çekme Penceresi (modern) ---------------- */
.withdraw-modal {
  width: min(440px, 100%);
  text-align: left;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 22px 20px;
  position: relative;
  background: linear-gradient(165deg, #ffffff, #f7faf7);
}
.wd-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(20,60,42,0.07);
  color: #6a7d70;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.wd-modal-close:hover { background: rgba(20,60,42,0.14); }
.wd-modal-header { text-align: center; margin-bottom: 16px; }
.wd-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: linear-gradient(160deg, rgba(212,165,55,0.22), rgba(212,165,55,0.08));
  border: 1px solid rgba(212,165,55,0.4);
}
.withdraw-modal .ok-modal-title { margin-bottom: 4px; }
.withdraw-modal .ok-modal-msg { margin-bottom: 0; }

/* Kullanıcı profil özeti: değiştirilemez bilgiler artık ayrı ayrı salt-okunur kutular yerine
   tek, kompakt bir kart içinde — avatar + isim + bakiye aynı satırda. */
.wd-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(11,110,79,0.07), rgba(11,110,79,0.02));
  border: 1px solid rgba(11,110,79,0.15);
  margin-bottom: 18px;
}
.wd-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(160deg, #123c2b, #0b2a1e);
  color: #eecf7e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}
.wd-profile-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.wd-profile-name { font-weight: 800; font-size: 13.5px; color: var(--ok-ink, #1c2b24); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-profile-username { font-size: 11px; color: var(--ok-muted, #6b7d74); }
.wd-profile-balance { text-align: right; flex-shrink: 0; }
.wd-balance-label { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ok-muted, #6b7d74); }
.wd-balance-value { display: block; font-weight: 800; font-size: 14px; color: #0b6e4f; }

/* Girdi alanları: ikon-önekli, yuvarlatılmış "pill" görünüm */
.wd-input-group { margin-bottom: 14px; }
.wd-input-group label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ok-ink, #1c2b24); margin-bottom: 6px; }
.wd-limit-hint { display: block; margin-top: 5px; font-size: 11px; color: var(--ok-muted, #6b7d74); }
.wd-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--ok-border, #e3e8e4);
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wd-input-wrap:focus-within {
  border-color: #0b6e4f;
  box-shadow: 0 0 0 3px rgba(11,110,79,0.12);
}
.wd-input-icon { font-size: 16px; flex-shrink: 0; }
.wd-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 11px 0;
  font-size: 14px;
  background: transparent;
  color: var(--ok-ink, #1c2b24);
}
.wd-input-suffix { font-size: 11px; font-weight: 700; color: var(--ok-muted, #6b7d74); flex-shrink: 0; }

.withdraw-history { margin-top: 4px; }
.withdraw-modal .withdraw-history {
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid var(--ok-border, #e3e8e4);
  padding-top: 14px;
  margin-top: 14px;
}
.withdraw-history-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--ok-muted, #6b7d74);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 16px 0 8px;
}
.wd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--ok-border, #e3e8e4);
  border-left: 3px solid var(--ok-border, #e3e8e4);
  margin-bottom: 6px;
  font-size: 12.5px;
  box-shadow: 0 1px 3px rgba(20,60,42,0.05);
}
.wd-item.pending { border-left-color: #d4a537; }
.wd-item.approved { border-left-color: #1a7a52; }
.wd-item.rejected { border-left-color: #c0392b; }
.wd-item-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wd-item-amount { font-weight: 800; color: var(--ok-ink, #1c2b24); }
.wd-item-meta { font-size: 10.5px; color: var(--ok-muted, #6b7d74); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: monospace; }
.wd-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.wd-status-badge.pending { background: rgba(212,165,55,0.18); color: #a9791a; }
.wd-status-badge.approved { background: rgba(80,200,130,0.18); color: #1a7a52; }
.wd-status-badge.rejected { background: rgba(220,80,70,0.18); color: #c0392b; }

/* ==================== Kullanıcı Profili / Avatar / İletişim ====================
   KULLANICI İSTEĞİ: eski "Çıkış Yap" butonunun yerini alan, tıklanınca profil penceresini açan
   avatar + isim "hapı" (pill) — ve o pencerenin 3 sekmesi (Profil / Mesajlar / İletişim). */
.profile-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  position: relative;
}
.profile-pill:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }
.profile-pill-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(160deg, #eecf7e, #d4a537);
  color: #123c2b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  overflow: hidden;
}
.profile-pill-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-pill-name { font-weight: 700; font-size: 13.5px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #c0392b;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  border: 2px solid var(--ok-green-dark, #084d38);
  line-height: 1.2;
}

.profile-modal {
  width: min(460px, 100%);
  text-align: left;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 22px 20px;
  position: relative;
  background: linear-gradient(165deg, #ffffff, #f7faf7);
}
.profile-modal-tabs {
  display: flex;
  gap: 6px;
  margin: 6px 0 18px;
  border-bottom: 1px solid var(--ok-border, #e3e8e4);
}
.profile-tab-btn {
  flex: 1;
  position: relative;
  padding: 9px 6px 11px;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ok-muted, #6b7d74);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.profile-tab-btn:hover { color: var(--ok-ink, #1c2b24); }
.profile-tab-btn.active { color: #0b6e4f; border-bottom-color: #0b6e4f; }
.profile-tab-badge {
  display: inline-block;
  margin-left: 5px;
  background: #c0392b;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: middle;
}
/* ADIM 57/N — KULLANICI RAPORU: "sekme değiştirdiğimde ikide bir büyüyüp küçülüyor ... tek boyut
   olsun her sekmede" — sabit yükseklikli bir gövde: hangi sekme aktif olursa olsun `.ok-modal`
   dıştan HİÇ boyut değiştirmez, sadece bu kutunun İÇİ gerekirse kendi içinde kayar. Yükseklik,
   en uzun sekmenin (Avatar: 3 satır x 5 sütun daire ızgara + başlık/açıklama) rahatça sığacağı
   şekilde seçildi. */
/* ADIM 58/N — KULLANICI RAPORU: "sekmeler arka planı beyaz olduğu için göz yoruyor" — gövde artık
   modalın üst (neredeyse saf beyaz) gradyan ucunun yerine yumuşak, hafif yeşilimsi-gri bir zemin
   kullanıyor; iç köşeler yuvarlatılıp hafif bir iç boşluk eklendi ki panel modalın geri kalanından
   görsel olarak ayrışsın ve düz beyaz bir "boşluk" gibi görünmesin. */
.profile-modal-body {
  box-sizing: border-box;
  height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f2f6f3;
  border-radius: 12px;
  padding: 12px 12px 4px;
}
.profile-tab-panel { display: none; }
.profile-tab-panel.active { display: block; }

.profile-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ok-muted, #6b7d74);
  margin: 0 0 10px;
}
.profile-section-title:not(:first-child) { margin-top: 20px; }

/* ADIM 56/N — KULLANICI İSTEĞİ ("avatarlar sayfayı meşgul etmesin, daha profesyonel olsun"):
   avatar seçimi artık kendi sekmesinde tek başına durduğu için (kişisel bilgilerle aynı kaydırmalı
   listede DEĞİL) daha ferah bir ızgara + belirgin bir "seçili" rozeti ile daha "premium" bir görünüm
   verildi. */
.profile-section-hint {
  font-size: 12px;
  color: var(--ok-muted, #6b7d74);
  margin: -6px 0 16px;
  line-height: 1.4;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}
.avatar-option {
  position: relative;
  border: 2.5px solid transparent;
  border-radius: 50%;
  padding: 0;
  background: #eef3ee;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  aspect-ratio: 1;
  box-shadow: 0 1px 3px rgba(20,40,30,0.12);
}
.avatar-option:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 14px rgba(20,40,30,0.18); }
.avatar-option img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.avatar-option.selected {
  border-color: #0b6e4f;
  box-shadow: 0 0 0 3px rgba(11,110,79,0.18), 0 4px 10px rgba(20,40,30,0.18);
}
.avatar-option.selected::after {
  content: '✓';
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #0b6e4f;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.profile-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f4f7f4;
  border: 1px solid var(--ok-border, #e3e8e4);
}
.profile-info-label { font-size: 11.5px; font-weight: 700; color: var(--ok-muted, #6b7d74); }
.profile-info-value { font-size: 13px; font-weight: 700; color: var(--ok-ink, #1c2b24); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }

.profile-logout-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 11px 0;
  border-radius: 10px;
  background: rgba(192,57,43,0.09);
  border: 1px solid rgba(192,57,43,0.3);
  color: #c0392b;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.profile-logout-btn:hover { background: rgba(192,57,43,0.16); }

.profile-messages-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}
.profile-msg-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ok-border, #e3e8e4);
  background: #fbfdfb;
}
.profile-msg-item.from-admin { border-left: 3px solid #0b6e4f; background: rgba(11,110,79,0.04); }
.profile-msg-item.from-user { border-left: 3px solid #d4a537; }
.profile-msg-meta { font-size: 10.5px; color: var(--ok-muted, #6b7d74); margin-bottom: 4px; }
.profile-msg-text { font-size: 13px; color: var(--ok-ink, #1c2b24); line-height: 1.5; white-space: pre-line; }

.contact-email-pinned {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(11,110,79,0.07);
  border: 1px solid rgba(11,110,79,0.18);
  font-weight: 700;
  font-size: 13px;
  color: var(--ok-ink, #1c2b24);
  margin-bottom: 12px;
}
.contact-email-icon { font-size: 15px; }
.profile-contact-intro { font-size: 12.5px; color: var(--ok-muted, #6b7d74); margin: 0 0 10px; }
.contact-message-box {
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid var(--ok-border, #e3e8e4);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  color: var(--ok-ink, #1c2b24);
  background: #fbfdfb;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-message-box:focus {
  outline: none;
  border-color: #0b6e4f;
  box-shadow: 0 0 0 3px rgba(11,110,79,0.12);
}

@media (max-width: 480px) {
  .profile-pill-name { max-width: 84px; }
  .avatar-grid { grid-template-columns: repeat(3, 1fr); }
}
