/* MostlyID /settings — the page's styles (moved out of settings.html, F307, to keep the page under
   the 800-line cap). Tokens are shared with /mid/org-home.css and /mid/enterprise.css. */
:root {
  --accent: #5b5bd6;
  --accent-hover: #4a4ac4;
  --midnight: #14142b;
  --ink: #1a1a2e;
  --muted: #6a6a85;
  --line: #e7e7f0;
  --bg-soft: #f6f6fb;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); color: var(--ink); background: #fff; }

/* ── shared control styles for the wallet + organization tabs ── */
h2 { font-size: 22px; letter-spacing: -0.025em; margin: 0 0 6px; }
.sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 0 0 22px; }
/* F307: the provider's letter tile on "Continue with Okta" / "Taking you to Okta…". */
.idp-tile { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 6px; background: rgba(255,255,255,.2); font-size: 12px; font-weight: 800; vertical-align: -5px; }
.sso-taking .idp-tile { background: #eef0f5; color: #1d2b53; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin: 0 0 7px; }
input { width: 100%; font: inherit; font-size: 15px; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .6rem; background: #fff; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[readonly] { background: var(--bg-soft); color: var(--muted); }
select, textarea { width: 100%; font: inherit; font-size: 15px; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .6rem; background: #fff; color: var(--ink); }
select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; min-height: 68px; line-height: 1.45; }
button { font: inherit; font-weight: 650; font-size: 15px; color: #fff; background: var(--accent); border: 0; border-radius: .6rem; padding: .72rem 1rem; cursor: pointer; transition: background .15s; }
button:hover { background: var(--accent-hover); }
button.ghost { background: var(--bg-soft); color: var(--accent); }
button.ghost:hover { background: #ececf6; }
button.full { width: 100%; }
button.sm { padding: .4rem .7rem; font-size: 12.5px; font-weight: 600; }
button.danger { background: var(--bg-soft); color: #b4232a; }
button.danger:hover { background: #f7e9ea; }
button:disabled { opacity: .55; cursor: default; }
.row { margin: 14px 0; }
.msg { font-size: 13px; line-height: 1.5; margin-top: 12px; }
.msg.ok { color: #1a7f5a; } .msg.err { color: #b4232a; } .msg.muted { color: var(--muted); }
.foot { color: var(--muted); font-size: 12px; margin-top: 26px; }
.section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.section h3 { font-size: 14px; margin: 0 0 4px; }
.section .sub { margin-bottom: 12px; font-size: 13px; }
.optin-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; margin: 10px 0; cursor: pointer; }
.optin-row input { width: auto; margin: 2px 0 0; flex: none; }
.card-note { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); padding: 14px 16px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.card-note b { color: var(--ink); }
.sub-list { display: grid; gap: 10px; }
.sub-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.sub-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sub-card-head strong { font-size: 15px; letter-spacing: -0.01em; }
.sub-card-meta { font-size: 13px; color: var(--ink); margin-top: 3px; }
.sub-card-meta.muted { color: var(--muted); }
.sub-status { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); }
.sub-status-active, .sub-status-trialing { background: color-mix(in srgb, #1a7f5a 14%, #fff); color: #1a7f5a; }
.sub-status-past_due, .sub-status-unpaid { background: color-mix(in srgb, #b4232a 12%, #fff); color: #b4232a; }
.sub-status-comped { background: color-mix(in srgb, var(--accent) 15%, #fff); color: var(--accent); }
.sub-status-free { background: var(--bg-soft); color: var(--muted); }
.sub-status-internal { margin-left: 8px; background: #fff4e0; color: #9a5b00; vertical-align: 1px; }
.sub-card-action { margin-top: 10px; }
.sub-upgrade { display: inline-block; font-size: 12.5px; font-weight: 650; padding: .4rem .74rem; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; }
.sub-upgrade:hover { opacity: .9; }
/* wallet */
/* Personal / organization wallet context switcher (F203 org-scoped billing) */
.ctx-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.ctx-switch button { font-size: 12.5px; font-weight: 650; padding: .42rem .7rem; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.ctx-switch button:hover { background: #ececf6; }
.ctx-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.ctx-note { font-size: 12.5px; color: var(--muted); margin: -6px 0 14px; }
.balance-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--bg-soft); margin: 0 0 16px; }
.balance-card .amount { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.balance-card .mode { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); margin-left: 8px; vertical-align: 6px; }
.balance-card .cardline { font-size: 13px; color: var(--muted); margin-top: 6px; }
.topups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.topup-custom { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.topup-custom input { padding: .55rem .7rem; }
.ar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ar-mandate { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--muted); cursor: pointer; }
.ar-mandate input { width: auto; padding: 0; margin: 3px 0 0; flex: none; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.switch input { width: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ledger th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger td.svc { white-space: normal; max-width: 11em; overflow-wrap: anywhere; }
.ledger .amt-debit { color: #b4232a; font-variant-numeric: tabular-nums; }
.ledger .amt-credit { color: #1a7f5a; font-variant-numeric: tabular-nums; }
.ledger .bal { color: var(--muted); font-variant-numeric: tabular-nums; }
.ledger-empty { color: var(--muted); font-size: 13px; }
.ledger-more { margin-top: 10px; }
.ledger-wrap { overflow-x: auto; }
/* organization */
.org-switch { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; }
.org-switch select { flex: 1; min-width: 0; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 600; }
.org-switch button { white-space: nowrap; }
.org-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--bg-soft); margin: 0 0 18px; }
.org-card .name { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.org-card .role { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); margin-left: 8px; vertical-align: 5px; }
.seats { margin-top: 12px; }
.seats .seatline { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 6px; }
.seats .seatline b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bar { height: 7px; border-radius: 999px; background: #e7e7f0; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar.full > span { background: #b4232a; }
.list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; }
.item .who { min-width: 0; flex: 1; }
.item .who .email { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.item .who .meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.item .who .meta .you { color: var(--accent); font-weight: 600; }
/* The reason a control is missing. It sits with the MEMBER rather than in the page's
   message line, because it is a fact about that row and is true continuously — a toast
   would say it once, at a moment nobody was asking. */
.item .who .why { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.item .acts { display: flex; align-items: center; gap: 8px; flex: none; }
.item .acts select { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font-size: 12.5px; font-weight: 600; }
/* The org's future web address, shown as it is typed. Mono so the shape of the name is
   legible — this is the one field whose exact characters are permanent. */
.slug-prev { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  color: var(--accent); margin-top: 6px; overflow-wrap: anywhere; }
.slug-warn { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 6px 0 0; }
.slug-warn b { color: var(--ink); }
.pill { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #eeeef6; color: var(--muted); flex: none; }
.invite-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.invite-form input { padding: .6rem .75rem; }
.empty { color: var(--muted); font-size: 13px; }
.banner { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; margin: 0 0 18px; }
.banner.ok { background: #e8f6ef; color: #1a7f5a; border: 1px solid #bfe7d5; }
.banner.err { background: #f9ecec; color: #b4232a; border: 1px solid #eecccd; }

/* ── signed-out sign-in card ── */
.signin-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg-soft); }
.signin { width: 100%; max-width: 26rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px; box-shadow: 0 12px 40px rgba(20,20,43,.06); }
.signin .form-mark { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 28px; }
.signin .form-mark img { width: 30px; height: 30px; border-radius: 9px; }
.signin .form-mark b { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.signin .form-mark b span { color: var(--accent); }

/* ── the settings shell ── */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidenav { background: var(--bg-soft); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 16px; gap: 6px; }
.sn-brand { display: inline-flex; align-items: center; gap: 9px; padding: 4px 8px 14px; }
.sn-brand img { width: 26px; height: 26px; border-radius: 8px; }
.sn-brand b { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.sn-brand b span { color: var(--accent); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; user-select: none; }
.nav a:hover { background: #ececf6; color: var(--ink); }
.nav a.active { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.nav-foot .who-email { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; margin: 0 4px 8px; }
.nav-foot button { width: 100%; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 20px 32px; position: sticky; top: 0; background: rgba(255,255,255,.9); backdrop-filter: saturate(140%) blur(6px); z-index: 5; }
.topbar h1 { font-size: 20px; letter-spacing: -0.02em; margin: 0; }
.content { padding: 32px; }
.content-col { max-width: 640px; }
.menu-toggle { display: none; background: var(--bg-soft); color: var(--accent); padding: .5rem .7rem; font-size: 14px; }
.backdrop { display: none; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidenav {
    position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 30;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(20,20,43,.14);
  }
  .shell.nav-open .sidenav { transform: translateX(0); }
  .shell.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(20,20,43,.34); z-index: 20; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 22px 18px; }
  .topbar { padding: 16px 18px; }
}
