/* Profile page — extends dashboard shell */

:root {
  --prof-purple: var(--dash-accent);
  --prof-purple-soft: var(--dash-surface-hover);
  --prof-card-elevated: var(--dash-elevated);
  --prof-border: rgba(255, 255, 255, 0.08);
  --prof-text: #f4f4f5;
  --prof-danger: #ef4444;
  --prof-danger-soft: rgba(239, 68, 68, 0.12);
  --prof-right-w: 320px;
  --prof-avatar-bg: var(--dash-avatar-bg, #2c2c2e);
  --prof-avatar-fg: var(--dash-avatar-fg, #f4f4f5);
}

body.prof-page {
  --dash-purple: var(--prof-purple);
  --dash-purple-soft: var(--prof-purple-soft);
}

.prof-page .dash-pro__btn {
  background: var(--prof-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.prof-page .dash-search input:focus {
  border-color: var(--dash-border-strong);
  box-shadow: 0 0 0 3px var(--dash-surface-hover);
}



.prof-content {
  padding: var(--dash-content-y, 32px) var(--dash-page-x, 32px);
  padding-left: calc(var(--dash-page-x, 32px) + var(--dash-mobile-nav-gutter, 0px));
  padding-bottom: calc(var(--dash-content-y, 32px) + var(--dash-content-pad-bottom, 0px));
  flex: 1;
  min-width: 0;
  container: prof-content / inline-size;
}

.prof-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, var(--prof-right-w));
  gap: var(--dash-gap, 24px);
  align-items: start;
}

.prof-main {
  display: flex;
  flex-direction: column;
  gap: var(--dash-gap, 24px);
  min-width: 0;
  container: prof-main / inline-size;
}

.prof-aside {
  display: flex;
  flex-direction: column;
  gap: var(--dash-gap, 24px);
  position: sticky;
  top: var(--dash-gap, 24px);
  min-width: 0;
  margin-top: calc(19.5px + 10px + 40px + 6px + var(--dash-gap, 24px));
}

.prof-head {
  margin-bottom: 4px;
}

.prof-head__link {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--dash-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}

.prof-head__link:hover {
  color: var(--prof-purple);
}

.prof-title {
  margin: 0;
  font-family: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: var(--prof-text);
}

.prof-subtitle {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--dash-text-muted);
  line-height: 1.5;
  max-width: 560px;
}

/* Cards */
.prof-card {
  background: var(--dash-card);
  border: none;
  border-radius: var(--dash-radius-card, 20px);
  box-shadow: none;
  overflow: hidden;
  transition: background 150ms ease;
}

.prof-card:hover {
  background: var(--dash-card);
}

.prof-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}

.prof-card__title {
  margin: 0;
  padding: 20px 20px 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--prof-text);
}

.prof-card__head .prof-card__title {
  padding: 0;
}

.prof-card__subtitle {
  margin: 6px 0 0;
  color: var(--dash-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.prof-rows {
  display: flex;
  flex-direction: column;
  padding: 12px 8px 8px;
}

.prof-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(7rem, auto) 16px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.prof-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.prof-row__label {
  font-size: 15px;
  font-weight: 500;
  color: var(--prof-text);
  min-width: 0;
}

.prof-row__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--prof-purple-soft);
  color: var(--prof-purple);
  flex-shrink: 0;
}

.prof-row__value {
  font-size: 14px;
  color: var(--dash-text-muted);
  text-align: right;
  min-width: 0;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-row__value--photo {
  display: flex;
  justify-content: flex-end;
}

.prof-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--prof-avatar-fg);
  background: var(--prof-avatar-bg);
}

.prof-row__chev {
  color: var(--dash-text-muted);
  opacity: 0.6;
  flex-shrink: 0;
  justify-self: end;
}

/* Payment identity */
.prof-payment-id__form {
  padding: 16px 20px 20px;
}

.prof-payment-id__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.prof-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.prof-field span,
.prof-url-mode legend,
.prof-payment-id__sample span {
  color: var(--dash-text-muted);
  font-size: 13px;
  line-height: 1.35;
}

.prof-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--prof-card-elevated);
  color: var(--prof-text);
  font: inherit;
  font-size: 15px;
  padding: 0 14px;
  outline: none;
  box-sizing: border-box;
}

.prof-field input[readonly] {
  color: var(--dash-text-muted);
}

.prof-field input:focus-visible {
  border-color: var(--dash-border-strong);
  box-shadow: 0 0 0 3px var(--dash-surface-hover);
}

.prof-field input:user-invalid {
  border-color: rgba(255, 69, 58, 0.72);
}

.prof-field__hint {
  margin: 10px 0 0;
  color: var(--dash-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.prof-url-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.prof-url-mode legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.prof-url-mode label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--prof-card-elevated);
  color: var(--prof-text);
  font-size: 14px;
  cursor: pointer;
  transition: background 150ms ease;
}

.prof-url-mode input {
  accent-color: var(--prof-text);
}

.prof-url-mode label:has(input:checked) {
  background: rgba(255, 255, 255, 0.08);
}

.prof-payment-id__sample {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.prof-payment-id__sample code {
  color: var(--prof-text);
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.prof-payment-id__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 18px;
  margin-top: 12px;
}

.prof-payment-id__status {
  color: var(--dash-text-muted);
  font-size: 13px;
}

.prof-payment-id__status.is-success {
  color: var(--dash-green);
}

.prof-payment-id__status.is-error {
  color: var(--dash-red);
}

/* Buttons */
.prof-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.prof-btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.prof-btn--primary {
  background: var(--prof-purple);
  color: var(--dash-accent-text, #0a0a0a);
}

.prof-btn--primary:hover {
  background: color-mix(in srgb, var(--prof-purple) 90%, white);
}

.prof-btn--ghost {
  background: var(--prof-card-elevated);
  border: none;
  color: var(--prof-text);
}

.prof-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.prof-btn--block {
  width: 100%;
  margin-top: 16px;
}

/* Badges */
.prof-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.prof-badge--success {
  background: rgba(34, 197, 94, 0.14);
  color: var(--dash-green);
}

.prof-badge--muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--dash-text-muted);
  text-transform: none;
  font-weight: 500;
  font-size: 12px;
}

/* Connected accounts */
.prof-connected {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 16px;
}

.prof-connected__row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  background: var(--prof-card-elevated);
  border: none;
  transition: background 150ms ease;
}

.prof-connected__row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.prof-connected__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.prof-connected__logo img {
  width: 68%;
  height: 68%;
  display: block;
  object-fit: contain;
}

.prof-connected__logo--google {
  background: rgba(255, 255, 255, 0.08);
  color: var(--prof-text);
}

.prof-connected__logo--github {
  background: rgba(255, 255, 255, 0.08);
  color: var(--prof-text);
}

.prof-connected__logo--apple {
  background: rgba(255, 255, 255, 0.08);
  color: var(--prof-text);
}

.prof-connected__logo--slack {
  background: rgba(255, 255, 255, 0.08);
  color: var(--prof-text);
}

.prof-connected__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.prof-connected__name {
  font-size: 15px;
  font-weight: 500;
  color: var(--prof-text);
}

.prof-card__link {
  color: var(--dash-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
  white-space: nowrap;
}

.prof-card__link:hover {
  color: var(--prof-text);
}

/* Sessions */
.prof-sessions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 8px 8px;
}

.prof-session {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px;
  border-radius: 14px;
  background: transparent;
  color: inherit;
}

.prof-session:hover {
  background: rgba(255, 255, 255, 0.04);
}

.prof-session__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--prof-card-elevated);
  color: var(--dash-text-muted);
}

.prof-session--current .prof-session__icon {
  background: var(--prof-purple-soft);
  color: var(--prof-purple);
}

.prof-session__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.prof-session__name {
  color: var(--prof-text);
  font-size: 15px;
  font-weight: 500;
}

.prof-session__meta,
.prof-session__status {
  color: var(--dash-text-muted);
  font-size: 13px;
  line-height: 1.35;
}

.prof-session__status {
  text-align: right;
  white-space: nowrap;
}

/* Right panel */
.prof-panel {
  background: var(--dash-card);
  border: none;
  border-radius: var(--dash-radius-card, 20px);
  padding: 20px;
  box-shadow: none;
  transition: background 150ms ease;
}

.prof-panel:hover {
  background: var(--dash-card);
}

.prof-panel--hero {
  text-align: center;
}

.prof-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.prof-panel__link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dash-text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms ease;
}

.prof-panel__link:hover {
  color: var(--prof-text);
}

.prof-panel__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 24px;
  font-weight: 600;
  color: var(--prof-avatar-fg);
  background: var(--prof-avatar-bg);
}

.prof-panel__name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--prof-text);
}

.prof-panel__email {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--dash-text-muted);
}

.prof-panel__title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--prof-text);
}

.prof-panel__head .prof-panel__title {
  margin-bottom: 0;
}

.prof-meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prof-meta__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prof-meta__row dt {
  font-size: 13px;
  color: var(--dash-text-muted);
  font-weight: 400;
}

.prof-meta__row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--prof-text);
  text-align: right;
}

.prof-action-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, auto) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 8px;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.prof-panel > .prof-panel__title + .prof-action-row {
  margin-top: 0;
}

.prof-action-row + .prof-action-row {
  margin-top: 2px;
}

.prof-action-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.prof-action-row__label {
  font-size: 14px;
  color: var(--prof-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-action-row__icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--prof-card-elevated);
  color: var(--dash-text-muted);
}

.prof-action-row__meta {
  color: var(--dash-text-muted);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.prof-action-row__meta--on {
  color: var(--dash-green);
}

.prof-complete__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.prof-complete__head .prof-panel__title {
  margin-bottom: 0;
}

.prof-complete__pct {
  font-size: 14px;
  font-weight: 600;
  color: var(--prof-purple);
}

.prof-complete__track {
  height: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px;
  overflow: hidden;
  box-sizing: border-box;
}

.prof-complete__bar {
  height: 100%;
  border-radius: 12px;
  background: var(--prof-purple);
  transition: width 400ms ease;
}

.prof-link-btn {
  display: inline-flex;
  width: 100%;
  min-height: 36px;
  margin-top: 16px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--prof-card-elevated);
  color: var(--prof-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms ease;
}

.prof-link-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--prof-text);
}

.prof-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: #151515;
  color: var(--prof-text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.prof-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.prof-dialog__panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}

.prof-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.prof-dialog__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
}

.prof-dialog__close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--prof-text);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
}

.prof-dialog__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--dash-text-muted);
  font-size: 13px;
}

.prof-dialog__input,
.prof-dialog__select {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--prof-text);
  font: inherit;
  padding: 0 14px;
  outline: none;
  box-sizing: border-box;
}

.prof-dialog__select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--dash-text-muted) 50%),
    linear-gradient(135deg, var(--dash-text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.prof-dialog__input:focus,
.prof-dialog__select:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.prof-dialog__error {
  margin: 0;
  color: #ef4444;
  font-size: 13px;
}

.prof-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.prof-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.prof-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@container prof-content (max-width: 860px) {
  .prof-layout {
    grid-template-columns: 1fr;
  }

  .prof-aside {
    position: static;
    margin-top: 0;
  }
}

@container prof-main (max-width: 620px) {
  .prof-card__head {
    align-items: flex-start;
  }

  .prof-row {
    grid-template-columns: 34px minmax(0, 1fr) 16px;
  }

  .prof-row__value {
    grid-column: 2 / 3;
    text-align: left;
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .prof-row__chev {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .prof-payment-id__grid,
  .prof-url-mode {
    grid-template-columns: 1fr;
  }

  .prof-connected__row,
  .prof-session {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .prof-connected__row .prof-btn,
  .prof-session > .prof-badge,
  .prof-session__status {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 800px) {
  .prof-content {
    padding-right: var(--dash-page-x, 20px);
  }
}
