/* Profile page (migration 0051). --pc-* custom properties only, so both the
   light and dark themes (colors_and_type.css) work with no overrides here. */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* .card sets overflow:hidden to clip its ::before hairline, but the app
     hides that pseudo-element outright, so all the clipping does here is cut
     off the combobox panel at the bottom edge of the card. */
  overflow: visible;
}

.profile-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.profile-card-title svg {
  flex: none;
  color: var(--pc-accent);
}

/* .profile-card is a flex column (default align-items: stretch), which is
   wanted for full-width rows like .profile-photo-row/.profile-inline-form,
   but a standalone button dropped directly in a card (the closed "Change
   email" state) would otherwise stretch edge-to-edge instead of sizing to
   its content. */
.profile-card > .btn {
  align-self: flex-start;
}

.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--pc-accent-soft);
  color: var(--pc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--pc-border);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.profile-photo-actions .btn {
  margin-right: 8px;
}

.profile-hint {
  font-size: 12.5px;
  color: var(--pc-text-muted);
  margin: 0;
}

.profile-current-value {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.profile-pending-email {
  border: 1px dashed var(--pc-border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-pending-email p {
  margin: 0;
}

.profile-inline-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-inline-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.profile-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.profile-full-field {
  grid-column: 1 / -1;
}

.profile-readonly-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.profile-readonly-list > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-readonly-list dt {
  font-size: 12px;
  color: var(--pc-text-muted);
}

.profile-readonly-list dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

/* The Email and Password cards are single-column content by nature, so they
   don't need the two-up grid the Photo/Details/Account cards benefit from at
   wide widths — span both columns to avoid an oddly narrow card next to a
   lot of empty space. */
.profile-grid > section:nth-child(3),
.profile-grid > section:nth-child(4) {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-readonly-list {
    grid-template-columns: 1fr;
  }

  .profile-photo-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Account summary ----------
   Read-only facts about the account, above the editable cards: who this is,
   what they can reach, and how they sign in. Tokens only, so it follows the
   light and dark themes like the rest of the app. */
.profile-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
  margin-bottom: 18px;
}

.profile-summary-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile-avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.profile-summary-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-summary-name strong {
  font-size: 16px;
  color: var(--pc-text);
}

.profile-summary-name span {
  font-size: 13px;
  color: var(--pc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-summary-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin: 0;
}

.profile-summary-facts > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.profile-summary-facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pc-text-muted);
}

.profile-summary-facts dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--pc-text);
}

/* ---------- Password requirements ----------
   Shown while typing, so the rules are visible before the server refuses. */
.profile-password-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 4px 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.profile-password-checks li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--pc-text-muted);
}

.profile-password-checks li.is-met {
  color: var(--pc-success);
}

.profile-password-checks svg {
  flex: none;
}

/* A link-looking control inside helper text (for example "Use Asia/Dhaka"). */
.profile-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--pc-accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 760px) {
  .profile-summary {
    gap: 18px;
  }

  .profile-summary-facts {
    gap: 14px 24px;
  }
}

/* Screen-reader-only text. The app had no such helper, so a heading marked
   with it rendered at full size. Keep it in the accessibility tree: the
   summary card needs a heading for structure without showing a title. */
.pc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Personal details is the tall card; let it run the full height of the row so
   Photo and Email stack beside it instead of leaving a dead column. */
@media (min-width: 1180px) {
  .profile-grid > section:nth-child(2) {
    grid-row: span 2;
  }

  .profile-grid > section:nth-child(3) {
    grid-column: 1 !important;
  }
}

/* ---------- Identity banner ----------
   The photo lives here rather than in a card of its own: it is the one piece
   of the page that is a person, not a form field, and pairing it with the
   facts that cannot be edited keeps the forms below to fields only. */
.profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--pc-accent-soft), transparent 58%),
    var(--pc-bg-card);
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-hero-avatar {
  position: relative;
  flex: none;
}

.profile-avatar-xl {
  width: 78px;
  height: 78px;
  font-size: 24px;
  border: 2px solid var(--pc-bg-card);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* The camera button is the whole upload affordance, so it has to look pressable
   and reach the 28px hit area even at this size. */
.profile-avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--pc-border);
  border-radius: 50%;
  background: var(--pc-bg-card);
  color: var(--pc-text);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.profile-avatar-edit:hover:not(:disabled) {
  background: var(--pc-bg-card-soft);
  transform: translateY(-1px);
}

.profile-avatar-edit:disabled {
  cursor: progress;
  opacity: .6;
}

.profile-hero-identity {
  min-width: 0;
}

.profile-hero-identity h2 {
  margin: 0;
  font-size: 20px;
  color: var(--pc-text);
}

.profile-hero-identity > p {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--pc-text-muted);
}

.profile-hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-pill, 999px);
  background: var(--pc-bg-card-soft);
  color: var(--pc-text-muted);
  font-size: 11.5px;
  font-weight: 600;
}

.profile-chip.is-verified {
  border-color: var(--pc-success);
  color: var(--pc-success);
  background: var(--pc-success-soft);
}

.profile-hero-hint {
  max-width: 42ch;
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--pc-text-dim);
}

.profile-hero-facts {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 12px 6px;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: var(--pc-bg-card);
}

.profile-hero-facts > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 16px;
}

/* A hairline between the facts rather than a gap, so the panel reads as one
   block of things nobody can edit here. */
.profile-hero-facts > div + div {
  border-left: 1px solid var(--pc-border);
}

.profile-hero-facts svg {
  flex: none;
  color: var(--pc-text-muted);
}

.profile-hero-facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pc-text-muted);
}

.profile-hero-facts dd {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--pc-text);
}

/* ---------- Tabs ---------- */
.profile-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  background: var(--pc-bg-card);
}

.profile-tabs .analytics-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* A quiet dot on the Security tab when an email change is waiting to be
   confirmed: the one state on this page that needs following up. */
.profile-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pc-warning);
}

/* No align-items: start -- the two columns share the row height, so they end on
   the same line instead of one trailing off above the other. */
.profile-security {
  display: grid;
  gap: 18px;
}

.profile-security-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* The slack goes inside the last card of the shorter column rather than below
   it, and that card's closing note is already pinned to its bottom edge. */
.profile-security-column > .card:last-child {
  flex: 1;
}

@media (min-width: 1180px) {
  /* Stretch, not start: the two cards hold the same row, so they end on the
     same line and their closing callouts sit level. The shorter card's
     callout is pushed down by the margin-top:auto rule below. */
  .profile-security {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .profile-hero {
    padding: 18px;
  }

  .profile-hero-main {
    gap: 14px;
  }

  .profile-avatar-xl {
    width: 62px;
    height: 62px;
    font-size: 20px;
  }

  /* Stacked, the vertical hairline would hang off the side of the second
     fact, so the divider turns with the layout. */
  .profile-hero-facts {
    width: 100%;
    flex-direction: column;
    padding: 6px;
  }

  .profile-hero-facts > div {
    padding: 8px 10px;
  }

  .profile-hero-facts > div + div {
    border-left: 0;
    border-top: 1px solid var(--pc-border);
  }
}


/* ---------- Details tab ---------- */
.profile-details-layout {
  display: grid;
  gap: 18px;
}

@media (min-width: 1180px) {
  .profile-details-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.profile-strength {
  display: grid;
  gap: 16px;
  align-content: start;
}

.profile-strength-meter {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* One conic sweep, driven by the --profile-strength percentage the component
   sets inline, so the number and the arc can never disagree. */
.profile-strength-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--pc-success) var(--profile-strength, 0%), var(--pc-border) 0);
}

.profile-strength-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--pc-bg-card);
}

.profile-strength-ring span {
  position: relative;
  font-size: 20px;
  font-weight: 700;
  color: var(--pc-text);
  font-variant-numeric: tabular-nums;
}

.profile-strength-ring small {
  font-size: 11px;
  font-weight: 600;
  color: var(--pc-text-muted);
}

.profile-strength-meter p {
  margin: 0;
  font-size: 13px;
  color: var(--pc-text-muted);
}

.profile-strength-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-strength-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--pc-text-muted);
}


.profile-strength-list li.is-done {
  color: var(--pc-text);
}



/* ---------- Tabs, restyled as an underline set ----------
   The pill shape the analytics tabs use reads as a filter chip; here the tabs
   switch the whole panel, so the active one is marked with a rule under it. */
.profile-tabs .analytics-tab {
  border-radius: 10px 10px 0 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--pc-text-muted);
}

.profile-tabs .analytics-tab svg {
  color: var(--pc-text-dim);
}

.profile-tabs .analytics-tab.is-active,
.profile-tabs .analytics-tab[aria-selected="true"] {
  border-bottom-color: var(--pc-accent);
  background: var(--pc-accent-soft);
  color: var(--pc-accent);
}

.profile-tabs .analytics-tab.is-active svg,
.profile-tabs .analytics-tab[aria-selected="true"] svg {
  color: var(--pc-accent);
}

/* ---------- Fields with a leading icon ---------- */
.profile-page .field-with-icon {
  position: relative;
  display: block;
}

.profile-page .field-with-icon > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pc-text-dim);
  pointer-events: none;
  z-index: 1;
}

/* !important because the shared field padding is itself declared !important in
   app-ui-production.css; without it the icon sits on top of the text. */
.profile-page .field-with-icon > input,
.profile-page .field-with-icon > select {
  width: 100%;
  padding-left: 36px !important;
}

.profile-page .profile-hint > svg {
  vertical-align: -2px;
  margin-right: 5px;
  color: var(--pc-text-dim);
}

.profile-form-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* ---------- Profile strength ---------- */
.profile-strength-progress {
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.profile-strength-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--pc-border);
  overflow: hidden;
}

.profile-strength-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pc-success);
  transition: width .25s ease;
}

/* The mark is drawn rather than iconised so the empty state is a ring of the
   same size as the filled one and the list does not shift as items complete. */
.profile-strength-mark {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: none;
  border: 1.5px solid var(--pc-border);
  border-radius: 50%;
  color: transparent;
}

.profile-strength-list li.is-done .profile-strength-mark,
.profile-recommendations li.is-done .profile-strength-mark {
  border-color: var(--pc-success);
  background: var(--pc-success);
  color: #fff;
}

.profile-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-bg-card-soft);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--pc-text-muted);
}

.profile-tip svg {
  flex: none;
  margin-top: 1px;
  color: var(--pc-accent);
}


/* ---------- Searchable select ----------
   Matches the plain field controls exactly (they are sized by !important rules
   in app-ui-production.css, so the trigger repeats those values rather than
   inheriting them) and the panel is ours, so it can be searched and sized. */
.profile-combobox {
  position: relative;
}

.profile-combobox-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-bg-card);
  color: var(--pc-text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.profile-combobox-button > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-combobox-button > span.is-placeholder {
  color: var(--pc-text-dim);
}

.profile-combobox-button > svg {
  flex: none;
  color: var(--pc-text-dim);
}

.profile-combobox-button:hover {
  border-color: var(--pc-text-dim);
}

.profile-combobox.is-open .profile-combobox-button,
.profile-combobox-button:focus-visible {
  border-color: var(--pc-accent);
  box-shadow: 0 0 0 3px var(--pc-accent-soft);
  outline: none;
}

.profile-combobox-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;

  display: flex;
  flex-direction: column;
  max-height: 290px;
  overflow: hidden;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: var(--pc-bg-card);
  box-shadow: var(--pc-shadow-elev);
}

.profile-combobox-search {
  position: relative;
  flex: none;
  padding: 8px;
  border-bottom: 1px solid var(--pc-border);
}

.profile-combobox-search > svg {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pc-text-dim);
  pointer-events: none;
}

.profile-combobox-search input {
  width: 100%;
  min-height: 36px !important;
  padding: 0 10px 0 32px !important;
  border: 1px solid var(--pc-border) !important;
  border-radius: 8px !important;
  background: var(--pc-bg-card-soft) !important;
  color: var(--pc-text) !important;
  font-size: 13.5px;
}

.profile-combobox-list {
  flex: 1;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
}

.profile-combobox-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--pc-text);
  cursor: pointer;
}

.profile-combobox-list li > svg {
  margin-left: auto;
  flex: none;
  color: var(--pc-accent);
}

/* Hover and keyboard share one highlight, so arrowing through the list looks
   the same as pointing at it. */
.profile-combobox-list li.is-active {
  background: var(--pc-bg-card-soft);
}

.profile-combobox-list li.is-selected {
  font-weight: 600;
}

.profile-combobox-empty {
  margin: 0;
  padding: 18px 14px;
  font-size: 13px;
  text-align: center;
  color: var(--pc-text-muted);
}


/* Only while a combobox panel is open, so the page does not carry a permanent
   empty strip (or a permanent scrollbar) at the bottom. */
.app .app-content.has-combobox-open {
  padding-bottom: 320px !important;
}


/* ---------- Section headers ----------
   An icon tile, a title and one line saying what the section is for, so each
   card explains itself without a tooltip. */
.profile-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.profile-section-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--pc-accent-soft);
  color: var(--pc-accent);
}

.profile-section-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pc-text);
}

.profile-section-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--pc-text-muted);
}

/* ---------- Read-only value row ---------- */
.profile-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-bg-card-soft);
}

.profile-value-row > svg {
  flex: none;
  color: var(--pc-text-muted);
}

.profile-value-row > span:first-of-type {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--pc-text);
}

.profile-chip.is-pending {
  border-color: var(--pc-warning);
  color: var(--pc-warning);
  background: var(--pc-warning-soft);
}

.profile-inline-actions.is-start {
  justify-content: flex-start;
}

/* ---------- Callouts ----------
   Three tones: quiet for guidance, success for a state worth confirming,
   warning for one that needs acting on. */
.profile-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-bg-card-soft);
}

.profile-callout > svg {
  flex: none;
  margin-top: 1px;
  color: var(--pc-text-muted);
}

.profile-callout > span {
  display: block;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--pc-text-muted);
}

.profile-callout strong {
  display: block;
  font-size: 13px;
  color: var(--pc-text);
}

.profile-callout.is-success {
  border-color: var(--pc-success);
  background: var(--pc-success-soft);
}

.profile-callout.is-success > svg,
.profile-callout.is-success strong {
  color: var(--pc-success);
}

.profile-callout.is-warning {
  border-color: var(--pc-warning);
  background: var(--pc-warning-soft);
}

.profile-callout.is-warning > svg,
.profile-callout.is-warning strong {
  color: var(--pc-warning);
}

/* Pushes a card's closing note to its bottom edge, so cards sitting side by
   side line up along it rather than along whatever their content ends on. */
.profile-card > .profile-callout:last-child {
  margin-top: auto;
}

/* ---------- Password ---------- */
.profile-password-field > input {
  padding-right: 40px !important;
}

.profile-password-reveal {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pc-text-dim);
  cursor: pointer;
}

.profile-password-reveal:hover {
  color: var(--pc-text);
}

.profile-password-rules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 4px;
}

.profile-password-rules > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* A dot between the rules, the way the requirements read as one sentence. */
.profile-password-rules > span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--pc-text-dim);
}

.profile-password-rules > span.is-met {
  color: var(--pc-success);
  font-weight: 600;
}

.profile-password-rules > span.is-met::before {
  color: var(--pc-text-dim);
  font-weight: 400;
}

.profile-security .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* The production button rules force a dark icon colour on every .btn svg;
   on the red primary button that reads as a smudge. */
.profile-page .btn-primary svg {
  color: currentColor !important;
}

.profile-value-note {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pc-text-muted);
}


/* ---------- Login activity ---------- */
.profile-activity-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-activity-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 12px 13px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-bg-card-soft);
}

.profile-activity-fact {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 150px;
}

.profile-activity-fact > svg {
  flex: none;
  color: var(--pc-text-muted);
}

.profile-activity-fact b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--pc-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-activity-fact small {
  display: block;
  font-size: 11px;
  color: var(--pc-text-muted);
}

/* ---------- Account recovery ---------- */
.profile-recovery-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-bg-card-soft);
}

.profile-recovery-row > svg {
  flex: none;
  color: var(--pc-text-muted);
}

.profile-recovery-label {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--pc-text);
}

.profile-recovery-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-size: 13px;
  color: var(--pc-text-muted);
}

.btn.btn-small {
  min-height: 32px !important;
  padding: 0 12px !important;
  font-size: 12.5px !important;
}

/* ---------- Security recommendations ---------- */
.profile-recommendations {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-recommendations li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.profile-recommendations li > span:last-child {
  display: block;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--pc-text-muted);
}

.profile-recommendations strong {
  display: block;
  font-size: 13.5px;
  color: var(--pc-text);
}

.profile-recommendations li .profile-strength-mark {
  margin-top: 2px;
}

/* The "Enable 2FA" button belongs on the header line, not below the list. */
.profile-section-head .btn {
  margin-left: auto;
  flex: none;
  align-self: center;
}

/* ---------- Two-step verification ---------- */
.profile-twofactor-step {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--pc-accent);
  border-radius: 10px;
  background: var(--pc-accent-soft);
}

.profile-code-input {
  width: 140px;
  min-height: 42px !important;
  font-size: 18px !important;
  font-weight: 600;
  letter-spacing: 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.profile-recovery-codes {
  display: grid;
  gap: 12px;
}

.profile-recovery-codes ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-bg-card-soft);
  list-style: none;
}

.profile-recovery-codes li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--pc-text);
}

.profile-twofactor-on {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--pc-border);
}
