.account-page {
  background: #f7f7f5;
}

/* Author display:grid/flex must not override the hidden attribute */
.account-auth [hidden],
.account-split[hidden],
.account-panel[hidden],
.account-tab-panel[hidden],
#auth-panels[hidden],
#profile-panel[hidden] {
  display: none !important;
}

.account-shell {
  width: min(1100px, calc(100% - 40px));
  margin: 48px auto 72px;
}

.account-page-title {
  margin: 0 0 36px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111;
}

.account-page-lead {
  margin: -20px auto 28px;
  text-align: center;
  color: #777771;
  max-width: 42ch;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.account-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
  align-items: start;
}

.account-col h2,
.account-panel h2 {
  margin: 0 0 22px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
}

.account-col-new p {
  margin: 0 0 28px;
  color: #555;
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 36ch;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-form-wide {
  max-width: 640px;
  margin: 0 auto;
}

.account-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.account-form-grid .full {
  grid-column: 1 / -1;
}

.account-field {
  display: block;
  position: relative;
}

.account-field > span:not(.visually-hidden) {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3a3a38;
}

.account-field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #d5d5d0;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: #111;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.account-field input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.account-field input:disabled {
  background: #f0f0ec;
  color: #777;
}

.account-field-pass input {
  padding-right: 48px;
}

.pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #777;
  cursor: pointer;
  border-radius: 8px;
}

.pass-toggle:hover {
  color: #111;
  background: rgba(17, 17, 17, 0.05);
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 4px;
}

.account-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.account-check input {
  width: 16px;
  height: 16px;
  accent-color: #111;
}

.account-text-link,
.account-otp-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.account-otp-link {
  display: block;
  width: 100%;
  margin-top: 18px;
  text-align: center;
  font-weight: 500;
}

.account-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.account-btn:hover {
  background: #2a2a2a;
}

.account-btn:active {
  transform: scale(0.98);
}

.account-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.account-btn-ghost {
  background: transparent;
  color: #111;
  border: 1px solid rgba(17, 17, 17, 0.22);
}

.account-btn-ghost:hover {
  background: rgba(17, 17, 17, 0.04);
}

.account-col .account-btn {
  width: 100%;
  margin-top: 6px;
}

.account-panel {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 28px 32px;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 14px;
}

.account-panel.account-form-wide,
#form-profile.account-panel {
  max-width: 640px;
}

.account-back {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0 0 16px;
  font: inherit;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
}

.account-back:hover {
  color: #111;
}

.account-hint {
  margin: 0 0 16px;
  color: #777771;
  font-size: 0.92rem;
  line-height: 1.45;
}

.account-optional {
  font-style: normal;
  font-weight: 400;
  color: #777771;
}

.account-msg {
  margin: 0 auto 18px;
  max-width: 640px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #eef6ee;
  color: #1b5e20;
  border: 1px solid rgba(27, 94, 32, 0.2);
}

.account-msg.is-error {
  background: #fdecea;
  color: #b71c1c;
  border-color: rgba(183, 28, 28, 0.25);
}

.account-otp-actions,
.account-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
}

.account-otp-actions .account-btn {
  flex: 1 1 auto;
  min-width: 140px;
}

.account-profile {
  max-width: none;
  margin: 0;
}

.account-page .account-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.account-page .account-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 10px 0;
  background: #fff;
  border: 1px solid #dcdcd6;
  border-radius: 2px;
  overflow: hidden;
}

.account-page .account-nav-link,
.account-page button.account-nav-link {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  border-left: 3px solid transparent !important;
  outline: none;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 0;
  height: auto;
  padding: 13px 20px;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  color: #2a2a2a !important;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.account-page .account-nav-link:hover,
.account-page button.account-nav-link:hover {
  background: #f5f5f2 !important;
  color: #111 !important;
}

.account-page .account-nav-link.is-active,
.account-page button.account-nav-link.is-active {
  border-left-color: #111 !important;
  font-weight: 650;
  color: #111 !important;
  background: #f0f0ec !important;
}

.account-page .account-text-link {
  color: #111 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none !important;
  border: 0 !important;
  padding: 0;
  min-height: 0;
  font-size: inherit;
  font-weight: inherit;
  border-radius: 0;
}

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

.account-tab-panel.account-panel {
  max-width: none;
  margin: 0;
}

.account-dash-hello {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #222;
  line-height: 1.5;
}

.account-dash-not {
  font-weight: 400;
  color: #555;
}

.account-subhead {
  margin: 28px 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
}

.account-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.account-table th,
.account-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  vertical-align: middle;
}

.account-table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
  font-weight: 650;
}

.account-status {
  text-transform: capitalize;
}

.account-empty {
  margin: 8px 0 0;
  color: #777771;
  font-size: 0.95rem;
}

.account-empty a {
  color: #111;
}

.account-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

.account-address-card {
  padding: 18px 18px 20px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  background: #fafaf8;
}

.account-address-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.account-address-card .account-text-link {
  display: inline-block;
  margin-bottom: 12px;
}

.account-address-body {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.55;
}

.account-btn-sm {
  min-height: 36px;
  padding: 0 16px;
  font-size: 0.85rem;
}

.account-success-popup {
  border-radius: 14px;
}

.account-success-popup .success-check {
  background: #111;
}

.account-success-popup .account-btn {
  min-width: 140px;
}

@media (max-width: 860px) {
  .account-page .account-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .account-page .account-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 8px 0;
  }

  .account-page .account-nav-link,
  .account-page button.account-nav-link {
    width: 100%;
    border-left: 3px solid transparent !important;
    border-bottom: 0 !important;
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .account-page .account-nav-link.is-active,
  .account-page button.account-nav-link.is-active {
    border-left-color: #111 !important;
  }

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

@media (max-width: 760px) {
  .account-shell {
    margin: 28px auto 56px;
  }

  .account-page-title {
    margin-bottom: 28px;
    font-size: 2.2rem;
  }

  .account-split {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .account-col-new {
    padding-top: 28px;
    border-top: 1px solid rgba(17, 17, 17, 0.1);
  }

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

  .account-panel {
    padding: 22px 18px 26px;
  }
}
