/**
 * GT Market — страница профиля
 */

.profile-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.profile-page__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.profile-header {
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--primary-light) 0%, transparent 100%);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border-soft);
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-header__name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.profile-header__meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.profile-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}

.profile-section:last-child {
  border-bottom: none;
}

.profile-section__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.profile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.profile-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-row:first-child {
  padding-top: 0;
}

.profile-row__label {
  font-size: 0.875rem;
  color: var(--muted);
  min-width: 100px;
  flex-shrink: 0;
}

.profile-row__value {
  font-size: 1rem;
  color: var(--ink);
}

.profile-row__value--empty {
  color: var(--muted);
  font-style: italic;
}

.profile-actions {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-soft);
}

.profile-actions .btn {
  min-width: 120px;
}

.profile-actions a.btn {
  text-decoration: none;
}

.profile-guest {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  text-align: center;
  border: 1px solid var(--border-soft);
}

.profile-guest__text {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.profile-guest a {
  font-weight: 600;
}

.profile-loading {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--border-soft);
}

.profile-companies {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-companies li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.9375rem;
}

.profile-companies li:last-child {
  border-bottom: none;
}

.profile-companies .role {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 0.5rem;
}

/* Мои объявления — 6 категорий */
.profile-listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.profile-listing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.profile-listing-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.profile-listing-card__icon {
  font-size: 1.5rem;
}

.profile-listing-card__label {
  text-align: center;
  line-height: 1.3;
}

.profile-listings-panel {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.profile-listings-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.profile-listings-panel__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.profile-listings-panel__close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.profile-listings-panel__close:hover {
  color: var(--ink);
  background: var(--border-soft);
}

.profile-listings-panel__toolbar {
  margin-bottom: 0.75rem;
}

.profile-listings-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-listings-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.profile-listings-list li:last-child {
  border-bottom: none;
}

.profile-listings-list a {
  flex: 1;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
}

.profile-listings-list a:hover {
  color: var(--primary);
}

.profile-listings-list .price {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9375rem;
}

.profile-listings-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .profile-listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .profile-page {
    padding: 0 16px 48px;
  }
  .profile-header {
    padding: 1.5rem 1rem;
    flex-direction: column;
    text-align: center;
  }
  .profile-section {
    padding: 1rem;
  }
}
