.customer-profile-wrap {
  padding: 3rem 6%;
  max-width: 1200px;
  margin: 45px auto 0;
}

.customer-profile-head {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.customer-avatar-frame {
  position: relative;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-soft);
  background: var(--sage-light);
  overflow: hidden;
  flex-shrink: 0;
}

.customer-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customer-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--espresso);
  background: var(--sage-light);
}

.customer-avatar-edit {
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: rgba(44, 36, 32, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.customer-avatar-edit:hover {
  background: rgba(44, 36, 32, 0.75);
}

.customer-avatar-edit input[type="file"] {
  display: none;
}

.customer-profile-head-meta h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--espresso);
  margin: 0 0 0.25rem;
}

.customer-profile-head-meta p {
  color: var(--warm-gray);
  font-size: 0.95rem;
  margin: 0;
}

.customer-profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.customer-profile-card,
.customer-orders-card {
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem;
}

.customer-profile-card h3,
.customer-orders-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--espresso);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.customer-profile-card label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--warm-gray);
  margin-bottom: 0.9rem;
}

.customer-profile-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--espresso);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.customer-profile-card input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-light);
}

.customer-profile-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.customer-profile-actions .pill-btn {
  margin: 0;
}

.customer-logout-btn {
  border: 1px solid var(--border-light);
  background: var(--white);
  color: var(--espresso-muted);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.customer-logout-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.customer-orders-sections {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.customer-orders-section {
  background: var(--white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.customer-orders-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--espresso);
}

.customer-orders-count {
  background: var(--sage-light);
  color: var(--espresso-muted);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 0.1rem 0.6rem;
}

.customer-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.customer-orders-empty {
  font-size: 0.85rem;
  color: var(--warm-gray);
  padding: 0.75rem 0;
}

.customer-order-card {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.95rem;
  background: var(--cream);
  transition: var(--transition-fast);
}

.customer-order-card:hover {
  border-color: var(--sage);
  box-shadow: var(--shadow-soft);
}

.customer-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.customer-order-id {
  font-size: 0.9rem;
  color: var(--espresso);
}

.customer-order-meta {
  font-size: 0.78rem;
  color: var(--warm-gray);
  margin: 0.3rem 0 0.1rem;
}

.customer-order-products {
  font-size: 0.85rem;
  color: var(--espresso-muted);
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.customer-order-total {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent);
}

@media (max-width: 860px) {
  .customer-profile-grid {
    grid-template-columns: 1fr;
  }
  .customer-profile-head {
    flex-direction: column;
    text-align: center;
  }
}