/**
 * resources/css/account.css
 * ApplyRole — profile, security, notifications, alerts, billing, deletion,
 * and the dashboard.
 *
 * A SIDEBAR AND A COLUMN, collapsing to a scrolling tab strip on a phone. The
 * account section is six pages that people move between, and a layout that hides
 * where they are is one where "notification settings" is never found.
 *
 * NO HEX VALUES. Everything from tokens.css — see the note at the top of auth.css.
 *
 * THE DANGER STYLING IS DELIBERATELY RESTRAINED. `.acctcard--danger` gets a border
 * and a heading colour, not a red panel with warning icons. Making the delete page
 * frightening is a way of discouraging people from leaving, and discouraging somebody
 * from leaving is how you get a chargeback instead of a cancellation.
 */

.acct {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 2.5rem;
  align-items: start;
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.acct__main { min-width: 0; }

/* ── The same shell without the nav rail ──────────────────────────────────────
   .acct is a two-column grid because every account page has a sidebar. The apply
   form legitimately wants the shell and has no sidebar, and dropping content into
   a 13rem column because the modifier did not exist is precisely the kind of fault
   that looks fine in the markup. One column, narrower measure — a form nobody has
   to hunt across. */
.acct--single {
  grid-template-columns: minmax(0, 42rem);
  justify-content: center;
  max-width: 52rem;
}

/* Buttons side by side, wrapping rather than overflowing on a phone. */
.acct__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0 0;
}

.acct__list {
  margin: .5rem 0 .75rem;
  padding-left: 1.125rem;
}

.acct__list li {
  margin-bottom: .375rem;
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.acct__title { margin: 0 0 1.5rem; font-size: 1.5rem; letter-spacing: -.02em; }
.acct__h2    { margin: 0 0 .75rem; font-size: 1rem; letter-spacing: -.01em; }
.acct__h3    { margin: 1.25rem 0 .5rem; font-size: .9375rem; }
.acct__lede  { margin: 0 0 1rem; color: var(--ink-2); line-height: 1.6; font-size: .9375rem; }
.acct__note  { margin: 1.5rem 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.acct__rule  { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ─── Sub-navigation ───────────────────────────────────────────────────────── */

.acctnav { display: grid; gap: .125rem; position: sticky; top: 5rem; }

.acctnav__link {
  display: block;
  padding: .5rem .75rem;
  border-radius: 8px;
  font-size: .875rem;
  color: var(--ink-2);
  text-decoration: none;
}

.acctnav__link:hover   { background: var(--surface-2); color: var(--ink); }
.acctnav__link.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* ─── Cards ────────────────────────────────────────────────────────────────── */

.acctcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.acctcard--warn   { border-color: var(--due);  background: var(--due-bg); }
.acctcard--danger { border-color: var(--late); }
.acctcard--danger .acct__h2 { color: var(--late); }

.acctform { display: grid; gap: 1rem; max-width: 26rem; }

.inline { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.field--inline { display: block; }
.field--inline input, .field--inline select { width: auto; min-width: 8rem; }

/* Form controls, inline messages and pills come from forms.css, which both this
   file and auth.css depend on. */

/* ─── Fact lists ───────────────────────────────────────────────────────────── */

.acctfacts { display: grid; grid-template-columns: 11rem 1fr; gap: .625rem 1rem; margin: 0; }
.acctfacts dt { font-size: .8125rem; color: var(--muted); }
.acctfacts dd { margin: 0; font-size: .875rem; color: var(--ink); }


/* ─── Activity log ─────────────────────────────────────────────────────────── */

.acctlog { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }

.acctlog__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
}
.acctlog__row:last-child { border-bottom: 0; }
.acctlog__what { color: var(--ink); }
.acctlog__when,
.acctlog__ip   { color: var(--faint); font-variant-numeric: tabular-nums; }

/* ─── Notification grid ────────────────────────────────────────────────────── */

.prefgrid { width: 100%; border-collapse: collapse; }

.prefgrid th { text-align: left; font-weight: 600; }

.prefgrid thead th {
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
  font-size: .75rem;
  color: var(--muted);
}

.prefgrid__ch { width: 4.5rem; text-align: center; }

.prefgrid__row th,
.prefgrid__row td {
  padding: .875rem .5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prefgrid__row:last-child th,
.prefgrid__row:last-child td { border-bottom: 0; }

.prefgrid__what  { display: grid; gap: .125rem; }
.prefgrid__icon  { font-size: 1rem; }
.prefgrid__label { font-size: .875rem; color: var(--ink); font-weight: 600; }
.prefgrid__blurb { font-size: .75rem; color: var(--muted); line-height: 1.5; font-weight: 400; }

.prefgrid__row.is-locked { opacity: .78; }

.prefgrid input[type="checkbox"] { width: 1.125rem; height: 1.125rem; accent-color: var(--brand); }

/* ─── Usage ────────────────────────────────────────────────────────────────── */

.usage { margin: 1.25rem 0; }
.usage__head { display: flex; justify-content: space-between; font-size: .8125rem; margin-bottom: .5rem; }
.usage__label { color: var(--muted); }
.usage__count { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.usage__bar { height: .5rem; background: var(--line); border-radius: 999px; overflow: hidden; }
.usage__fill { height: 100%; background: var(--brand-grad); border-radius: 999px; }

/* ─── Plans ────────────────────────────────────────────────────────────────── */

.plangrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
}
.plan--featured { border-color: var(--brand); }
.plan--current  { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.plan__name   { margin: 0 0 .5rem; font-size: 1rem; }
.plan__price  { margin: 0; }
.plan__amount { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; }
.plan__period { font-size: .8125rem; color: var(--muted); }
.plan__annual { margin: .125rem 0 0; font-size: .75rem; color: var(--muted); }
.plan__blurb  { margin: .75rem 0 1rem; font-size: .8125rem; color: var(--ink-2); line-height: 1.55; }

.plan__cta--off {
  margin: 0 0 1rem;
  padding: .625rem;
  text-align: center;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
}

.plan__features { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .375rem; }
.plan__feature  { display: flex; gap: .5rem; font-size: .8125rem; line-height: 1.45; color: var(--ink-2); }
.plan__feature span { color: var(--ok); }
.plan__feature.is-off        { color: var(--faint); }
.plan__feature.is-off span   { color: var(--faint); }

/* ─── Alerts ───────────────────────────────────────────────────────────────── */

.alertlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }

.alertlist__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
}
.alertlist__row:last-child { border-bottom: 0; }
.alertlist__row.is-off     { opacity: .55; }

.alertlist__label { margin: 0; font-size: .9375rem; font-weight: 600; }
.alertlist__meta  { margin: .125rem 0 0; font-size: .75rem; color: var(--muted); }
.alertlist__actions { display: flex; gap: .5rem; }


/* ─── Dashboard ────────────────────────────────────────────────────────────── */

.dash { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.dash__title { margin: 0 0 1.5rem; font-size: 1.625rem; letter-spacing: -.025em; }
.dash__h2    { margin: 0 0 .75rem; font-size: 1rem; }
.dash__note  { margin: 0; font-size: .8125rem; color: var(--muted); line-height: 1.55; }

.dash__empty {
  background: var(--surface);
  border: 1px solid var(--brand);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--sh-2);
}
.dash__empty p { color: var(--ink-2); line-height: 1.65; }

.dash__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }

.dash__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.dash__panel--urgent { border-color: var(--st-interview); }

.dash__list { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .5rem; }
.dash__item { display: flex; gap: .625rem; align-items: baseline; font-size: .875rem; }
/* --st-interview is a STAGE colour, and tokens.css says stage colours appear on
   column headers and chips only. Used here as 12px bold text it measured 2.97:1. */
.dash__when { color: var(--orange-ink); font-weight: 700; font-size: .75rem; white-space: nowrap; }
.dash__meta { color: var(--muted); font-size: .75rem; }
.dash__more { font-size: .8125rem; font-weight: 600; }

.dash__stats { display: flex; gap: 1.5rem; margin: 0 0 .75rem; }
.dash__stats dt { font-size: .6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dash__stats dd { margin: .125rem 0 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }

/* ─── Small screens ────────────────────────────────────────────────────────── */

@media (max-width: 48rem) {
  .acct { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.5rem 1rem 3rem; }

  /* The sidebar becomes a scrolling strip rather than stacking six links above the
     content — six full-width rows push the actual page below the fold. */
  .acctnav {
    position: static;
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    -webkit-overflow-scrolling: touch;
  }
  .acctnav__link { white-space: nowrap; }

  .acctfacts { grid-template-columns: 1fr; gap: .25rem 0; }
  .acctfacts dd { margin-bottom: .625rem; }

  .acctlog__row { grid-template-columns: 1fr; gap: .125rem; }

  /* The notification grid keeps its two channel columns — collapsing a table with
     meaningful column headings into stacked rows loses which switch is which. */
  .prefgrid__ch { width: 3.25rem; }
  .prefgrid__blurb { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── The discoverability card ──────────────────────────────────────────────
   A preview of what an employer sees, so it is deliberately styled to look like
   a result in somebody else's product rather than like the rest of this page —
   somebody deciding whether to be visible should be able to tell at a glance
   that they are looking at a foreign object, not at their own profile.        */

.candcard {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  background: var(--surface-2);
  margin: 0 0 1rem;
}

.candcard__headline {
  margin: 0 0 .3rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.candcard__meta {
  margin: 0;
  font-size: .875rem;
  color: var(--muted);
}

.candcard__skills {
  list-style: none;
  margin: .75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.candcard__skill {
  font-size: .8rem;
  padding: .15rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
}

/* ─── The setup checklist ───────────────────────────────────────────────────
 *
 * Shown at the top of a profile page while something is outstanding, and gone the
 * moment it is not. Tinted rather than bordered so it reads as a note about the page
 * rather than as another card competing with the ones below it.
 */
.setup {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  padding: 1.25rem 1.375rem;
  margin-bottom: 1.75rem;
}

.setup__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1rem;
}
.setup__title { margin: 0; font-size: 1.0625rem; letter-spacing: -.01em; }
.setup__lede  { margin: .25rem 0 0; font-size: .8125rem; color: var(--ink-2); line-height: 1.6; max-width: 52ch; }

.setup__count    { margin: 0; text-align: right; flex-shrink: 0; }
.setup__countnum { display: block; font-size: 1.125rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.setup__countword{ display: block; font-size: .6875rem; color: var(--muted); }

.setup__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }

.setup__item { display: flex; gap: .625rem; align-items: flex-start; }

.setup__tick {
  flex: 0 0 auto;
  width: 1.125rem; height: 1.125rem;
  margin-top: .125rem;
  border-radius: 50%;
  border: 1.5px solid var(--brand-line);
  background: var(--surface);
  display: grid; place-items: center;
  font-size: .625rem; font-weight: 800;

  /*
   * NO TEXT COLOUR IN THE EMPTY STATE. The tick glyph is only rendered when the item
   * is done, so setting white here painted white on white — which is invisible by
   * design and indistinguishable, to a contrast reader, from a real fault. Stating
   * the colour only where there is something to colour keeps the rule honest and
   * keeps tests/contrast-audit.php able to check the pair that matters.
   */
}
.setup__item.is-done .setup__tick {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--surface);
}

.setup__text  { min-width: 0; }
.setup__label { display: block; font-size: .875rem; font-weight: 600; }
.setup__item.is-done .setup__label { color: var(--muted); text-decoration: line-through; }
.setup__why   { display: block; margin-top: .1875rem; font-size: .75rem; color: var(--ink-2); line-height: 1.55; max-width: 56ch; }

.setup__dismiss {
  display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap;
  margin-top: 1.125rem; padding-top: .875rem;
  border-top: 1px solid var(--brand-line);
}
.setup__dismissbtn {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: .8125rem; font-weight: 600;
  color: var(--brand); cursor: pointer; text-decoration: underline;
}
.setup__dismissnote { font-size: .75rem; color: var(--muted); }

/* The photo/logo row, shared with the profile pages. */
.wphoto { display: flex; gap: 1rem; align-items: flex-start; }
.wphoto__now {
  flex: 0 0 auto;
  width: 5.5rem; height: 5.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-soft);
  display: grid; place-items: center;
  border: 1px solid var(--line);
}
.wphoto__now img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wphoto__initials { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.wphoto__side { flex: 1 1 auto; min-width: 0; }
.wphoto__side .field { margin-bottom: 0; }
.wphoto__side input[type="file"] { font-size: .8125rem; max-width: 100%; }

/*
 * FIELDS INSIDE A CARD NEED THEIR OWN RHYTHM.
 *
 * `.acctform` is a grid and its gap applies to the form's DIRECT children — so two
 * fields sitting inside an `.acctcard` are not grid items and get nothing. The
 * symptom is the same one that made the auth pages look wrong: a label flush against
 * the hint text of the field above it.
 *
 * An adjacent-sibling rule rather than a blanket margin, so a single field in a card
 * still sits tight to its heading.
 */
.acctcard .field + .field { margin-top: 1.125rem; }
.acctcard .field + .acct__note,
.acctcard .wphoto + .acct__note { margin-top: 1rem; }

/*
 * THE WORK-TYPE CHECKBOXES. A two-column grid rather than a stack: ten stacked
 * checkboxes push the salary field below the fold on a laptop, and the labels are
 * one word each. Collapses to one column where two would squeeze.
 */
.acct__checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem .875rem;
  margin: .25rem 0 .375rem;
}
.acct__checks .check { margin: 0; }
@media (max-width: 480px) {
  .acct__checks { grid-template-columns: 1fr; }
}

/* ── Suspended ─────────────────────────────────────────────────────────────── */
.susp { display: grid; gap: 1rem; }
.susp__icon { margin: 0; font-size: 2.2rem; line-height: 1; }
.susp__lead { margin: -.5rem 0 0; color: var(--ink-2); font-size: 1rem; }
.susp__facts { margin: 0; display: grid; grid-template-columns: 6rem 1fr; gap: .4rem 1rem; padding: 1rem 1.1rem;
  background: var(--late-bg); border: 1px solid var(--late); border-radius: var(--r-3); }
.susp__facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--late); font-weight: 700; }
.susp__facts dd { margin: 0; color: var(--ink); }
.susp__what { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.susp__threads { margin: 0; font-size: .875rem; }
.susp__threads a { margin-right: .5rem; }
.susp__appeal { margin-top: .5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.susp__out { margin: .5rem 0 0; font-size: .875rem; }

/* ── Promotion landing ─────────────────────────────────────────────────────── */
.promoland { display: grid; gap: 1rem; justify-items: start; }
.promoland__badge { margin: 0; display: inline-block; background: var(--brand-grad); color: #fff;
  font-weight: 800; font-size: 1.4rem; padding: .45rem 1.1rem; border-radius: var(--r-pill); letter-spacing: -.01em; }
.promoland__badge--over { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.promoland__code { margin: 0; font-size: 1.05rem; }
.promoland__code b { background: var(--brand-soft); color: var(--brand); border: 1.5px dashed var(--brand-line);
  border-radius: var(--r-2); padding: .3rem .8rem; font-size: 1.15rem; letter-spacing: .06em; margin: 0 .25rem; }
.promoland__ends { color: var(--muted); font-size: .85rem; }
.promoland__kept { margin: 0; color: var(--ok); font-size: .875rem; font-weight: 600; }
.promoland__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }
.promoland__fine { margin: .5rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.6; max-width: 40rem; }

/* Site promo banner (layouts/app) */
.promobar { display: block; text-align: center; background: var(--brand-grad); color: #fff;
  padding: .55rem 1rem; font-size: .85rem; font-weight: 600; text-decoration: none; }
.promobar b { font-weight: 800; }
.promobar:hover { filter: brightness(1.06); }

/* ── Delete page: the rethink card ─────────────────────────────────────────── */
.acct__alts { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
.acct__alts li { padding: .6rem .8rem; background: var(--surface-2); border-radius: var(--r-2); font-size: .9rem; }
