/* Profile area — flat redesign */
.profile-area {
  --pf-accent: #bf6b32;
  --pf-accent-soft: #f7f1ea;
  --pf-accent-mid: #e8d5c4;
  --pf-border: #e8e4df;
  --pf-border-strong: #ddd6ce;
  --pf-bg: #f4f1ed;
  --pf-surface: #ffffff;
  --pf-text: #2b2622;
  --pf-muted: #8a8178;
  --pf-radius: 14px;
  --pf-radius-sm: 10px;
  margin-top: 70px;
  color: var(--pf-text);
}
@media (min-width: 1024px) {
  .profile-area { margin-top: 170px; }
}

.profile-area__bg {
  background: transparent;
  padding-bottom: 2.5rem;
  min-height: 60vh;
  overflow-x: clip;
}

.profile-area__container {
  padding-top: 1rem;
}
@media (min-width: 1024px) {
  .profile-area__container {
    padding-top: 0;
  }
}

.profile-area__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  width: 100%;
}
@media (min-width: 1024px) {
  .profile-area__grid {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
}

.profile-area__aside { display: none; }
@media (min-width: 1024px) {
  .profile-area__aside { display: block; }
}

.profile-area__main {
  min-width: 0;
  max-width: 100%;
}

.profile-area__aside-card,
.profile-panel {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  box-shadow: none;
}

.profile-area__aside-card {
  padding: 1.25rem;
  position: sticky;
  top: 170px;
}

.profile-panel {
  padding: 1rem;
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
@media (min-width: 640px) {
  .profile-panel { padding: 1.5rem 1.75rem 1.75rem; }
}

/* Mobile account menu */
.profile-mobile-nav {
  display: block;
  position: sticky;
  top: 64px;
  z-index: 40;
  width: 100%;
  margin-bottom: 0.25rem;
}
@media (min-width: 1024px) {
  .profile-mobile-nav { display: none; }
}

.profile-mobile-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.15rem;
  background: var(--pf-surface);
  border: 0;
  border-top: 1px solid var(--pf-border);
  border-bottom: 1px solid var(--pf-border);
  color: var(--pf-text);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  position: relative;
  text-align: right;
}
.profile-mobile-nav__chevron {
  width: 1.15rem;
  height: 1.15rem;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.profile-mobile-nav__toggle.is-open .profile-mobile-nav__chevron,
.profile-mobile-nav__chevron.is-open {
  transform: translateY(-50%) rotate(0deg);
}
.profile-mobile-nav__panel {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 45;
  background: var(--pf-surface);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.profile-mobile-nav__panel.is-open,
.profile-mobile-nav__panel.block {
  display: block !important;
}
.profile-mobile-nav__panel-inner {
  padding: 1.15rem 1.15rem 7rem;
}

.profile-breadcrumb {
  margin: 1.25rem 0;
}
.profile-breadcrumb ul {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-breadcrumb a {
  color: var(--pf-text);
  font-weight: 700;
}
.profile-breadcrumb a:hover { color: var(--pf-accent); }
.profile-breadcrumb__sep,
.profile-breadcrumb [aria-current="page"] {
  color: var(--pf-muted);
}

@media (max-width: 1023px) {
  .profile-area {
    margin-top: 64px;
  }
  .profile-area__bg {
    padding-bottom: 7rem;
  }
  .profile-breadcrumb {
    margin: 0.85rem 0;
  }
  .profile-section-head {
    gap: 0.5rem;
  }
  .profile-section-head h2 {
    font-size: 0.9rem;
  }
  .profile-section-head__line {
    display: none;
  }
  .profile-panel__head {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-panel__actions,
  .profile-panel__actions .btn {
    width: 100%;
  }
  .profile-panel .slider-nav-btn {
    display: none !important;
  }
  .profile-panel .swiper {
    overflow: hidden;
    width: 100%;
  }
  .profile-panel .swiper-slide {
    max-width: 100%;
  }
  .profile-card--product .profile-card__media {
    margin-bottom: 0.65rem;
  }
  .profile-empty {
    padding: 2.25rem 0.75rem;
  }
}

.profile-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--pf-border);
}
.profile-user__avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pf-accent-soft);
  color: var(--pf-accent);
  font-weight: 800;
  font-size: 1.1rem;
  border: 1px solid var(--pf-accent-mid);
}
.profile-user__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-user__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.profile-user__name {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--pf-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}
.profile-user__role {
  font-size: 0.75rem;
  color: var(--pf-muted);
  font-weight: 500;
}

.profile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.profile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: var(--pf-radius-sm);
  border: 1px solid transparent;
  border-right: 3px solid transparent;
  background: transparent;
  color: #5c554e;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
}
.profile-nav-link:hover {
  background: var(--pf-accent-soft);
  color: var(--pf-accent);
}
.profile-nav-link.is-active {
  background: var(--pf-accent-soft);
  color: var(--pf-accent);
  border-color: var(--pf-accent-mid);
  border-right-color: var(--pf-accent);
}
.profile-nav-link__icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f0ec;
  color: #9a9188;
  flex-shrink: 0;
}
.profile-nav-link:hover .profile-nav-link__icon,
.profile-nav-link.is-active .profile-nav-link__icon {
  background: #efe2d5;
  color: var(--pf-accent);
}
.profile-nav-link__icon svg {
  width: 0.95rem;
  height: 0.95rem;
}
.profile-nav-link--danger {
  margin-top: 0.5rem;
  color: #8a8178;
}
.profile-nav-link--danger:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: transparent;
}
.profile-nav-link--danger:hover .profile-nav-link__icon {
  background: #fee2e2;
  color: #dc2626;
}

.profile-impersonation {
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid #f5d78e;
  border-radius: var(--pf-radius-sm);
  background: #fffbeb;
  color: #78350f;
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .profile-impersonation {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.profile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--pf-border);
}
.profile-panel__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pf-text);
  margin: 0;
}
.profile-panel__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  background: var(--pf-accent-soft);
  color: var(--pf-accent);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--pf-accent-mid);
}
.profile-panel__actions .btn,
.profile-panel__head .btn {
  border-radius: 10px !important;
  box-shadow: none !important;
}

.profile-card {
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  padding: 1rem 1.1rem;
  transition: border-color .15s ease, background-color .15s ease;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  display: block;
}
.profile-card:hover {
  border-color: var(--pf-accent-mid);
  background: #fffcfa;
}
.profile-card--product {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.profile-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--pf-radius-sm);
  overflow: hidden;
  background: #f3f0ec;
  margin-bottom: 0.85rem;
}
.profile-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pf-accent-soft);
  color: var(--pf-accent);
  border: 1px solid var(--pf-accent-mid);
  flex-shrink: 0;
}
.profile-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.profile-card__title {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--pf-text);
  margin: 0;
}
.profile-card__text {
  font-size: 0.8125rem;
  color: #6b635c;
  line-height: 1.75;
  margin: 0.5rem 0 0;
}
.profile-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  background: #f6f3ef;
  border: 1px solid var(--pf-border);
  color: #6b635c;
  font-size: 0.75rem;
  font-weight: 600;
}
.profile-icon-btn {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pf-border);
  background: #f6f3ef;
  color: #6b635c;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  padding: 0;
  text-decoration: none;
}
.profile-icon-btn:hover {
  background: #f5f5f4;
  border-color: var(--pf-border-strong);
  color: var(--pf-text);
}
.profile-icon-btn--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.profile-icon-btn--danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}
.profile-icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1rem;
}
.profile-empty__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f4;
  color: var(--pf-text);
  border: 1px solid var(--pf-border);
  margin-bottom: 1rem;
}
.profile-empty__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}
.profile-empty__title {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--pf-text);
  margin: 0 0 0.35rem;
}
.profile-empty__text {
  font-size: 0.75rem;
  color: var(--pf-muted);
  margin: 0 0 1.25rem;
}

.profile-section-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}
.profile-section-head h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  color: var(--pf-text);
}
.profile-section-head__line {
  flex: 1;
  height: 1px;
  background: var(--pf-border);
  min-width: 2rem;
}
.profile-section-head a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pf-muted);
  text-decoration: none;
}
.profile-section-head a:hover { color: var(--pf-accent); }

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 540px) {
  .profile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .profile-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .profile-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.profile-grid > .profile-empty,
.profile-grid > .col-span-full {
  grid-column: 1 / -1;
}

.profile-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--pf-border);
  margin-bottom: 1.15rem;
  padding-bottom: 0;
}
.profile-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b635c;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.profile-tab:hover { color: var(--pf-accent); }
.profile-tab.is-active { color: var(--pf-accent); }
.profile-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  left: 0.5rem;
  bottom: -1px;
  height: 2px;
  background: var(--pf-accent);
  border-radius: 2px 2px 0 0;
}
.profile-tab__count {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: #f3f0ec;
  color: var(--pf-muted);
}
.profile-tab.is-active .profile-tab__count {
  background: var(--pf-accent);
  color: #fff;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
}
