/* Müşteri hesabım — profil ve sipariş geçmişi */
.profile-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: start;
}

.profile-grid-full {
  grid-column: 1 / -1;
}

.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
}

.account-stat-card {
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border-subtle, #e0e6ec);
  border-radius: 10px;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  min-height: 5.5rem;
}

.account-stat-k {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #5c6b7a);
  margin-bottom: 0.35rem;
}

.account-stat-v {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--green-deep, #384f6c);
}

.account-stat-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted, #6b7a88);
}

.profile-stats-card h2,
.profile-stats-lead {
  margin-bottom: 0.65rem;
}

.profile-stats-lead {
  margin-top: -0.35rem;
  font-size: 0.86rem;
}

.hesabim-page-head {
  margin-bottom: 1rem;
}

.hesabim-page-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.hesabim-atolye-line {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.hesabim-grid {
  align-items: start;
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .account-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .account-stats-grid {
    grid-template-columns: 1fr;
  }
}

.profile-account-card h2,
.profile-orders-card h2,
.profile-privacy-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.profile-form {
  display: grid;
  gap: 0.85rem;
}

.profile-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.profile-form input,
.profile-form textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-subtle, #d8dee6);
  border-radius: 8px;
  font: inherit;
  background: var(--surface-input, #fff);
}

.profile-form input[readonly] {
  background: var(--surface-muted, #f4f6f8);
  color: var(--text-muted, #5c6b7a);
  cursor: default;
}

.profile-form textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.profile-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
}

.profile-meta {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #5c6b7a);
}

.profile-password-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle, #e8ecf0);
}

.profile-password-block summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.profile-password-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.profile-danger {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle, #e8ecf0);
}

.profile-danger p {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted, #5c6b7a);
}

.profile-orders-list {
  display: grid;
  gap: 0.85rem;
}

.profile-order-card {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: var(--surface-raised, #fafbfc);
}

.profile-order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.profile-order-eser {
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.profile-order-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.65rem 0;
  font-size: 0.88rem;
}

.profile-order-facts dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted, #6b7c8f);
}

.profile-order-facts dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
}

.profile-order-preview {
  margin-bottom: 0.65rem;
  border-radius: 8px;
  overflow: hidden;
  min-height: 120px;
  background: var(--surface-muted, #eef2f6);
}

.profile-order-preview .frame-preview,
.profile-order-preview:not(.order-card-preview--multi) {
  min-height: 120px;
}

.profile-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.profile-order-pay-wrap {
  margin: 0 0 0.85rem;
}

.profile-order-pay-cta {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.profile-privacy-links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.profile-privacy-text {
  display: grid;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary, #3d4f61);
}

.profile-order-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.profile-order-detail-modal.hidden {
  display: none;
}

.profile-order-detail-panel {
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  background: var(--surface-card, #fff);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  padding: 1.25rem 1.35rem 1.5rem;
}

.profile-order-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.profile-order-detail-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.profile-order-detail-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted, #6b7c8f);
  padding: 0.15rem 0.35rem;
}

.panel-user-customer .app-header-user-email {
  font-weight: 600;
  word-break: break-all;
}

@media (max-width: 860px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}
