/* ThrivoRA operator portal. Follows the Web Manager design: the ThrivoSign indigo / violet application theme
 * (webManager .../core/css/thrivosign-purple.css + thrivosign-purple-webmanager.css) - indigo chrome band carrying the
 * reversed ThrivoSign logo, a floating white pill navigation bar, a page header (title + description + actions), white
 * rounded cards on a lavender canvas, dense uppercase-header tables, dotted status badges, violet pill buttons.
 * The sign-in page is the standard ThrivoSign one (thrivosign-login.css) and takes nothing from this file: every
 * component rule below is scoped to #app (or .toast), so it cannot reach the sign-in markup.
 * No inline styles anywhere: the page's CSP forbids them. */

:root {
  --bg: #f3f2fa; --panel: #fff; --ink: #17143a; --ink-2: #3a3763; --muted: #6b6a8a; --soft: #7d7c9b; --line: #e3e1f1; --line-2: #cfcce6;
  --sub: #f8f7fd; --hover: #faf9ff; --neutral: #f1f0f8;
  --accent: #5b4ce6; --accent-2: #7a3ff0; --accent-deep: #3b2fb5; --accent-soft: #edeafe; --accent-line: #d9d4fb;
  --ok: #0c8f62; --ok-soft: #e6f6ef; --ok-line: #b6e3d0; --warn: #9a5b00; --warn-soft: #fff4de; --warn-line: #f1dba5;
  --bad: #c62a47; --bad-soft: #fdecef; --bad-line: #f4bcc6;
  --gradient: linear-gradient(135deg, #5b4ce6, #7a3ff0);
  --chrome: radial-gradient(900px 260px at 12% -40%, rgba(122, 63, 240, .45), transparent 70%), radial-gradient(700px 240px at 92% 10%, rgba(18, 179, 166, .22), transparent 70%), linear-gradient(135deg, #0b2a55 0%, #1b2b86 55%, #3b2fb5 100%);
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23, 20, 58, .05), 0 8px 28px rgba(35, 28, 95, .07);
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.55 "Inter", "Segoe UI Variable", "Segoe UI", -apple-system, Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

#app h1, #app h2, #app h3, #app h4 { margin: 0 0 .5rem; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
#app h3 { font-size: 1rem; } #app h4 { font-size: .93rem; }
#app a { color: var(--accent); }
#app a:hover { color: var(--accent-deep); }
#app .muted { color: var(--muted); font-size: .86rem; }
#app .mono { font-family: var(--mono); font-size: .8rem; word-break: break-all; }
#app :focus-visible, .toast :focus-visible { outline: 2px solid #7a63ff; outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 30; background: #0b2a55; color: #fff !important; padding: .4rem .9rem; border-radius: 999px; }
.skip-link:focus { left: .75rem; }

/* ---- chrome band + account ---------------------------------------------------------------------------- */
.topbar { display: flex; align-items: center; gap: .85rem; padding: .85rem 2rem 4.1rem; color: #fff; background: var(--chrome); }
.brand { display: inline-flex; align-items: center; gap: .9rem; min-width: 0; }
.brand__logo { display: block; height: 38px; width: auto; max-width: none; flex: none; }
.brand__product { padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .35); font-weight: 650; font-size: 1.1rem; letter-spacing: .01em; }
.brand__release { padding: .1rem .5rem; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; color: #e6e3fb; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.brand__release[hidden] { display: none; }
.spacer { flex: 1; }
.account { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.account__icon { width: 1.5rem; height: 1.5rem; padding: .25rem; border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; color: #fff; }
.account__name { color: #e6e3fb; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.role-chips { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.role-chip { display: inline-block; padding: .08rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 650; background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.topbar button.link { background: none; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; color: #fff; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600; padding: .22rem .85rem; }
.topbar button.link:hover { background: rgba(255, 255, 255, .16); }
#app .view button.link, #app .table-wrap button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 12px; background: none; color: #fff; cursor: pointer; }
.nav-toggle:hover { background: rgba(255, 255, 255, .14); }

/* ---- floating pill navigation ------------------------------------------------------------------------------ */
.tabs { position: relative; display: flex; gap: .2rem; width: max-content; max-width: calc(100% - 3rem); margin: -2.35rem auto 0 2rem; padding: .3rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 30px rgba(11, 42, 85, .22); overflow-x: auto; white-space: nowrap; z-index: 2; }
.tabs:empty { display: none; }
.tabs button { border: 0; background: none; padding: .5rem 1.05rem; min-height: 38px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s; }
.tabs button:hover { background: var(--accent-soft); color: var(--accent-deep); }
.tabs button[aria-current="page"] { background: var(--gradient); color: #fff; box-shadow: 0 4px 12px rgba(91, 76, 230, .35); }

/* ---- page frame + page header ------------------------------------------------------------------------------- */
.view { padding: 1.6rem 2rem 3rem; max-width: none; margin: 0 auto; outline: none; min-width: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-header__main { min-width: 0; }
.page-header__title { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: 1.5rem !important; line-height: 1.25; margin: 0 0 .15rem !important; }
.page-header__description { margin: 0; color: var(--muted); max-width: 80ch; }
.page-header__actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* ---- cards ---------------------------------------------------------------------------------------------------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.3rem; margin-bottom: 1rem; overflow: hidden; }
#app .card > h3:first-child { margin: -1.1rem -1.3rem 1rem; padding: .8rem 1.3rem; background: #faf9ff; border-bottom: 1px solid var(--line); }
.card--flush { padding: 0; }
.card--flush > .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.card--accent { border-top: 3px solid var(--accent); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 1rem; }
.cols { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
.stat { display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left; cursor: pointer; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: var(--panel); border-radius: var(--radius); padding: .9rem 1.2rem; box-shadow: var(--shadow); font: inherit; color: inherit; transition: transform .1s, box-shadow .15s; }
.stat:hover { box-shadow: 0 2px 4px rgba(23, 20, 58, .06), 0 12px 32px rgba(35, 28, 95, .13); }
.stat:active { transform: translateY(1px); }
.stat .n { font-size: 2rem; font-weight: 700; line-height: 1.2; color: var(--accent-deep); grid-column: 1; }
.stat .l { color: var(--muted); grid-column: 1; }
.stat .icon { grid-column: 2; grid-row: 1 / span 2; width: 1.9rem; height: 1.9rem; color: var(--accent); opacity: .85; }
.stat.ok { border-top-color: var(--ok); } .stat.ok .n, .stat.ok .icon { color: var(--ok); }
.stat.warn { border-top-color: #d9902b; } .stat.warn .n, .stat.warn .icon { color: var(--warn); }
.stat.bad { border-top-color: var(--bad); } .stat.bad .n, .stat.bad .icon { color: var(--bad); }

/* ---- list toolbar (WebManager list screens: search + Search + Filters + Clear, actions on the right) ----------------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .85rem 1.1rem; }
.toolbar__main { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; min-width: 0; }
.toolbar__main > input { width: 280px; max-width: 100%; }
.advfilters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem 1rem; align-items: end; padding: .2rem 1.1rem 1rem; border-top: 1px solid var(--line); padding-top: .9rem; }
#app .advfilters label { margin-top: 0; }
.quick { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; padding: .7rem 1.1rem; border-top: 1px solid var(--line); background: var(--sub); }
.quick__label { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin-right: .1rem; }
.quick__sep { width: 1px; align-self: stretch; background: var(--line-2); margin: 0 .5rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); border-radius: 999px; padding: .2rem .8rem; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.chip:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.chip[aria-pressed="true"] { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 3px 10px rgba(91, 76, 230, .28); }
.listnote { padding: .55rem 1.1rem; border-top: 1px solid var(--line); background: var(--sub); }

/* ---- tables --------------------------------------------------------------------------------------------------------- */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-x: auto; }
#app table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .87rem; }
#app th, #app td { text-align: left; padding: .6rem .85rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
#app th { background: var(--sub); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; white-space: nowrap; }
#app tbody tr:last-child td { border-bottom: 0; }
#app tbody tr:hover td { background: var(--hover); }
#app tr.click { cursor: pointer; }
#app tr.click:hover td { background: var(--accent-soft); }
#app tr.click:focus-visible { outline-offset: -2px; }
#app td.actions, #app th.actions { text-align: right; white-space: nowrap; width: 1%; }
#app td.empty-cell { padding: 0; border-bottom: 0; }
#app tr.attention td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.sub { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }

/* ---- lists: one layout for every list (ra.js table()) --------------------------------------------------------------------
   The record's name is the first column, Created sits before the actions, lists use the whole page width and shrink to fit
   it: long values (ids, serials, references) wrap instead of pushing the action column off screen, so the row's buttons are
   visible at every width. At 720 px and below each row becomes a card (labels from data-label, set by table()). */
.table-wrap { max-width: 100%; }
#app .table-wrap th { white-space: normal; overflow-wrap: normal; }
#app .table-wrap td { overflow-wrap: anywhere; }
#app .table-wrap td.primary { font-weight: 600; min-width: 8rem; }
#app .table-wrap td.primary .sub { font-weight: 400; }
#app .table-wrap .stack { display: block; min-width: 0; }
#app .table-wrap .stack > strong, #app .table-wrap .stack > .mono { display: block; }
#app .table-wrap .sub .mono { font-size: .74rem; }
#app .table-wrap .sub .tag { margin-left: .35rem; white-space: normal; }
#app .table-wrap .pill { white-space: normal; overflow-wrap: normal; }
#app .table-wrap td:not(.primary) .stack > strong { font-weight: 550; }
#app .table-wrap .mono { word-break: break-all; }
#app td.actions .row { margin: 0; gap: .35rem; flex-wrap: nowrap; justify-content: flex-end; }
#app td.actions select { width: auto; min-width: 7rem; max-width: 9rem; flex: 0 1 auto; padding: .3rem .5rem; }
.operator-panel:not(:empty) { margin: .9rem 0 .4rem; padding-top: .8rem; border-top: 1px solid var(--line); }
@media (max-width: 1100px) {
  #app th, #app td { padding: .55rem .6rem; }
  #app td.actions .row { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  #app .table-wrap { border: 0; border-radius: 0; background: none; overflow: visible; }
  .card--flush > .table-wrap { padding: .75rem; }
  #app .table-wrap table, #app .table-wrap tbody, #app .table-wrap tr { display: block; width: auto; }
  #app .table-wrap thead { display: none; }
  #app .table-wrap tbody tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .3rem .85rem .5rem; margin-bottom: .6rem; }
  #app .table-wrap tbody tr:last-child { margin-bottom: 0; }
  #app .table-wrap tbody tr.click:hover, #app .table-wrap tbody tr:hover { background: var(--hover); }
  #app .table-wrap tbody tr.attention { border-left: 3px solid var(--accent); }
  #app .table-wrap td { display: grid; grid-template-columns: minmax(5.5rem, 34%) minmax(0, 1fr); column-gap: .75rem; align-items: start;
    padding: .4rem 0; border-bottom: 1px solid var(--line); background: none !important; box-shadow: none !important; }
  #app .table-wrap tbody tr td:last-child { border-bottom: 0; }
  #app .table-wrap tbody tr:last-child td:not(:last-child) { border-bottom: 1px solid var(--line); }
  #app .table-wrap td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 9; color: var(--muted); font-size: .7rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding-top: .15rem; }
  #app .table-wrap td > * { grid-column: 2; }
  /* the record's name is the card title; the actions sit at the bottom of the card, left aligned */
  #app .table-wrap td.primary, #app .table-wrap td[data-label=""] { display: block; }
  #app .table-wrap td.primary::before, #app .table-wrap td[data-label=""]::before { content: none; }
  #app .table-wrap td.primary { font-size: .95rem; padding-top: .55rem; }
  #app .table-wrap td.actions { width: auto; text-align: left; white-space: normal; padding-top: .6rem; }
  #app td.actions .row { flex-wrap: wrap; justify-content: flex-start; }
  #app .table-wrap td.empty-cell { padding: 0; }
  #app .table-wrap tr:has(> td.empty-cell) { padding: 0; }
}
.dash { color: var(--soft); }

/* ---- empty state ---------------------------------------------------------------------------------------------------------- */
.empty { text-align: center; padding: 2.6rem 1rem; color: var(--muted); }
.empty__icon { display: block; width: 2.5rem; height: 2.5rem; margin: 0 auto .6rem; color: var(--soft); }
.empty__title { margin: 0 0 .15rem; color: var(--ink); font-weight: 600; font-size: 1rem; }
.empty__text { margin: 0; font-size: .88rem; }

/* ---- forms ---------------------------------------------------------------------------------------------------------------------- */
#app label { display: block; font-weight: 600; font-size: .85rem; margin: .65rem 0 .2rem; color: var(--ink-2); }
#app input, #app select, #app textarea { font: inherit; width: 100%; padding: .48rem .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
#app textarea { min-height: 6.5rem; font-family: var(--mono); font-size: .8rem; resize: vertical; }
#app input::placeholder, #app textarea::placeholder { color: var(--soft); }
#app input[type="checkbox"] { width: auto; accent-color: var(--accent); }
#app input[readonly], #app textarea[readonly] { background: var(--sub); }
#app input:focus, #app select:focus, #app textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 76, 230, .18); }
#app .inline label { display: inline-flex; gap: .4rem; align-items: center; font-weight: 500; margin: .3rem .8rem .3rem 0; }
#app .row input, #app .row select { width: auto; min-width: 12rem; flex: 1 1 12rem; max-width: 28rem; }
#app .row input[type="checkbox"] { min-width: 0; flex: none; }
#app .row input[type="file"] { padding: .35rem .5rem; }
#app .toolbar__main > input { width: 280px; flex: 0 1 280px; }
#app .advfilters select, #app .advfilters input { width: 100%; max-width: none; }

/* ---- buttons: pill, violet ------------------------------------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 36px; border: 1px solid transparent; border-radius: 999px; padding: .4rem 1.15rem; font: inherit; font-weight: 600; cursor: pointer; color: #fff; background: var(--gradient); box-shadow: 0 3px 10px rgba(91, 76, 230, .28); transition: filter .15s, box-shadow .15s, transform .1s; }
.btn:hover { filter: brightness(1.07); box-shadow: 0 5px 16px rgba(91, 76, 230, .35); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; filter: none; }
.btn.secondary { background: #fff; color: var(--accent-deep); border-color: var(--line-2); box-shadow: none; }
.btn.secondary:hover { background: var(--accent-soft); border-color: var(--accent); filter: none; }
.btn.danger { background: linear-gradient(135deg, #d1344f, #a81f3a); box-shadow: 0 3px 10px rgba(198, 42, 71, .28); }
.btn.sm { min-height: 30px; padding: .2rem .85rem; font-size: .82rem; box-shadow: none; }
.btn.block { width: 100%; }

/* ---- status badges (dotted pills) ------------------------------------------------------------------------------------------------ */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .08rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 650; line-height: 1.6; white-space: nowrap; background: var(--accent-soft); color: var(--accent-deep); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.neutral { background: var(--neutral); color: var(--muted); }
.pill.lg { font-size: .9rem; padding: .22rem .95rem; }
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .03em; background: var(--accent-soft); color: var(--accent-deep); border: 1px solid var(--accent-line); white-space: nowrap; }
.tag .icon { width: .95em; height: .95em; }

/* ---- notices (alerts) ---------------------------------------------------------------------------------------------------------------- */
.notice { display: flex; gap: .55rem; align-items: flex-start; border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: .6rem .9rem; margin: .6rem 0; background: var(--accent-soft); color: var(--accent-deep); }
.notice > .icon { margin-top: .15rem; }
.notice > .btn { flex: none; margin-left: auto; white-space: nowrap; }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.notice.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.notice.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }

/* ---- application stepper + key/value -------------------------------------------------------------------------------------------------------- */
.steps { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1rem; padding: .6rem .8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.step { padding: .15rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--neutral); color: var(--muted); }
.step.done { background: var(--ok-soft); color: var(--ok); } .step.now { background: var(--gradient); color: #fff; } .step.bad { background: var(--bad-soft); color: var(--bad); }
.kv { display: grid; grid-template-columns: 12rem 1fr; gap: .35rem .9rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .85rem; } .kv dd { margin: 0; word-break: break-word; }

/* ---- application detail: content column + sticky action area -------------------------------------------------------------------------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.detail__main, .detail__aside { min-width: 0; }
.detail__aside { position: sticky; top: .75rem; }
.actions-card { border-top: 3px solid var(--accent); }
.actions-card .state { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.actions-card .btn + .btn { margin-top: .5rem; }
#app .actions-card textarea { min-height: 5rem; font-family: inherit; font-size: .9rem; margin: .3rem 0 .2rem; }
.actions-card .group { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.actions-card .group__label { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin-bottom: .5rem; }

/* ---- online identity verification panel ------------------------------------------------------------------------------------------------------- */
.vcard { border-top: 3px solid var(--accent); }
.vcard.ok { border-top-color: var(--ok); } .vcard.warn { border-top-color: #d9902b; } .vcard.bad { border-top-color: var(--bad); }
.vstatus { display: flex; gap: .8rem; align-items: center; padding: .75rem .9rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-deep); margin-bottom: .9rem; }
.vstatus.ok { background: var(--ok-soft); color: var(--ok); } .vstatus.warn { background: var(--warn-soft); color: var(--warn); } .vstatus.bad { background: var(--bad-soft); color: var(--bad); } .vstatus.neutral { background: var(--neutral); color: var(--muted); }
.vstatus .icon { width: 2rem; height: 2rem; }
.vstatus__label { font-size: 1.15rem; font-weight: 700; line-height: 1.2; letter-spacing: .01em; }
.vstatus__text { font-size: .85rem; opacity: .9; }
#app .vcard textarea.evidence { margin-top: .6rem; min-height: 9rem; }
details > summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); margin: .4rem 0; }

/* ---- KYC verifications ---------------------------------------------------------------------------------------------------------------------------- */
#app .toolbar__main > select { width: auto; min-width: 11rem; flex: 0 1 12rem; }
#app .kyc-note { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
#app .kyc-note textarea { min-height: 4.5rem; font-family: inherit; font-size: .9rem; }
#app .card details h4 { margin-top: .9rem; }
#app .card details .table-wrap { margin-bottom: .6rem; }

/* ---- setup wizard ----------------------------------------------------------------------------------------------------------------------------------- */
#app .setup-h3 .pill { margin-left: .6rem; vertical-align: middle; }
#app .card > h4 { margin-top: 1.1rem; }
#app .setup-sub { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
#app .setup-sub > h4:first-child { margin-bottom: .4rem; }
.setup-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; list-style: none; margin: 0; padding: 0; }
.setup-step { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; width: 100%; height: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; background: var(--sub); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius-sm); padding: .6rem .8rem; transition: background .15s, border-color .15s; }
.setup-step:hover { background: var(--accent-soft); }
.setup-step.ok { border-top-color: var(--ok); } .setup-step.warn { border-top-color: #d9902b; } .setup-step.bad { border-top-color: var(--bad); } .setup-step.neutral { border-top-color: var(--line-2); }
.setup-step__n { font-weight: 650; }
.progressbar { height: 8px; margin: .2rem 0 .9rem; border-radius: 999px; background: var(--neutral); overflow: hidden; }
.progressbar > span { display: block; height: 100%; border-radius: inherit; background: var(--gradient); }
.pw0 > span { width: 0; } .pw1 > span { width: 16.7%; } .pw2 > span { width: 33.3%; } .pw3 > span { width: 50%; } .pw4 > span { width: 66.7%; } .pw5 > span { width: 83.3%; } .pw6 > span { width: 100%; }
.setup-stats .stat { cursor: default; }
.setup-stats .stat:hover { box-shadow: var(--shadow); }
.card--danger { border-top: 3px solid var(--bad); }
#app .card--danger > h3:first-child { color: var(--bad); background: var(--bad-soft); }

/* ---- toast ---------------------------------------------------------------------------------------------------------------------------------------------- */
.toast { position: fixed; right: 1.2rem; bottom: 1.2rem; background: var(--ink); color: #fff; padding: .7rem 1rem .7rem 1.1rem; border-left: 4px solid #12b3a6; border-radius: var(--radius-sm); box-shadow: 0 16px 40px rgba(11, 42, 85, .35); max-width: 28rem; z-index: 20; }
.toast.bad { background: var(--bad); border-left-color: #ffd0d8; }

/* ---- responsive ------------------------------------------------------------------------------------------------------------------------------------------ */
/* ---- fact tiles: the enrollment summary on an application ---------------------------------------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .6rem; margin: 0 0 .9rem; }
.fact { background: #faf9ff; border: 1px solid var(--line); border-radius: .6rem; padding: .55rem .8rem; min-width: 0; }
.fact__k { color: var(--muted); font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; margin-bottom: .15rem; }
.fact__v { font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } .detail__aside { position: static; } }
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .view { padding: 1rem; }
  .topbar { flex-wrap: wrap; padding: .7rem 1rem 1.1rem; }
  .brand__logo { height: 30px; }
  .nav-toggle { display: inline-flex; order: 2; }
  .account { order: 3; flex: 1 0 100%; justify-content: flex-start; }
  .tabs { display: none; width: auto; max-width: none; margin: .6rem 1rem 0; flex-direction: column; border-radius: 18px; padding: .4rem; white-space: normal; }
  .tabs.is-open { display: flex; }
  .tabs button { text-align: left; }
  .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: .5rem; }
  .quick__sep { display: none; }
  .steps { border-radius: var(--radius-sm); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }


/* Show/hide control inside a sign-in password box (the shared sign-in theme is untouched). */
.ra-pw { position: relative; }
.ra-pw .ts-input { padding-right: 4.5rem; }
.ra-pw__toggle { position: absolute; top: 50%; right: .5rem; transform: translateY(-50%); border: 0; background: transparent;
  color: inherit; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: .25rem .5rem; border-radius: .4rem; opacity: .75; }
.ra-pw__toggle:hover, .ra-pw__toggle:focus-visible { opacity: 1; text-decoration: underline; }
/* Eye button inside a password box on the signed-in pages (the change-password form). */
.ra-pw--eye input { padding-right: 2.75rem; width: 100%; box-sizing: border-box; }
.ra-pw__eye { position: absolute; top: 50%; right: .5rem; transform: translateY(-50%); display: inline-flex; align-items: center;
  justify-content: center; width: 2rem; height: 2rem; border: 0; background: transparent; color: inherit; cursor: pointer;
  border-radius: .4rem; opacity: .7; padding: 0; }
.ra-pw__eye svg { width: 1.25rem; height: 1.25rem; }
.ra-pw__eye:hover, .ra-pw__eye:focus-visible { opacity: 1; background: rgba(79, 70, 229, .1); }


/* Step 4 evidence review: identity images, loaded only on request (each view is audited). */
.kyc-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; margin: .4rem 0 .8rem; }
.kyc-media__item { border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: .6rem; display: flex; flex-direction: column; gap: .4rem; }
.kyc-media__img { max-width: 100%; max-height: 320px; object-fit: contain; border-radius: var(--radius-sm); background: #f4f5f7; }

/* API Clients: tenant binding rows, profile and scope choices, the copyable integration example. */
.card.tight { padding: .8rem 1rem; box-shadow: none; }
.binding-row { border-color: var(--accent-line); }
.profile-picks { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
label.check { display: flex; align-items: center; gap: .35rem; font-weight: 400; margin: .25rem 0; cursor: pointer; }
label.check input { width: auto; margin: 0; }
.code-example { font-family: var(--mono); font-size: .78rem; background: #f4f5f9; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; overflow-x: auto; white-space: pre; max-width: 100%; }

/* Time zone dialog: appended to <body> (outside #app), so it carries its own centring and field styling. */
dialog.tz-dialog { position: fixed; inset: 0; margin: auto; max-height: calc(100vh - 2rem); overflow: auto; color: var(--ink); }
dialog.tz-dialog::backdrop { background: rgba(29, 26, 74, .45); }
dialog.tz-dialog label { display: block; margin: .6rem 0 .25rem; font-weight: 600; }
dialog.tz-dialog input { font: inherit; width: 100%; padding: .48rem .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
dialog.tz-dialog input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 76, 230, .18); }
dialog.tz-dialog h2 { margin: 0 0 .5rem; }

/* Setup: each step folds. Open while it needs attention, closed when complete; the chevron shows the state. */
#app details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; }
#app details.fold > summary::-webkit-details-marker { display: none; }
#app details.fold > summary::before { content: "\25B8"; color: var(--muted, #6b7280); transition: transform .15s ease; }
#app details.fold[open] > summary::before { transform: rotate(90deg); }
#app details.fold > summary h3 { margin: 0; }
#app details.fold:not([open]) { padding-bottom: 1rem; }
#app details.fold[open] > summary { margin-bottom: .75rem; }

/* Owner 2026-11-24: certificate profile selection on an application - bold, obviously a choice. */
.profile-pick { margin-top: 1rem; padding: 1rem 1.1rem; border: 2px solid #5b3fd6; border-radius: 14px; background: #f4f1ff; box-shadow: 0 2px 10px rgba(91, 63, 214, .12); }
.profile-pick__label { font-weight: 800; font-size: 1.05rem; color: #2e1f7a; letter-spacing: .01em; }
.profile-pick__label::before { content: "\25BE\00a0"; color: #5b3fd6; }
.profile-pick__hint { margin: .2rem 0 .6rem; color: #4b4577; font-size: .9rem; }
.profile-pick__select { width: 100%; font-weight: 700; font-size: 1rem; padding: .7rem .9rem; border: 2px solid #5b3fd6; border-radius: 10px; background: #fff; color: #1d1546; cursor: pointer; }
.profile-pick__select:hover, .profile-pick__select:focus { border-color: #3d25b0; box-shadow: 0 0 0 4px rgba(91, 63, 214, .2); outline: none; }
.profile-pick__use { margin-top: .75rem; }
.profile-pick .muted { margin-top: .5rem; }
