.account-page {
  width: min(960px, calc(100% - 32px));
  min-height: calc(100vh - 150px);
  padding-block: clamp(42px, 6vw, 72px) 96px;
}

.account-page__intro {
  max-width: 700px;
  margin-bottom: 26px;
}

.account-page__intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 610;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.account-page__intro > p:last-child {
  max-width: 55ch;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.account-notice {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(33, 151, 151, 0.2);
  border-radius: 16px;
  background: rgba(239, 253, 251, 0.86);
  box-shadow: 0 12px 36px rgba(60, 78, 139, 0.07);
  color: #176f70;
  backdrop-filter: blur(18px);
}

.account-notice--pending {
  border-color: rgba(96, 92, 201, 0.2);
  background: rgba(245, 242, 255, 0.9);
  color: #5845ae;
}

.account-notice--cancelled {
  border-color: rgba(170, 91, 111, 0.18);
  background: rgba(255, 246, 249, 0.9);
  color: #995269;
}

.account-notice .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.account-notice strong,
.account-notice span {
  display: block;
}

.account-notice span {
  margin-top: 2px;
  font-size: 0.7rem;
  opacity: 0.82;
}

.account-card {
  width: min(510px, 100%);
  padding: clamp(24px, 4vw, 32px);
  border: 1px solid rgba(105, 77, 190, 0.15);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(103, 181, 255, 0.12), transparent 22rem),
    rgba(255, 255, 255, 0.84);
  box-shadow: 0 24px 70px rgba(35, 43, 76, 0.1);
  text-align: center;
  backdrop-filter: blur(24px) saturate(140%);
}

.account-card--loading {
  display: grid;
  min-height: 220px;
  place-items: center;
}

.account-card--loading p {
  margin: -52px 0 0;
  color: var(--muted);
}

.account-card h2 {
  margin: 18px 0 9px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.account-card > p {
  color: var(--muted);
}

.account-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-inline: auto;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #7956d2, #b050cf 52%, #4983df);
  box-shadow: 0 13px 28px rgba(104, 71, 190, 0.2);
  color: #fff;
}

.account-card__icon .icon {
  width: 22px;
  height: 22px;
}

.account-login-actions {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 24px;
}

.account-loader {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(108, 80, 200, 0.14);
  border-top-color: #7157d3;
  border-radius: 50%;
  animation: account-spin 800ms linear infinite;
}

.account-panel {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(66, 76, 124, 0.13);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(81, 192, 255, 0.11), transparent 27rem),
    radial-gradient(circle at 0% 100%, rgba(172, 84, 224, 0.09), transparent 25rem),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 75px rgba(36, 44, 82, 0.1);
  backdrop-filter: blur(26px) saturate(145%);
}

.account-panel::before {
  position: absolute;
  top: 0;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #67e5ff, #9273ef, transparent);
  box-shadow: 0 0 18px rgba(93, 119, 232, 0.38);
  content: "";
}

.account-section-tabs {
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(73, 80, 122, 0.1);
  scrollbar-width: none;
}

.account-section-tabs::-webkit-scrollbar {
  display: none;
}

.account-section-tabs a {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
}

.account-section-tabs a:hover,
.account-section-tabs a:focus-visible {
  border-color: rgba(76, 89, 158, 0.22);
  background: rgba(103, 80, 216, 0.08);
  color: var(--text);
}

.account-billing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.account-billing-actions form { margin: 0; }

.account-user {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(73, 80, 122, 0.1);
}

.account-avatar {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background:
    linear-gradient(145deg, #43c9e6, #6b6fdf 52%, #a95bc8);
  box-shadow:
    0 0 0 4px rgba(107, 92, 205, 0.09),
    0 12px 27px rgba(75, 69, 174, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.36);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 880;
  letter-spacing: 0.015em;
}

.account-user__identity {
  min-width: 0;
}

.account-user__identity small,
.account-menu__copy small {
  display: block;
  margin-bottom: 3px;
  color: #7460bf;
  font-size: 0.57rem;
  font-weight: 830;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-user__identity h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.account-user__identity p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-plan-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(142, 105, 198, 0.18);
  border-radius: 999px;
  background: rgba(248, 244, 255, 0.82);
  color: #7752ad;
  font-size: 0.58rem;
  font-weight: 810;
  white-space: nowrap;
}

.account-plan-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 9px currentcolor;
}

.account-plan-pill--active {
  border-color: rgba(34, 154, 141, 0.2);
  background: rgba(236, 252, 249, 0.88);
  color: #238579;
}

.account-plan-pill--admin {
  border-color: rgba(83, 108, 208, 0.2);
  background: rgba(240, 244, 255, 0.88);
  color: #536dcb;
}

.account-plan-pill--attention {
  border-color: rgba(186, 94, 89, 0.22);
  background: rgba(255, 244, 241, 0.9);
  color: #ad504b;
}

.account-menu {
  padding: 7px 22px;
}

.account-menu__row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px 0;
}

.account-menu__row + .account-menu__row {
  border-top: 1px solid rgba(73, 80, 122, 0.09);
}

.account-menu__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #7054c8, #aa5bd0 55%, #4b99de);
  box-shadow: 0 9px 20px rgba(96, 71, 177, 0.16);
  color: #fff;
}

.account-menu__icon--security {
  background: linear-gradient(145deg, #4a67bd, #6d9de1);
}

.account-menu__icon--country {
  background: linear-gradient(145deg, #33869e, #536fd0 55%, #8a5bc1);
}

.account-menu__icon .icon {
  width: 18px;
  height: 18px;
}

.account-menu__copy {
  min-width: 0;
}

.account-menu__copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.account-menu__copy p {
  max-width: 58ch;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.48;
}

.account-menu__price {
  display: inline-block;
  margin-top: 5px;
  color: #5f6483;
  font-size: 0.62rem;
}

.account-menu__price strong {
  color: var(--text);
  font-size: 0.72rem;
}

.account-menu__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.account-menu__actions form {
  display: flex;
  margin: 0;
}

.account-access-pending {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(72, 143, 190, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(218, 242, 255, 0.86), rgba(231, 238, 255, 0.8));
  color: #286887;
  font-size: 0.59rem;
  font-weight: 820;
  text-align: center;
}

.account-country-control {
  display: grid;
  min-width: 220px;
  justify-items: end;
  gap: 6px;
}

.account-country-control label {
  position: relative;
  display: block;
  width: 100%;
}

.account-country-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid rgba(84, 78, 149, 0.16);
  border-radius: 13px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #6d64a1 50%) calc(100% - 17px) 18px / 5px 5px no-repeat,
    linear-gradient(135deg, #6d64a1 50%, transparent 50%) calc(100% - 12px) 18px / 5px 5px no-repeat,
    rgba(250, 250, 254, 0.88);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 760;
}

.account-country-control select:focus-visible {
  border-color: rgba(92, 91, 203, 0.52);
  outline: 3px solid rgba(83, 124, 217, 0.13);
}

.account-custom-brick {
  display: grid;
  width: min(460px, 100%);
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(72, 143, 190, 0.18);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(235, 248, 255, 0.82), rgba(244, 240, 255, 0.78));
}

.account-custom-brick > strong {
  font-size: 0.72rem;
}

.account-custom-brick label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 760;
}

.account-custom-brick input {
  min-width: 0;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(84, 78, 149, 0.16);
  border-radius: 11px;
  background: var(--field-bg, rgba(255, 255, 255, 0.86));
  color: var(--text);
  font: inherit;
  font-size: 0.7rem;
}

.account-custom-brick__dimensions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.account-custom-brick > small {
  min-height: 1em;
  color: var(--muted);
  font-size: 0.56rem;
}

.account-country-status {
  min-height: 1em;
  color: var(--muted);
  font-size: 0.55rem;
}

.account-menu__row--calculations {
  align-items: start;
}

.account-menu__icon--calculation {
  margin-top: 3px;
  background: linear-gradient(145deg, #4975c6, #6e52c8 55%, #b25ebe);
}

.account-menu__row--calculations .account-menu__copy {
  grid-column: 2 / -1;
}

.account-calculation-form {
  display: grid;
  gap: 12px;
  margin-top: 17px;
  padding: 15px;
  border: 1px solid rgba(84, 78, 149, 0.13);
  border-radius: 17px;
  background: rgba(247, 249, 253, 0.72);
}

.account-calculation-form__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-calculation-field {
  display: grid;
  gap: 5px;
}

.account-calculation-field > span:first-child {
  color: #555f74;
  font-size: 0.59rem;
  font-weight: 780;
}

.account-calculation-field > span:last-child {
  display: flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid rgba(84, 78, 149, 0.17);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.account-calculation-field input,
.account-custom-value input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.69rem;
}

.account-calculation-field input {
  padding: 0 11px;
}

.account-calculation-field i {
  padding-right: 10px;
  color: var(--muted);
  font-size: 0.55rem;
  font-style: normal;
  white-space: nowrap;
}

.account-calculation-field > span:last-child:focus-within,
.account-custom-value:focus-within {
  border-color: rgba(92, 91, 203, 0.5);
  box-shadow: 0 0 0 3px rgba(83, 124, 217, 0.1);
}

.account-custom-values {
  display: grid;
  gap: 8px;
  padding-top: 3px;
}

.account-custom-values > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.account-custom-values header div {
  display: grid;
  gap: 2px;
}

.account-custom-values header strong {
  font-size: 0.65rem;
}

.account-custom-values header span {
  color: var(--muted);
  font-size: 0.55rem;
}

.account-add-value {
  padding: 6px 9px;
  border: 1px solid rgba(96, 74, 177, 0.18);
  border-radius: 9px;
  background: rgba(245, 242, 255, 0.84);
  color: #6246b2;
  cursor: pointer;
  font: inherit;
  font-size: 0.57rem;
  font-weight: 800;
}

.account-custom-value {
  display: grid;
  grid-template-columns: 1.7fr 0.75fr 0.8fr 30px;
  min-height: 38px;
  border: 1px solid rgba(84, 78, 149, 0.14);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.account-custom-value input {
  padding: 0 9px;
  border-right: 1px solid rgba(84, 78, 149, 0.1);
}

.account-custom-value button {
  border: 0;
  background: rgba(172, 76, 98, 0.06);
  color: #a0465b;
  cursor: pointer;
  font-size: 1rem;
}

.account-calculation-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-calculation-actions small {
  color: var(--muted);
  font-size: 0.55rem;
}

.button--compact {
  min-height: 38px;
  padding: 0 15px;
  font-size: 0.66rem;
}

.button--compact .icon {
  width: 14px;
  height: 14px;
}

.account-text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #6246b2;
  cursor: pointer;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
}

.account-text-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 150ms ease;
}

.account-text-link:hover .icon {
  transform: translateX(3px);
}

.account-text-link--button {
  padding: 5px 0;
}

.account-panel__footer {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 22px;
  border-top: 1px solid rgba(73, 80, 122, 0.1);
  background: rgba(247, 248, 253, 0.46);
}

.account-panel__footer > span {
  color: var(--muted);
  font-size: 0.61rem;
}

.account-panel__footer form {
  display: flex;
  margin: 0;
}

@keyframes account-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .account-menu__row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .account-menu__actions,
  .account-menu__row > .account-text-link,
  .account-country-control {
    grid-column: 2;
    justify-self: start;
  }

  .account-country-control {
    width: min(290px, 100%);
    justify-items: start;
  }

  .account-menu__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .account-menu__row--calculations .account-menu__copy {
    grid-column: 1 / -1;
  }

  .account-calculation-form__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .account-page {
    width: min(100% - 22px, 960px);
    padding-block: 34px 70px;
  }

  .account-page__intro h1 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .account-panel {
    border-radius: 20px;
  }

  .account-user {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 17px;
  }

  .account-avatar {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .account-plan-pill {
    grid-column: 2;
    width: max-content;
    margin-top: 2px;
  }

  .account-menu {
    padding-inline: 17px;
  }

  .account-menu__row {
    min-height: 0;
    padding-block: 17px;
  }

  .account-menu__actions,
  .account-menu__actions form,
  .account-menu__actions .button {
    width: 100%;
  }

  .account-menu__actions .button {
    justify-content: center;
  }

  .account-panel__footer {
    padding-inline: 17px;
  }
}

:root[data-theme="dark"] .account-panel,
:root[data-theme="dark"] .account-card {
  border-color: var(--line);
  background:
    radial-gradient(circle at 100% 0%, rgba(69, 138, 198, 0.14), transparent 25rem),
    radial-gradient(circle at 0% 100%, rgba(118, 71, 157, 0.12), transparent 24rem),
    linear-gradient(145deg, rgba(23, 29, 40, 0.97), rgba(13, 17, 25, 0.95));
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .account-notice,
:root[data-theme="dark"] .account-plan-pill,
:root[data-theme="dark"] .account-access-pending,
:root[data-theme="dark"] .account-custom-value {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(25, 40, 48, 0.94), rgba(18, 27, 37, 0.96));
  color: var(--text-soft);
}

:root[data-theme="dark"] .account-country-control select,
:root[data-theme="dark"] .account-calculation-field input,
:root[data-theme="dark"] .account-custom-brick input {
  border-color: var(--line);
  background: var(--field-bg);
  color: var(--text);
}

:root[data-theme="dark"] .account-custom-brick {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(25, 40, 48, 0.94), rgba(18, 27, 37, 0.96));
}

@media (max-width: 520px) {
  .account-custom-brick__dimensions {
    grid-template-columns: 1fr;
  }
}
