.account-page-wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 28px 32px 64px;
  flex: 1;
  width: 100%;
}

.account-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.account-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.account-user-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.account-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.account-avatar-wrap img,
.account-user-card > img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.account-avatar-edit {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.account-avatar-edit:hover {
  filter: brightness(1.05);
}

.account-avatar-edit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.account-user-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.account-user-card > div > span {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  word-break: break-all;
}

.account-user-id {
  margin-top: 4px;
  font-size: 11px !important;
  font-weight: 600;
  color: var(--primary) !important;
}

.pro-status {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--pro-bg);
  color: var(--pro);
}

.pro-status.muted {
  background: var(--surface-2);
  color: var(--text-muted);
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-nav a {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.account-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.account-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.btn-logout {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.btn-logout:hover {
  background: #fee2e2;
}

.account-main {
  flex: 1;
  min-width: 0;
}

.account-main h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.account-main .page-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state svg {
  display: block;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.purchases-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
}

.purchases-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border-collapse: collapse;
}

.purchases-table th,
.purchases-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.purchases-table th {
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.purchases-table tr:last-child td {
  border-bottom: none;
}

.purchase-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.purchase-product img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.purchase-product strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.purchase-product span {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-download {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-pill);
  transition: background 0.15s;
}

.btn-download:hover {
  background: #cce4ff;
}

.owned-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  background: var(--pro);
  color: white;
  border-radius: 6px;
}

.model-card-image {
  position: relative;
}

/* PRO page */
.pro-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.pro-plan-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pro-plan-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}

.pro-plan-card.featured::before {
  content: 'Популярный';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.pro-plan-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.pro-plan-price {
  font-size: 32px;
  font-weight: 800;
  margin: 16px 0;
}

.pro-plan-price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.pro-plan-features {
  list-style: none;
  text-align: left;
  margin: 20px 0 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.pro-plan-features li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.pro-plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--pro);
  font-weight: 700;
}

.pro-active-banner {
  background: linear-gradient(135deg, #2d5a37, #386e44);
  color: white;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.pro-active-banner h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.uploads-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.upload-item strong {
  font-size: 15px;
}

.upload-item-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.upload-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.upload-status.pending {
  background: #fef3c7;
  color: #b45309;
}

.upload-status.ok {
  background: #dcfce7;
  color: #15803d;
}

.upload-status.danger {
  background: #fee2e2;
  color: #dc2626;
}

.upload-form textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font: inherit;
  resize: vertical;
}

.wallet-balance-card {
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
}

.wallet-balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.wallet-balance-card-funds {
  background: linear-gradient(135deg, #386e44 0%, #2d5837 100%);
}

.wallet-balance-card-earnings {
  background: linear-gradient(135deg, #1f4f8a 0%, #163a66 100%);
}

.wallet-balance-label {
  font-size: 14px;
  opacity: 0.9;
}

.wallet-balance-value {
  font-size: 36px;
  font-weight: 700;
  margin: 8px 0;
}

.wallet-balance-note {
  font-size: 13px;
  opacity: 0.85;
}

.wallet-withdraw-form,
.wallet-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.wallet-withdraw-form h3,
.wallet-section h3 {
  margin: 0 0 16px;
}

.wallet-form-note,
.wallet-empty {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

.wallet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.wallet-table th,
.wallet-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.wallet-table .plus {
  color: #15803d;
  font-weight: 600;
}

.wallet-table .minus {
  color: #dc2626;
  font-weight: 600;
}

@media (max-width: 760px) {
  .wallet-balance-grid {
    grid-template-columns: 1fr;
  }
}

.upload-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.upload-checklist {
  margin: 20px 0 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.upload-checklist h4 {
  margin: 0 0 12px;
  font-size: 14px;
}

.upload-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}

.upload-check-item:last-child {
  margin-bottom: 0;
}

.upload-checklist .upload-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.upload-check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: var(--primary);
}

.upload-check-item a {
  color: var(--primary);
}

.upload-form h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

#upload-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.upload-form input:not([type="checkbox"]),
.upload-form select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
}

.upload-form label:not(.upload-check-item) {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.payment-success-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .account-layout {
    flex-direction: column;
    gap: 16px;
  }

  .account-sidebar {
    width: 100%;
    position: static;
    padding: 16px;
  }

  .account-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .account-nav a {
    padding: 8px 12px;
    font-size: 13px;
    background: var(--surface-2);
  }

  .account-nav a.active {
    background: var(--primary-light);
  }

  .btn-logout {
    margin-top: 12px;
  }

  .account-main h1 {
    font-size: 22px;
  }

  .pro-plans {
    grid-template-columns: 1fr !important;
  }

  .purchases-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .purchases-table thead {
    display: none;
  }

  .purchases-table tr {
    display: block;
    margin-bottom: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .purchases-table td {
    display: block;
    padding: 4px 0;
    border: none;
  }

  .purchases-table td:last-child {
    margin-top: 10px;
  }

  .upload-form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ─── Profile page ─── */
.profile-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.profile-block-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.profile-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}

.profile-field {
  min-width: 0;
}

.profile-field-full {
  grid-column: 1 / -1;
}

.profile-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.profile-input,
.profile-select,
.profile-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: white;
}

.profile-textarea {
  resize: vertical;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}

.profile-follow-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

