/* Kullanıcı Profil Sayfası Stilleri (CSS Variables & Responsive UI) */

.profile-page-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
  width: 100%;
  padding: 8px 0 48px 0;
  box-sizing: border-box;
}

.profile-container {
  font-family: var(--font-family);
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px 24px 48px 24px;
  width: 100%;
  box-sizing: border-box;
}

.profile-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.profile-card-full {
  grid-column: 1 / -1;
}

.profile-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
  /* Prevents flex/grid overflow */
}

.profile-card:hover {
  border-color: var(--border-subtle);
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-card-title svg {
  color: var(--text-secondary);
}

/* A. Hesap Özeti Kartı */
.account-summary-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-avatar-xl {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--brand-soft);
  flex-shrink: 0;
}

.profile-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 200px;
}

.profile-user-name {
  font-family: var(--font-family);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-user-email {
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 4px;
}

.profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-detail-label {
  font-family: var(--font-family);
  font-size: 0.8rem;
  color: var(--text-secondary);
  
  letter-spacing: 0.5px;
}

.profile-detail-value {
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* B. Yatırımcı Profili Kartları */
.risk-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.risk-option-card {
  background: var(--bg);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  min-width: 0;
  position: relative;
}

.risk-option-card:hover {
  border-color: var(--border-subtle);
  background: var(--hover-bg);
  transform: translateY(-1px);
}

.risk-option-card.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand-soft-border);
}

.risk-option-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.risk-option-card.active .risk-option-title {
  color: var(--brand);
}

.risk-option-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Form alanları & Butonlar */
.profile-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-field-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.profile-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) - 4px);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.profile-input:focus {
  border-color: var(--text-secondary);
}

.profile-select {
  width: 100%;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) - 4px);
  padding: 10px 36px 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease;
}

.profile-select:focus,
.profile-select:hover {
  border-color: var(--border-subtle);
}

.profile-select option {
  background-color: var(--panel);
  color: var(--text-primary);
  font-family: var(--font-family);
}

/* Row Form Inputs */
.profile-input-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-input-inline .profile-input {
  flex: 1;
  min-width: 180px;
}

/* Buttons */
.profile-btn {
  background: var(--hover-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: calc(var(--radius) - 4px);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: var(--font-family);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.profile-btn:hover {
  background: var(--hover-bg);
  border-color: var(--border-subtle);
}

.profile-btn.primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand-deep);
  font-weight: 600;
}

.profile-btn.primary:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  opacity: 1;
  filter: brightness(1.05);
}

.profile-btn.danger {
  background: var(--hover-bg);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

.profile-btn.danger:hover {
  background: var(--hover-bg);
  border-color: var(--accent-red);
  opacity: 0.85;
}

.profile-btn.danger-solid {
  background: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
  font-weight: 600;
}

.profile-btn.danger-solid:hover {
  opacity: 0.9;
}

/* Range Slider */
.profile-range-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) - 4px);
  padding: 10px 14px;
}

.profile-range-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--brand);
  cursor: pointer;
}

.profile-range-val {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  min-width: 38px;
  text-align: right;
}

/* Toggle Switch */
.profile-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) - 4px);
  flex-wrap: wrap;
}

.profile-toggle-label {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--panel-border);
  transition: .3s;
  border-radius: 24px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked+.slider-round {
  background-color: var(--brand);
}

input:checked+.slider-round:before {
  transform: translateX(20px);
}

/* F. Kullanım Özeti (İstatistik Kutuları) */
.usage-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-box {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.stat-box-value {
  font-family: var(--font-family);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-box-label {
  font-family: var(--font-family);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* G. Alt Bölüm */
.profile-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Responsive breakpoint: 1024px ve altında dar paneller için esnek düzen */
@media (max-width: 1024px) {
  .profile-container {
    padding: 14px 8px 32px 8px;
  }

  .profile-card {
    padding: 14px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-details-grid {
    grid-template-columns: 1fr;
  }

  .profile-user-name {
    font-size: 1.15rem;
    word-break: break-word;
  }

  .profile-user-email {
    font-size: 0.85rem;
    word-break: break-all;
  }
}

@media (max-width: 600px) {
  .risk-options-grid {
    grid-template-columns: 1fr;
  }

  .usage-stats-grid {
    grid-template-columns: 1fr;
  }

  .account-summary-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Abonelik Paneli İle Paralel Profil & Ayarlar Blokları */
.profile-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.profile-section-title {
  font-family: var(--font-family);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-section-title svg {
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.profile-section-header:hover .profile-section-title svg {
  color: var(--brand);
}

.profile-list-block {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-list-block:hover {
  border-color: var(--border-subtle);
}

.profile-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--panel-border);
  transition: background-color 0.15s ease;
}

.profile-list-row:last-child {
  border-bottom: none;
}

.profile-list-row:hover {
  background-color: var(--hover-bg);
}

.profile-list-label-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
}

.profile-list-label {
  font-family: var(--font-family);
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-list-sublabel {
  font-family: var(--font-family);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.profile-list-value-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 2;
  justify-content: flex-end;
}

.profile-list-value {
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: right;
  word-break: break-all;
  font-weight: 500;
}

/* Segmented Pill Selector (Theme, Language, etc.) */
.segmented-pill-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.segmented-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.segmented-pill-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.segmented-pill-btn.active {
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Speed Preset Buttons */
.speed-preset-badge {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.speed-preset-badge:hover,
.speed-preset-badge.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.profile-edit-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-secondary);
  border-radius: 9px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.profile-edit-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.profile-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-action-btn:active {
  transform: translateY(0);
}

.profile-action-btn.primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand-deep);
  box-shadow: 0 2px 10px var(--brand-soft);
}

.profile-action-btn.primary:hover {
  background: var(--brand-deep);
  box-shadow: 0 4px 16px var(--brand-soft);
}

.profile-action-btn.danger {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}

.profile-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.profile-page-header {
  margin-top: 0;
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: none;
}

.profile-page-title {
  font-family: var(--font-family);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-page-subtitle {
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .profile-list-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .profile-list-value-container {
    width: 100%;
    justify-content: space-between;
  }
}


