body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sf-pro-text);
}

.profile-loading,
.profile-error {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  color: var(--text-secondary);
  text-align: center;
}
.profile-loading[hidden], .profile-error[hidden], .profile-app[hidden] { display: none !important; }
.profile-loading__spinner {
  width: 32px;
  height: 32px;
  border: 2px solid #333336;
  border-top-color: var(--control-accent);
  border-radius: 50%;
  animation: profile-spin .75s linear infinite;
}
@keyframes profile-spin { to { transform: rotate(360deg); } }

.profile-app { min-height: 100vh; background: radial-gradient(ellipse at 72% 0, rgba(0,229,255,.045), transparent 40%), #000; }
.profile-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px max(24px, calc((100vw - 1376px) / 2));
  background: rgba(14,14,14,.88);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px) saturate(150%);
}
.profile-brand { justify-self: start; color: var(--text-primary); font: 600 16px/1 var(--font-sf-pro-display); letter-spacing: -.02em; }
.profile-brand span { color: var(--control-accent); }
.profile-header__title { color: var(--text-secondary); font-size: 13px; }
.profile-header__home { justify-self: end; min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px; color: #d8d8dc; border: 1px solid #333336; border-radius: 9999px; font-size: 13px; transition: color var(--ease), border-color var(--ease), background var(--ease); }
.profile-header__home:hover { color: #fff; border-color: #6e6e73; background: rgba(255,255,255,.06); }

.profile-layout { width: min(100% - 48px, 1376px); min-height: calc(100vh - 64px); margin: 0 auto; display: grid; grid-template-columns: 258px minmax(0,1fr); align-items: start; }
.profile-sidebar { position: sticky; top: 64px; min-height: calc(100vh - 64px); display: flex; flex-direction: column; padding: 28px 14px 18px 0; border-right: 1px solid #242427; }
.profile-sidebar__top { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; border-bottom: 1px solid #242427; }
.profile-userinfo { min-width: 0; }
.profile-userinfo__name { overflow: hidden; color: #f5f5f7; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.profile-userinfo__email { overflow: hidden; margin-top: 4px; color: #86868b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-avatar { position: relative; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; color: #eaffff; background: linear-gradient(145deg,#14343a,#293034 72%); border: 1px solid rgba(0,229,255,.24); border-radius: 50%; font-family: var(--font-sf-pro-display); font-weight: 600; user-select: none; }
.profile-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-avatar--sidebar { width: 48px; height: 48px; font-size: 18px; }
.profile-nav { display: flex; flex-direction: column; gap: 5px; padding-top: 20px; }
.profile-nav__item { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 11px; padding: 0 12px; color: #9a9a9f; background: transparent; border: 1px solid transparent; border-radius: 12px; text-align: left; text-decoration: none; font-size: 13px; font-weight: 500; cursor: pointer; transition: color var(--ease), background var(--ease), border-color var(--ease); }
.profile-nav__item svg { width: 18px; height: 18px; flex: 0 0 auto; color: currentColor; }
.profile-nav__item:hover { color: #f5f5f7; background: rgba(255,255,255,.045); }
.profile-nav__item[aria-current="page"] { color: #eaffff; background: rgba(0,229,255,.085); border-color: rgba(0,229,255,.18); }
.profile-nav__item[aria-current="page"] svg { color: var(--control-accent); }
.profile-sidebar__bottom { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 18px; border-top: 1px solid #242427; }
.profile-nav__item--logout:hover { color: #ff9b96; background: rgba(255,105,97,.07); }

.profile-content { min-width: 0; width: 100%; max-width: 1118px; margin-inline: auto; padding: 34px clamp(24px, 4vw, 58px) 64px; }
.profile-welcome { min-height: 184px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px,3vw,38px); background: linear-gradient(115deg,rgba(17,24,28,.98),rgba(15,17,19,.94) 58%,rgba(13,32,36,.9)); border: 1px solid #292c2e; border-radius: 22px; }
.profile-welcome__copy { min-width: 0; }
.profile-eyebrow { margin: 0 0 10px; color: #7bced8; font-size: 10px; font-weight: 600; line-height: 1.4; letter-spacing: .14em; }
.profile-welcome h1 { max-width: 720px; margin: 0; color: #f5f5f7; font: 600 clamp(26px,3vw,36px)/1.12 var(--font-sf-pro-display); letter-spacing: -.04em; }
.profile-welcome h1 span { color: #9beef5; }
.profile-welcome__copy > p:last-child { max-width: 560px; margin: 12px 0 0; color: #a5a5aa; font-size: 13px; line-height: 1.55; }
.profile-avatar--welcome { width: 112px; height: 112px; margin-right: 6px; border-color: rgba(0,229,255,.3); box-shadow: inset 0 0 0 5px rgba(0,0,0,.14); font-size: 42px; }
.profile-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 16px 0 38px; }
.profile-stats[hidden] { display: none !important; }
.profile-stat { min-height: 88px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 15px 18px; background: #101012; border: 1px solid #252528; border-radius: 16px; }
.profile-stat__label { color: #8c8c91; font-size: 11px; }
.profile-stat__value { color: #f5f5f7; font: 600 25px/1 var(--font-sf-pro-display); letter-spacing: -.03em; }

.profile-section { min-width: 0; }
.profile-section[hidden] { display: none !important; }
.profile-section__heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 0 0 18px; }
.profile-section__title { margin: 0; color: #f5f5f7; font: 600 26px/1.12 var(--font-sf-pro-display); letter-spacing: -.035em; }
.profile-section__subtitle { margin: 7px 0 0; color: #88888d; font-size: 12px; line-height: 1.5; }
.profile-section__link { flex: 0 0 auto; color: #8adfe8; font-size: 12px; }
.profile-section__link span { padding-left: 3px; }
.profile-section__link:hover { color: #c6fbff; }
.profile-order-filters { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding: 5px; background: #101012; border: 1px solid #242427; border-radius: 14px; scrollbar-width: thin; }
.profile-filter { min-height: 34px; flex: 0 0 auto; padding: 0 13px; color: #96969b; background: transparent; border: 1px solid transparent; border-radius: 10px; font: 500 12px/1 var(--font-sf-pro-text); cursor: pointer; transition: color var(--ease), background var(--ease), border-color var(--ease); }
.profile-filter:hover { color: #f5f5f7; background: rgba(255,255,255,.05); }
.profile-filter[aria-pressed="true"] { color: #eaffff; background: rgba(0,229,255,.1); border-color: rgba(0,229,255,.2); }

.purchases-list { display: flex; flex-direction: column; gap: 11px; }
.purchases-more { display: flex; justify-content: center; margin-top: 18px; }
.purchases-more [hidden] { display: none !important; }
.purchases-more .profile-btn { min-width: 160px; }
.purchases-more .profile-btn:focus-visible { outline: 2px solid var(--control-accent); outline-offset: 3px; }
.order-card { padding: 17px 18px; background: #111113; border: 1px solid #29292c; border-radius: 17px; transition: border-color var(--ease), background var(--ease); }
.order-card:hover { border-color: #3a3a3e; background: #141416; }
.order-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.order-card__identity { min-width: 0; }
.order-card__id { color: #f0f0f2; font-size: 13px; font-weight: 600; }
.order-card__date { margin-top: 4px; color: #85858a; font-size: 11px; }
.order-badge { flex: 0 0 auto; padding: 6px 9px; color: #a8a8ad; background: rgba(255,255,255,.035); border: 1px solid #333336; border-radius: 999px; font-size: 10px; font-weight: 600; line-height: 1.1; }
.order-badge--processing { color: #8be9f3; background: rgba(0,229,255,.07); border-color: rgba(0,229,255,.2); }
.order-badge--completed { color: #7de3a0; background: rgba(48,209,88,.07); border-color: rgba(48,209,88,.2); }
.order-badge--cancelled { color: #e49691; background: rgba(255,105,97,.07); border-color: rgba(255,105,97,.18); }
.order-items { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 12px; }
.order-item { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px; background: #0b0b0c; border: 1px solid #242427; border-radius: 13px; }
.order-item__thumb { width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; color: #71d7e0; background: #151719; border: 1px solid #2a2d2f; border-radius: 10px; font-size: 18px; }
.order-item__thumb img { width: 100%; height: 100%; display: block; object-fit: contain; }
.order-item__info { flex: 1 1 auto; min-width: 0; }
.order-item__title { overflow-wrap: anywhere; color: #f1f1f3; font-size: 12px; font-weight: 600; line-height: 1.4; }
.order-item__variant { margin-top: 3px; color: #a8a8ad; font-size: 11px; }
.order-item__meta { margin-top: 4px; color: #77777d; font-size: 10px; }
.order-item__price { flex: 0 0 auto; color: #8be9f3; font-size: 12px; font-weight: 600; white-space: nowrap; }
.order-card__footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.order-card__details { color: #95959a; font-size: 11px; }
.order-card__details summary { width: fit-content; color: #9ee8ef; cursor: pointer; list-style-position: inside; }
.order-card__details summary:hover { color: #d5fbff; }
.order-card__details-content { display: grid; gap: 7px; margin: 10px 0 2px; color: #85858a; line-height: 1.45; }
.order-card__total { color: #f5f5f7; font: 600 17px/1.2 var(--font-sf-pro-display); white-space: nowrap; }
.order-card__total span { margin-right: 6px; color: #85858a; font: 400 10px/1 var(--font-sf-pro-text); }

.profile-loader { display: grid; gap: 10px; }
.profile-loader[hidden] { display: none !important; }
.profile-skeleton { height: 122px; background: linear-gradient(100deg,#111113 15%,#1b1b1e 35%,#111113 55%); background-size: 220% 100%; border: 1px solid #29292c; border-radius: 17px; animation: profile-shimmer 1.6s ease infinite; }
@keyframes profile-shimmer { to { background-position-x: -220%; } }
.profile-empty { display: grid; justify-items: center; gap: 8px; padding: 32px 20px; background: #101012; border: 1px dashed #333336; border-radius: 17px; text-align: center; }
.profile-empty--compact { padding: 22px; }
.profile-empty[hidden] { display: none !important; }
.profile-empty__icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 3px; color: #8be9f3; background: rgba(0,229,255,.08); border: 1px solid rgba(0,229,255,.15); border-radius: 50%; font-size: 19px; }
.profile-empty__title { margin: 0; color: #e8e8ea; font-size: 14px; font-weight: 600; }
.profile-empty__text { margin: 0 0 7px; color: #86868b; font-size: 12px; }
.profile-error-inline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; color: #ff9b96; background: rgba(255,105,97,.07); border: 1px solid rgba(255,105,97,.18); border-radius: 13px; font-size: 12px; }
.profile-error-inline[hidden] { display: none !important; }

.profile-panel, .profile-form { background: #111113; border: 1px solid #29292c; border-radius: 18px; }
.profile-photo-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px; margin-bottom: 14px; padding: 22px; }
.profile-panel__title { margin: 0; color: #f3f3f5; font: 600 17px/1.2 var(--font-sf-pro-display); letter-spacing: -.02em; }
.profile-panel__description { max-width: 460px; margin: 7px 0 0; color: #8d8d92; font-size: 12px; line-height: 1.5; }
.profile-photo__hint { margin: 11px 0 0; color: #6e6e73; font-size: 10px; }
.profile-photo__controls { min-width: 0; display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 12px; }
.profile-avatar--large { width: 96px; height: 96px; font-size: 34px; }
.profile-photo__actions { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
.profile-photo__pending { display: grid; gap: 7px; }
.profile-photo__pending[hidden], .profile-photo__controls [hidden] { display: none !important; }
.profile-photo__error { grid-column: 1/-1; margin: 0; color: #ff9b96; font-size: 11px; }
.profile-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
.profile-file-input:focus-visible + .profile-btn { outline: 2px solid var(--control-accent); outline-offset: 3px; }

.profile-form { display: grid; gap: 15px; max-width: none; padding: 22px; }
.profile-panel__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 3px; }
.profile-panel__caption { color: #6e6e73; font-size: 10px; }
.profile-field { min-width: 0; display: grid; gap: 7px; }
.profile-field > span { color: #aaaab0; font-size: 11px; font-weight: 500; }
.profile-input { width: 100%; min-width: 0; min-height: 44px; padding: 0 13px; color: #f5f5f7; background: #0b0b0c; border: 1px solid #333336; border-radius: 11px; font-size: 13px; transition: border-color var(--ease), background var(--ease), box-shadow var(--ease); }
.profile-input:hover { background: #101012; }
.profile-input:focus-visible { outline: 2px solid rgba(0,229,255,.25); outline-offset: 1px; border-color: var(--control-accent); }
.profile-input[aria-invalid="true"] { border-color: var(--status-danger); }
.profile-email-status { margin: -6px 0 0; color: #8b8b90; font-size: 11px; line-height: 1.45; }
.profile-email-status[data-state="verified"] { color: #75d998; }
.profile-email-status[data-state="pending"] { color: #9be8f0; }
.profile-email-status[data-state="unverified"] { color: #f0ca7b; }
.profile-meta { display: grid; gap: 5px; padding-top: 12px; color: #77777d; border-top: 1px solid #29292c; font-size: 11px; }
.profile-meta[hidden] { display: none !important; }
.profile-form__footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 2px; }
.profile-form-error { flex-basis: 100%; padding: 10px 12px; color: #ff9b96; background: rgba(255,105,97,.07); border: 1px solid rgba(255,105,97,.18); border-radius: 11px; font-size: 11px; }
.profile-form-error[hidden] { display: none !important; }

.profile-confirm-dialog { width: min(420px,calc(100% - 32px)); margin: auto; padding: 25px; color: #f5f5f7; background: #171719; border: 1px solid #3a3a3e; border-radius: 20px; }
.profile-confirm-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.profile-confirm-dialog__mark { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 14px; color: #ff9b96; background: rgba(255,105,97,.09); border-radius: 50%; font-size: 22px; }
.profile-confirm-dialog h2 { margin: 0; font: 600 20px/1.2 var(--font-sf-pro-display); }
.profile-confirm-dialog p { margin: 8px 0 20px; color: #9a9a9f; font-size: 12px; line-height: 1.5; }
.profile-confirm-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.profile-toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; max-width: min(420px,calc(100vw - 32px)); padding: 12px 16px; color: #eaffff; background: #15191a; border: 1px solid rgba(0,229,255,.24); border-radius: 13px; font-size: 12px; box-shadow: 0 10px 36px rgba(0,0,0,.35); }
.profile-toast[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .profile-layout { width: min(100% - 36px,1376px); grid-template-columns: 224px minmax(0,1fr); }
  .profile-content { padding: 28px 26px 54px; }
  .profile-photo-panel { grid-template-columns: 1fr; }
  .profile-photo__controls { grid-template-columns: 96px minmax(0,230px); }
}
@media (max-width: 820px) {
  .profile-layout { width: min(100% - 32px,720px); min-height: 0; display: flex; flex-direction: column; }
  .profile-sidebar { position: static; width: 100%; min-height: 0; padding: 16px 0 0; border-right: 0; }
  .profile-sidebar__top { padding: 0 2px 13px; border-bottom: 0; }
  .profile-avatar--sidebar { width: 42px; height: 42px; }
  .profile-nav { flex-direction: row; gap: 6px; overflow-x: auto; padding: 0 0 12px; border-bottom: 1px solid #242427; scrollbar-width: thin; }
  .profile-nav__item { width: auto; min-height: 40px; flex: 0 0 auto; padding-inline: 11px; font-size: 11px; }
  .profile-nav__item svg { width: 16px; height: 16px; }
  .profile-sidebar__bottom { display: flex; flex-direction: row; justify-content: flex-end; gap: 5px; margin-top: 4px; padding: 0 0 10px; border: 0; }
  .profile-sidebar__bottom .profile-nav__item { width: auto; min-height: 36px; padding-inline: 10px; font-size: 10px; }
  .profile-content { max-width: none; padding: 22px 0 48px; }
  .profile-welcome { min-height: 160px; }
}
@media (max-width: 560px) {
  .profile-header { min-height: 56px; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 16px; }
  .profile-header__title { display: none; }
  .profile-header__home { min-height: 36px; padding-inline: 11px; font-size: 11px; }
  .profile-layout { width: calc(100% - 28px); }
  .profile-sidebar { padding-top: 12px; }
  .profile-nav { margin-inline: -14px; padding-inline: 14px; }
  .profile-content { padding-top: 16px; }
  .profile-welcome { min-height: 0; gap: 12px; padding: 20px 17px; border-radius: 17px; }
  .profile-welcome h1 { font-size: clamp(23px,7vw,30px); }
  .profile-welcome__copy > p:last-child { max-width: 34ch; margin-top: 8px; font-size: 11px; }
  .profile-eyebrow { margin-bottom: 8px; font-size: 9px; }
  .profile-avatar--welcome { width: 60px; height: 60px; margin: 0; font-size: 23px; }
  .profile-stats { gap: 7px; margin: 10px 0 30px; }
  .profile-stat { min-height: 72px; padding: 11px 10px; border-radius: 12px; }
  .profile-stat__label { font-size: 9px; line-height: 1.3; }
  .profile-stat__value { font-size: 21px; }
  .profile-section__heading { align-items: flex-start; margin-bottom: 14px; }
  .profile-section__title { font-size: 23px; }
  .profile-section__subtitle { max-width: 34ch; font-size: 11px; }
  .profile-section__link { max-width: 100px; font-size: 10px; text-align: right; }
  .profile-order-filters { margin-inline: -2px; }
  .profile-filter { min-height: 34px; padding-inline: 10px; font-size: 10px; }
  .order-card { padding: 13px; border-radius: 15px; }
  .order-card__head { align-items: flex-start; }
  .order-badge { max-width: 48%; text-align: center; white-space: normal; }
  .order-item { gap: 9px; padding: 8px; }
  .order-item__thumb { width: 46px; height: 46px; }
  .order-item__price { font-size: 11px; }
  .order-card__footer { align-items: flex-end; }
  .order-card__total { font-size: 15px; }
  .profile-photo-panel, .profile-form { padding: 17px; border-radius: 16px; }
  .profile-photo-panel { gap: 18px; }
  .profile-photo__controls { grid-template-columns: 76px minmax(0,1fr); gap: 10px; }
  .profile-avatar--large { width: 76px; height: 76px; font-size: 27px; }
  .profile-photo__actions .profile-btn { width: 100%; }
  .profile-panel__heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .profile-form__footer > .profile-btn { width: 100%; }
  .profile-confirm-dialog { padding: 20px; }
  .profile-confirm-dialog__actions { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .profile-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
