.account-document {
  background: var(--surface);
  color: var(--ink);
}

.account-page {
  min-height: calc(100dvh - 64px);
  padding: 40px 40px 128px;
}

.account-page > .breadcrumbs {
  padding-inline: 0;
}

.account-auth,
.account-dashboard {
  font-family: "Montserrat", sans-serif;
}

.account-auth {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(460px, 1.15fr);
  gap: 64px;
  align-items: start;
}

.account-auth__intro h1,
.account-dashboard__header h1,
.account-panel__heading h2 {
  margin: 0;
  font-family: "Radiotechnika", sans-serif;
  font-weight: 400;
  letter-spacing: -.025em;
}

.account-auth__intro h1,
.account-dashboard__header h1 {
  font-size: clamp(40px, 4vw, 62px);
  line-height: 1.08;
}

.account-auth__intro p,
.account-dashboard__header p,
.account-panel__heading p {
  max-width: 620px;
  margin: 20px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-transform: uppercase;
}

.account-auth__content {
  border-top: 2px solid var(--ink);
}

.account-auth__switch,
.account-tabs {
  display: grid;
  border-bottom: 1px solid var(--ink);
}

.account-auth__switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-auth__switch button,
.account-tabs button {
  min-height: 64px;
  padding: 16px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font: 500 12px/1.2 "Montserrat", sans-serif;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}

.account-auth__switch button:last-child,
.account-tabs button:last-child {
  border-right: 0;
}

.account-auth__switch button:hover,
.account-auth__switch button:focus-visible,
.account-auth__switch button[aria-selected="true"],
.account-tabs button:hover,
.account-tabs button:focus-visible,
.account-tabs button[aria-pressed="true"] {
  color: var(--surface);
  background: var(--ink);
  outline: none;
}

.account-form {
  display: grid;
  gap: 24px;
  padding: 40px 0 0;
}

.account-form h2,
.account-form h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.account-form__lead {
  max-width: 560px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.account-form label {
  display: grid;
  gap: 10px;
}

.account-form label > span,
.account-form__note,
.account-form__status {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.account-form input,
.account-form select,
.account-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font: 400 14px/1.4 "Montserrat", sans-serif;
}

.account-form textarea {
  min-height: 84px;
  resize: vertical;
}

.account-form .account-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 620px;
  cursor: pointer;
}

.account-form .account-consent input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  padding: 0;
  border: 1px solid var(--ink);
  accent-color: var(--ink);
}

.account-consent span {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

.account-consent a {
  color: inherit;
  text-underline-offset: 3px;
}

.account-code-input {
  max-width: 260px;
  font-size: 24px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: .28em;
}

.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus {
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

.account-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.account-button {
  display: grid;
  width: max-content;
  min-width: 220px;
  min-height: 52px;
  place-items: center;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  font: 500 11px/1.2 "Montserrat", sans-serif;
  text-align: center;
  cursor: pointer;
}

.account-button--solid {
  color: var(--surface);
  background: var(--ink);
}

.account-button--text {
  min-width: 0;
  min-height: auto;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid currentColor;
}

.account-button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.account-button:hover,
.account-button:focus-visible {
  color: var(--ink);
  background: #fff;
  outline: none;
}

.account-button:active,
.account-auth__switch button:active,
.account-tabs button:active {
  transform: translateY(1px);
}

.account-form__note {
  max-width: 520px;
  margin: -8px 0 0;
  color: var(--muted);
  font-weight: 400;
}

.account-form__status {
  min-height: 1.4em;
  margin: -8px 0 0;
}

.account-dashboard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 64px;
}

.account-dashboard__header > button,
.account-reminder > button,
.account-recipient__heading > button,
.account-notification button {
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  background: transparent;
  font: 500 10px/1.2 "Montserrat", sans-serif;
  cursor: pointer;
}

.account-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.account-tabs button span {
  margin-left: 8px;
  color: var(--muted);
}

.account-tabs button[aria-pressed="true"] span {
  color: inherit;
}

.account-panel {
  padding-top: 64px;
}

.account-panel[hidden] {
  display: none;
}

.account-panel__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 48px;
}

.account-panel__heading h2 {
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.1;
}

.account-panel__heading p {
  margin-top: 4px;
}

.account-orders {
  border-top: 1px solid var(--ink);
}

.account-order {
  display: grid;
  gap: 28px;
  padding: 28px 0 40px;
  border-bottom: 1px solid var(--line);
}

.account-order__heading,
.account-order__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.account-order__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.account-order__details dt { color: var(--muted); font-size: 10px; font-weight: 500; }
.account-order__details dd { margin: 8px 0 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

.account-profile__forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  padding-top: 52px;
}

.account-order__heading > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: baseline;
}

.account-order__heading span,
.account-order__heading strong,
.account-order__total span {
  font-size: 11px;
  font-weight: 500;
}

.account-order__heading time,
.account-order__total small {
  color: var(--muted);
  font-size: 11px;
}

.account-order__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.account-order__item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.account-order__item img {
  width: 92px;
  height: 112px;
  border: 1px solid var(--ink);
  object-fit: cover;
}

.account-order__item h3,
.account-reminder h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.account-order__item p,
.account-reminder p,
.account-reminder small {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.account-order__item b {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.account-order__total {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-order__total strong {
  font-size: 18px;
  font-weight: 500;
}

.account-order__total small {
  flex-basis: 100%;
  text-align: right;
}

.account-reminders-layout,
.account-recipients-layout {
  display: grid;
  grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr);
  gap: 64px;
  align-items: start;
}

.account-reminder-form,
.account-recipient-form {
  padding-top: 0;
}

.account-reminders,
.account-recipients {
  border-top: 1px solid var(--ink);
}

.account-notification,
.account-reminder {
  display: grid;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.account-notification {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.account-notification p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.account-reminder {
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: start;
}

.account-reminder time {
  display: grid;
  gap: 6px;
}

.account-reminder time strong {
  font-size: 13px;
  font-weight: 500;
}

.account-reminder time span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.account-reminder.is-due {
  padding-inline: 16px;
  background: #fbfaf7;
}

.account-recipient {
  display: grid;
  gap: 20px;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--line);
}

.account-recipient__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.account-recipient__heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

.account-recipient dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  margin: 0;
}

.account-recipient dl > div {
  display: grid;
  gap: 6px;
}

.account-recipient dt,
.account-recipient dd,
.account-recipient p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.account-recipient dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

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

.account-empty {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: 48px 0;
  border-top: 1px solid var(--ink);
}

.account-empty--compact {
  border-top: 0;
}

.account-empty h3,
.account-empty p {
  margin: 0;
}

.account-empty h3 {
  font-size: 16px;
  font-weight: 500;
}

.account-empty p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.account-profile {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.account-profile > div {
  min-height: 132px;
  padding: 24px 20px;
  border-right: 1px solid var(--line);
}

.account-profile > div:last-child {
  border-right: 0;
}

.account-profile dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.account-profile dd {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .account-auth,
  .account-reminders-layout,
  .account-recipients-layout,
  .account-profile__forms {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 767px) {
  .account-page {
    min-height: calc(100dvh - 58px);
    padding: 40px 16px 96px;
  }

  .account-auth {
    gap: 48px;
  }

  .account-auth__intro h1,
  .account-dashboard__header h1 {
    font-size: 28px;
    line-height: 1.15;
  }

  .account-auth__intro p,
  .account-dashboard__header p,
  .account-panel__heading p {
    font-size: 12px;
  }

  .account-auth__switch button,
  .account-tabs button {
    min-height: 52px;
    padding: 10px 8px;
    font-size: 9px;
  }

  .account-form {
    gap: 20px;
    padding-top: 32px;
  }

  .account-form__grid,
  .account-panel__heading,
  .account-profile {
    grid-template-columns: 1fr;
  }

  .account-button {
    width: 100%;
    min-width: 0;
  }

  .account-dashboard__header {
    display: grid;
    gap: 20px;
    margin-bottom: 48px;
  }

  .account-dashboard__header > button {
    width: max-content;
  }

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

  .account-tabs button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .account-tabs button:last-child {
    border-bottom: 0;
  }

  .account-panel {
    padding-top: 48px;
  }

  .account-panel__heading {
    gap: 16px;
    margin-bottom: 32px;
  }

  .account-panel__heading h2 {
    font-size: 22px;
    line-height: 1.15;
  }

  .account-reminders-layout,
  .account-recipients-layout {
    gap: 48px;
  }

  .account-notification,
  .account-reminder {
    grid-template-columns: 1fr;
  }

  .account-recipient dl {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .account-order__item {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .account-order__item img {
    width: 78px;
    height: 96px;
    grid-row: span 2;
  }

  .account-order__item b {
    grid-column: 2;
  }

  .account-order__total {
    display: grid;
    grid-template-columns: 1fr auto;
    justify-content: stretch;
  }

  .account-order__total small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .account-profile > div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .account-profile > div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-auth__switch button,
  .account-tabs button {
    transition: none;
  }
}
