/* Client portal — white page, white cards, black text */

html.account-page-root {
  background: #ffffff;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.account-page--light {
  min-height: 100vh;
  min-height: 100dvh;
  background: #ffffff;
  color: #111111;
}

.account-page--light .navbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.account-page--light .navbar__in {
  min-height: 3.25rem;
  align-items: center;
}

.account-page--light .navbar .btn--ghost {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  color: #111111;
  border-color: rgba(0, 0, 0, 0.14);
}

.account-page--light .account-shell__title,
.account-page--light .account-card__title {
  color: #111111;
}

.account-page--light .account-shell__sub,
.account-page--light .account-gate__eyebrow {
  color: #525252;
}

.navbar__profile {
  position: relative;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
}

.navbar__profile img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.navbar__profile svg {
  width: 1.125rem;
  height: 1.125rem;
}

.account-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.account-gate--open {
  opacity: 1;
  visibility: visible;
}

.account-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.account-gate__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #059669;
}

.account-gate__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  background: #fff;
  color: #71717a;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.account-gate__close:hover {
  color: #111;
  border-color: rgba(0, 0, 0, 0.18);
}

.account-gate__panel {
  position: relative;
  width: min(420px, 100%);
  padding: clamp(1.75rem, 4vw, 2.25rem);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: #111111;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.account-gate__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 4vw, 1.625rem);
  font-weight: 500;
  color: #111111;
}

.account-gate__sub {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #525252;
}

.account-gate__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.account-gate__actions .btn {
  width: 100%;
  justify-content: center;
}

body.account-gate-open {
  overflow: hidden;
}

.account-main {
  position: relative;
  z-index: 2;
  padding: max(5.5rem, calc(4.75rem + env(safe-area-inset-top, 0px))) 0 3rem;
}

.account-shell {
  max-width: var(--mw, 1120px);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 2.5rem);
}

.account-shell__head {
  margin-bottom: 1.75rem;
  text-align: left;
}

.account-shell__title,
.account-card__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.account-shell__sub,
.account-card__sub {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.account-card {
  width: min(480px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.25rem);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: #111111;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.account-card__head {
  margin-bottom: 1.75rem;
  text-align: center;
}

.account-grid {
  display: grid;
  gap: 1rem;
}

.account-panel {
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: #111111;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.account-panel__head {
  margin-bottom: 1rem;
  padding: 1.35rem 1.35rem 0;
}

.account-panel__title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111111;
}

.account-panel__sub {
  margin: 0;
  font-size: 0.875rem;
  color: #525252;
  line-height: 1.5;
}

.account-panel .account-form {
  padding: 0 1.35rem 1.35rem;
}

.account-panel .account-disclosure__body {
  padding: 1.15rem 1.35rem 1.35rem;
}

.account-disclosure {
  border: 0;
}

.account-disclosure__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: 'label meta toggle';
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 1.15rem 1.35rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
}

.account-disclosure__summary::-webkit-details-marker {
  display: none;
}

.account-disclosure__summary::after {
  content: '+';
  grid-area: toggle;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  font-size: 1.05rem;
  line-height: 1;
  color: #111111;
}

.account-disclosure[open] .account-disclosure__summary {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.account-disclosure[open] .account-disclosure__summary::after {
  content: '−';
}

.account-disclosure__label {
  grid-area: label;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111111;
}

.account-disclosure__meta {
  grid-area: meta;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #525252;
  text-align: right;
}

.account-disclosure__body {
  padding-top: 0;
}

.account-disclosure__body > .account-panel__sub {
  margin: 0 0 1.15rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #525252;
}

.account-disclosure__body .account-form {
  gap: 1.1rem;
}

.account-disclosure__body .account-plan-actions {
  margin-top: 0.25rem;
}

.account-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.account-avatar__preview {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.08);
  background: #f5f5f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-avatar__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar__preview svg {
  width: 2.25rem;
  height: 2.25rem;
  opacity: 0.35;
  color: #111111;
}

.account-avatar__upload input {
  display: none;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.account-field-row {
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.55fr;
  gap: 0.75rem;
}

.account-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #525252;
}

.account-field input,
.account-field select,
.account-field textarea {
  width: 100%;
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

.account-field input::placeholder {
  color: #9ca3af;
}

.account-field input:focus,
.account-field select:focus,
.account-field textarea:focus {
  outline: none;
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.account-field__hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #737373;
}

.account-field__hint--center {
  text-align: center;
}

.account-form__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.account-form__actions--inline {
  flex-direction: row;
  flex-wrap: wrap;
}

.account-form__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.account-link {
  border: 0;
  padding: 0;
  background: none;
  color: #111111;
  font: inherit;
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.account-link--below {
  display: block;
  margin-top: 0.5rem;
  text-align: left;
}

.btn--dark {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #111111 !important;
}

.btn--dark-outline {
  background: #ffffff !important;
  color: #111111 !important;
  border: 1px solid rgba(0, 0, 0, 0.18) !important;
}

.btn--danger-outline {
  background: #ffffff !important;
  color: #b91c1c !important;
  border: 1px solid rgba(185, 28, 28, 0.35) !important;
}

.btn--danger-solid {
  background: #b91c1c !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #111111;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.plan-card:hover {
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.plan-card--active {
  border-color: #111111;
  box-shadow: 0 0 0 1px #111111;
}

.plan-card--current {
  background: #fafafa;
}

.plan-card__badge,
.plan-card__current {
  display: inline-flex;
  margin-bottom: 0.1rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-card__badge {
  background: #111111;
  color: #ffffff;
}

.plan-card__current {
  background: #e5e5e5;
  color: #111111;
}

.plan-card--popular .plan-card__badge {
  display: inline-flex;
}

.plan-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
}

.plan-card__price {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.plan-card__price span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #525252;
}

.plan-card__tagline {
  font-size: 0.8125rem;
  color: #525252;
  line-height: 1.45;
}

.plan-card__features {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  font-size: 0.75rem;
  color: #404040;
  line-height: 1.5;
}

.account-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.account-dialog {
  width: min(440px, calc(100% - 2rem));
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: #111111;
}

.account-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.account-dialog__panel {
  padding: 1.5rem;
}

.account-dialog__title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  color: #111111;
}

.account-dialog__text {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #525252;
}

.account-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.account-alert {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(185, 28, 28, 0.25);
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
  line-height: 1.45;
}

.account-alert--ok {
  border-color: rgba(22, 163, 74, 0.25);
  background: #f0fdf4;
  color: #166534;
}

.account-alert[hidden],
.account-setup[hidden] {
  display: none !important;
}

.account-setup {
  padding: 1.25rem 1rem;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 0.875rem;
  color: #525252;
  line-height: 1.55;
  text-align: center;
}

.account-setup a {
  color: #111111;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .account-main {
    padding:
      max(4.75rem, calc(4.25rem + env(safe-area-inset-top, 0px)))
      0
      max(2.5rem, calc(1.5rem + env(safe-area-inset-bottom, 0px)));
  }

  .account-shell {
    padding: 0 1rem;
  }

  .account-shell__head {
    margin-bottom: 1.35rem;
  }

  .account-shell__title {
    font-size: clamp(1.5rem, 6vw, 1.875rem);
  }

  .account-shell__sub {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  .account-grid {
    gap: 1.15rem;
  }

  .account-panel__head {
    padding: 1.2rem 1.1rem 0;
    margin-bottom: 0.85rem;
  }

  .account-panel .account-form {
    padding: 0 1.1rem 1.2rem;
  }

  .account-panel .account-disclosure__body {
    padding: 1.1rem 1.1rem 1.2rem;
  }

  .account-disclosure__summary {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'label toggle'
      'meta toggle';
    align-items: center;
    gap: 0.3rem 0.85rem;
    padding: 1.05rem 1.1rem;
  }

  .account-disclosure__meta {
    text-align: left;
  }

  .account-disclosure__body > .account-panel__sub {
    margin-bottom: 1rem;
  }

  .account-field label {
    margin-bottom: 0.45rem;
    font-size: 0.75rem;
  }

  .account-field input,
  .account-field select,
  .account-field textarea {
    min-height: 3rem;
    padding: 0.85rem 0.95rem;
    font-size: 16px;
  }

  .account-form {
    gap: 1.1rem;
  }

  .account-form__actions,
  .account-form__actions--inline,
  .account-plan-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .account-form__actions .btn,
  .account-form__actions--inline .btn,
  .account-plan-actions .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .plan-cards,
  .account-field-row {
    grid-template-columns: 1fr;
  }

  .plan-card {
    padding: 1.1rem;
  }

  .plan-card__price {
    font-size: 1.35rem;
  }

  .account-card {
    width: 100%;
    margin: 0;
    padding: 1.35rem 1.1rem;
  }

  .account-dialog {
    width: min(440px, calc(100vw - 1.5rem));
    max-width: none;
    margin: auto;
  }

  .account-dialog__panel {
    padding: 1.25rem 1.1rem;
  }

  .account-dialog__text {
    margin-bottom: 1rem;
    line-height: 1.6;
  }

  .account-dialog__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .account-dialog__actions .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .account-alert {
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .navbar__in {
    padding-inline: 1rem;
  }
}
