.profile-view {
  width: 100%;
  min-width: 0;
  margin-inline: auto;
  animation: app-view-in 220ms var(--app-ease);
}

.profile-menu {
  display: grid;
}

.profile-menu-item {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  gap: 11px;
  align-items: center;
  padding: 12px 14px;
  border: 0 !important;
  border-bottom: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--app-text) !important;
  text-align: left;
  transition: background var(--app-transition-fast) var(--app-ease), color var(--app-transition-fast) var(--app-ease);
}

.profile-menu-item:last-child {
  border-bottom: 0 !important;
}

.profile-menu-item:hover, .profile-menu-item:active {
  background: var(--app-accent-tint) !important;
}

.profile-menu-item:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.profile-menu-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-accent-border);
  border-radius: 0;
  background: var(--app-accent-tint);
  color: var(--app-accent);
  font-size: 13px;
}

.profile-menu-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-menu-text strong, .profile-menu-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-text strong {
  color: var(--app-text);
  font-size: 11px;
  font-weight: 700;
}

.profile-menu-text small {
  color: var(--app-text-muted);
  font-size: 9px;
  line-height: 1.35;
}

.profile-menu-arrow {
  color: var(--app-text-faint);
  font-size: 10px;
}

.profile-expand {
  padding: 14px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-elevated);
}

#profileTxPanel {
  padding-top: 0;
  padding-bottom: 0;
}

.profile-dynamic {
  min-width: 0;
  color: var(--app-text-secondary);
  font-size: 10px;
  line-height: 1.55;
}

.profile-dynamic > * + * {
  margin-top: 8px;
}

/* История транзакций */
.profile-transaction-list {
  position: relative;
  max-height: calc(66px * 5);
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.profile-transaction-list.is-scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.profile-transaction-list.is-scrolling {
  scrollbar-color: var(--app-border-strong) transparent;
}

.profile-transaction-list > * + * {
  margin-top: 0;
}

.profile-transaction-list::-webkit-scrollbar {
  width: 4px;
}

.profile-transaction-list::-webkit-scrollbar-track {
  background: transparent;
}

.profile-transaction-list::-webkit-scrollbar-thumb {
  background: transparent;
}

.profile-transaction-list.is-scrolling::-webkit-scrollbar-thumb {
  background: var(--app-border-strong);
}

.profile-transaction-row {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--app-border);
  background: transparent;
  transition: background var(--app-transition-fast) var(--app-ease);
}

.profile-transaction-row:last-child {
  border-bottom: 0;
}

.profile-transaction-row:hover {
  background: var(--app-accent-tint);
}

.profile-transaction-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-accent-border);
  background: var(--app-accent-tint);
  color: var(--app-accent);
  font-size: 13px;
}

.profile-transaction-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 4px;
  height: 4px;
  background: var(--app-accent);
  opacity: 0.6;
}

.profile-transaction-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-transaction-title, .profile-transaction-date {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-transaction-title {
  color: var(--app-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.profile-transaction-date {
  color: var(--app-text-muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.4;
}

.profile-transaction-amount {
  min-width: 0;
  padding-left: 8px;
  color: var(--app-text-secondary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

.profile-transaction-empty {
  margin: 0;
}

/* Подписка */
.profile-subscription-empty {
  margin: 0;
}

.profile-subscription-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 13px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--app-border);
  background: var(--app-panel);
}

.profile-subscription-card.is-current {
  border-color: var(--app-accent-border);
}

.profile-subscription-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.profile-subscription-kicker {
  overflow: hidden;
  color: var(--app-text-faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.profile-subscription-kicker::before {
  content: "// ";
  color: var(--app-accent);
}

.profile-subscription-value {
  overflow: hidden;
  color: var(--app-text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-subscription-note {
  overflow: hidden;
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-subscription-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-accent-border);
  background: var(--app-accent-tint);
  color: var(--app-accent);
  font-size: 15px;
}

.profile-subscription-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-subscription-metric {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-elevated);
}

.profile-subscription-metric span {
  overflow: hidden;
  color: var(--app-text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.profile-subscription-metric strong {
  overflow: hidden;
  color: var(--app-text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-subscription-metric-wide strong {
  color: var(--app-accent);
}

.profile-dynamic .bg-slate-900, .profile-dynamic .bg-gray-800, .profile-dynamic .rounded-xl, .profile-dynamic .rounded-lg, .profile-dynamic .glass-card {
  border-radius: 0 !important;
  border-color: var(--app-border) !important;
  background: var(--app-panel) !important;
  box-shadow: none !important;
}

/* Промокод */
.profile-promo {
  margin-top: 16px;
}

.profile-promo-form {
  display: grid;
}

.profile-promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.profile-promo-row .text-input {
  border-right: 0;
}

.profile-promo-row .action-button {
  min-width: 112px;
}

.profile-promo-note {
  margin-top: 11px;
}

@media (max-width: 380px) {
  .profile-transaction-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .profile-transaction-icon {
    width: 34px;
    height: 34px;
  }

  .profile-transaction-amount {
    padding-left: 4px;
    font-size: 9px;
  }

  .profile-promo-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .profile-promo-row .text-input {
    border-right: 1px solid var(--app-border-strong);
  }

  .profile-promo-row .action-button {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-transaction-row, .profile-transaction-more {
    transition: none;
  }

  .profile-view, .profile-menu-item {
    animation: none;
    transition: none;
  }
}