/* 9aipay operations console — shared palette and density with the agent workbench. */
:root {
  --bg:#f7f9f6; --card:#fff; --ink:#202722; --muted:#7b827c; --line:#e9ece8;
  --primary:#8cc65c; --primary-dark:#75b046; --primary-ink:#263d1c; --primary-soft:#edf6e5;
  --primary-border:#c5ddaf; --orange:#75b046; --blue:#4a7550; --green:#3c6a2f;
  --amber:#9c7427; --red:#bd4e54; --black:#202722; --yellow:#eed98a;
  --surface-soft:#f8faf7; --surface-muted:#f2f4f1; --success-soft:#edf6e9; --danger-soft:#fff1f1;
  --focus-ring:0 0 0 3px rgb(117 176 70 / 18%); --shadow:0 2px 6px rgb(30 45 25 / 2%);
  --sidebar-width:220px; --header-height:72px;
}
* { box-sizing:border-box; }
body:has(dialog[open]) { overflow:hidden; }
dialog { overscroll-behavior:contain; }
html { scrollbar-gutter:stable; scroll-behavior:smooth; }
body { margin:0; background:var(--bg); color:var(--ink); font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
a { color:var(--green); }
button,input,select,textarea,a { outline-offset:3px; }
:focus-visible { outline:2px solid #75a757; }
[hidden],.workspace-hidden,dialog:not([open]) { display:none!important; }
[aria-live="polite"]:empty,[role="status"]:empty { display:none; }
h1,h2,h3,h4,p { overflow-wrap:break-word; }
h1,h2,h3,h4 { font-family:inherit; letter-spacing:0; }
.ui-icon { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
.skip-link { position:fixed; top:-60px; left:12px; z-index:200; padding:9px 14px; background:#fff; border:1px solid var(--primary-border); border-radius:6px; text-decoration:none; }
.skip-link:focus { top:8px; }
.shell { width:100%; min-width:0; }
.topbar { position:sticky; top:0; z-index:40; display:flex; justify-content:space-between; align-items:center; gap:20px; height:var(--header-height); padding:0 32px 0 24px; border-bottom:1px solid var(--line); background:#fff; }
.brand { display:flex; align-items:center; gap:11px; color:var(--ink); text-decoration:none; min-width:0; }
.brand-mark { display:block; width:32px; height:32px; object-fit:contain; }
.brand strong { font-size:20px; font-weight:700; letter-spacing:-.5px; }
.brand-divider { width:1px; height:18px; margin:0 4px; background:#e2e7df; }
.brand-label { color:#6f7870; font-size:13px; }
.top-actions { display:flex; align-items:center; gap:24px; }
.top-link { display:inline-flex; align-items:center; gap:6px; color:#6a756b; font-size:13px; text-decoration:none; }
.top-link:hover { color:var(--green); }
.top-link .ui-icon { width:16px; height:16px; }
.admin-workspace { display:grid; grid-template-columns:var(--sidebar-width) minmax(0,1fr); min-height:calc(100vh - var(--header-height)); }
.sidebar { position:sticky; top:var(--header-height); display:flex; flex-direction:column; align-self:start; min-width:0; height:calc(100vh - var(--header-height)); padding:24px 14px 18px; border-right:1px solid var(--line); background:#fff; }
.sidebar-heading { display:flex; align-items:center; gap:10px; padding:0 12px 24px; color:#6c785f; font-size:12px; }
.sidebar-mark { display:grid; place-items:center; width:29px; height:29px; border:1px solid #dbe8d1; border-radius:7px; background:#f3f8ef; color:#5b7f43; font-size:11px; font-weight:500; }
.side-nav { display:grid; gap:22px; }
.nav-group { display:grid; gap:4px; }
.nav-group-label { margin:0 0 6px; padding:0 12px; color:#7a8373; font-size:11px; line-height:20px; }
.side-link { width:100%; min-height:43px; display:flex; align-items:center; gap:11px; padding:10px 13px; border:0; border-radius:8px; background:transparent; color:#6b746c; font-size:13px; text-align:left; transition:background .12s,color .12s; }
.side-link .ui-icon { width:18px; height:18px; color:#899486; }
.side-link:hover { background:#f6f9f3; color:#3c5d2f; }
.side-link.is-active { background:var(--primary-soft); color:#3e5a2e; font-weight:600; }
.side-link.is-active .ui-icon { color:#6c9b4b; }
.sidebar-foot { margin-top:auto; padding:20px 12px 0; display:flex; gap:9px; border-top:1px solid #f0f2ed; font-size:11px; }
.sidebar-foot strong { display:block; color:#6c785f; font-size:11px; font-weight:400; }
.sidebar-foot small { display:block; margin-top:3px; color:#7a8373; font-size:11px; }
.sidebar-foot-dot { width:6px; height:6px; flex:none; margin-top:7px; border-radius:50%; background:#8fb86e; }
.admin-content { width:100%; max-width:1730px; min-width:0; margin:0 auto; padding:28px 34px 60px; }
.admin-content:focus { outline:none; }
.page-header { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin:0 0 26px; }
.page-breadcrumb { display:flex; align-items:center; gap:9px; margin:0 0 16px; color:#6c785f; font-size:11px; }
.page-breadcrumb>span:first-child { color:#c1c7bc; }
.page-breadcrumb>span:last-child { color:#6c785f; }
.page-header h1 { margin:0 0 6px; font-size:25px; line-height:1.4; font-weight:600; }
.page-header>div>p:last-child { margin:0; max-width:700px; color:#6c785f; font-size:12px; }
.page-header-meta { flex:none; display:grid; justify-items:end; gap:9px; padding-bottom:2px; color:#6c785f; font-size:11px; }
.environment-label { display:inline-flex; align-items:center; gap:6px; padding:3px 8px; border:1px solid #e2eadd; border-radius:5px; color:#77925f; font-size:11px; }
.environment-label::before { content:""; width:5px; height:5px; border-radius:50%; background:#94b974; }
.card { min-width:0; border:1px solid rgba(222,229,218,.75); border-radius:12px; background:#fff; box-shadow:var(--shadow); }
.users-card,.readiness-card,.commercial-readiness-card { margin-top:18px; padding:23px 24px 24px; }
[data-workspace-section]:first-of-type { margin-top:0; }
[data-workspace-section] { scroll-margin-top:100px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.section-heading h2 { margin:0; color:#5c6c50; font-size:16px; line-height:1.6; font-weight:600; }
.section-heading p { margin:5px 0 0; color:#6c785f; font-size:11px; }
.eyebrow { display:block; margin-bottom:3px; color:#98a38d; font-size:11px; line-height:1.5; font-weight:400; }
.muted-text { margin:0 0 17px; max-width:940px; color:#6c785f; font-size:11px; line-height:1.9; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:7px 14px; border:1px solid transparent; border-radius:7px; background:#fff; color:#5c6c50; font-size:12px; line-height:20px; font-weight:500; text-decoration:none; white-space:nowrap; transition:background .12s,border-color .12s,color .12s; }
.button.primary { border-color:var(--primary); background:var(--primary); color:var(--primary-ink); }
.button.primary:hover { border-color:var(--primary-dark); background:var(--primary-dark); }
.button.ghost { border-color:#e1e8dc; background:#fff; color:#788b69; }
.button.ghost:hover { border-color:#b8d3a4; background:#f8fbf5; color:#52753b; }
.button.text { color:#96a28b; background:transparent; }
.button.text:hover { background:#f4f8ef; color:#53763d; }
.button:disabled,button:disabled { opacity:.5; cursor:not-allowed; }
.button[aria-busy="true"] { position:relative; color:transparent!important; pointer-events:none; }
.button[aria-busy="true"]::after { content:""; position:absolute; left:50%; top:50%; width:14px; height:14px; margin:-7px; border:1.5px solid #6c954e; border-right-color:transparent; border-radius:50%; animation:admin-spin .7s linear infinite; }
.badge,.lock,.tier-pill,.application-status,.summary-badge { display:inline-flex; align-items:center; min-height:23px; padding:2px 8px; border-radius:5px; color:#79866f; background:#f0f4ed; font-size:11px; font-weight:400; white-space:nowrap; }
.badge.muted { background:#f2f4ef; color:#8d9785; }
.badge.ok,.lock,.application-status.approved,.summary-badge { color:#678b4c; background:#edf6e5; }
.badge.bad,.application-status.rejected { color:#b46969; background:#fff1f0; }
.application-status.pending { color:#ad9253; background:#fbf7e9; }
.notice,.error { margin:0 0 18px; padding:12px 15px; border:1px solid; border-radius:8px; font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.notice { border-color:#dbe9cf; background:#f4f9ee; color:#698a4f; }
.error { border-color:#f0d9d8; background:#fff8f7; color:#b26664; }
.empty { min-height:132px; display:grid; align-content:center; justify-items:center; gap:10px; padding:32px 20px; color:#6c785f; background:#fff; border-radius:8px; text-align:center; font-size:12px; }
.empty::before { content:""; display:block; width:35px; height:27px; border:1px solid #e2e8dc; border-radius:5px; background:linear-gradient(#f8faf5,#f2f6ec); box-shadow:0 6px 0 -3px #fff,0 7px 0 -3px #e3e9dd; }
.message { max-width:520px; margin:90px auto; padding:34px; }
.message h1 { margin:5px 0 10px; font-size:23px; font-weight:500; }
.message p { margin:0 0 24px; color:#8e9983; font-size:13px; }
/* Overview: four metrics and two clear queues. */
.workspace-overview { min-width:0; }
.workspace-overview-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:17px; }
.workspace-overview-head h2 { margin:0; color:#5c6c50; font-size:14px; font-weight:500; }
.workspace-overview-head p { margin:3px 0 0; color:#6c785f; font-size:11px; }
.workspace-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.workspace-kpi { min-width:0; display:flex; align-items:flex-start; flex-direction:column; padding:21px 22px 17px; border:1px solid rgba(222,229,218,.75); border-radius:12px; background:#fff; color:var(--ink); text-align:left; box-shadow:var(--shadow); transition:border-color .15s,background .15s; }
.workspace-kpi:hover { border-color:#c7dcb8; background:#fcfdfb; }
.kpi-label { color:#6c785f; font-size:12px; }
.workspace-kpi strong { display:block; margin:12px 0 13px; color:#3c5530; font-size:31px; line-height:1.15; font-weight:500; font-variant-numeric:tabular-nums; }
.workspace-kpi small { width:100%; display:flex; justify-content:space-between; align-items:center; gap:10px; padding-top:11px; border-top:1px solid #f1f4ec; color:#6c785f; font-size:11px; }
.workspace-kpi small span { color:#9ab981; font-size:16px; line-height:12px; }
.overview-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr); gap:18px; margin-top:22px; }
.queue-card,.overview-links-card { padding:23px 24px 12px; }
.overview-grid .section-heading { margin:0 0 5px; }
.overview-grid .section-heading h2 { font-size:15px; }
.task-list,.overview-links { display:grid; }
.task-row,.overview-links>button { display:flex; align-items:center; gap:14px; width:100%; min-height:85px; padding:16px 0; border:0; border-bottom:1px solid #f0f3eb; background:transparent; color:#5c6c50; font:inherit; text-align:left; }
.task-row:last-child,.overview-links>button:last-child { border-bottom:0; }
.task-row:hover,.overview-links>button:hover { color:#527c3b; }
.task-row:hover .task-arrow,.overview-links>button:hover .task-arrow { color:#719957; }
.task-icon { display:grid; place-items:center; width:39px; height:39px; flex:none; background:#f3f8ed; border:1px solid #e8efdf; border-radius:9px; color:#91b175; }
.task-copy,.overview-links>button>span:not(.task-arrow) { min-width:0; flex:1; }
.task-copy strong,.overview-links strong { display:block; font-size:12px; font-weight:500; }
.task-copy small,.overview-links small { display:block; margin-top:5px; color:#6c785f; font-size:11px; line-height:1.7; }
.task-arrow { flex:none; margin-left:auto; color:#c5d1b9; font-size:17px; }
.overview-links>button { gap:13px; }
.overview-links>button>.ui-icon { color:#9bbd80; width:20px; height:20px; }
.operations-flow { margin-top:24px; padding:20px 22px; border:1px solid #e6ecdf; border-radius:10px; background:#f7faf3; }
.operations-flow h2 { margin:0 0 15px; color:#6c785f; font-size:11px; font-weight:500; }
.operations-flow ol { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; list-style:none; margin:0; padding:0; }
.operations-flow li { display:flex; gap:10px; align-items:flex-start; }
.operations-flow li>span { margin-top:2px; color:#bbcaab; font-size:13px; font-variant-numeric:tabular-nums; }
.operations-flow strong { display:block; color:#6c785f; font-size:11px; font-weight:500; }
.operations-flow small { display:block; margin-top:3px; color:#6c785f; font-size:11px; }
/* Query panels and tables */
.filter-panel { display:flex; align-items:flex-end; flex-wrap:wrap; gap:12px; padding:16px; margin:0 0 19px; border:1px solid #eaf0e3; border-radius:8px; background:#fafcf7; }
.filter-panel label { display:grid; gap:6px; min-width:150px; color:#6c785f; font-size:11px; }
.filter-panel .filter-grow { flex:1; max-width:440px; min-width:230px; }
input,select,textarea { border:1px solid #e1e8da; border-radius:6px; background:#fff; color:#5c6c50; outline:none; }
input,select { min-width:0; height:36px; padding:0 11px; font-size:12px; }
input::placeholder,textarea::placeholder { color:#b7c0ad; opacity:1; }
select { cursor:pointer; }
input:hover,select:hover,textarea:hover { border-color:#c9dab9; }
input:focus,select:focus,textarea:focus { border-color:#9ec780; box-shadow:var(--focus-ring); }
input[type="checkbox"] { width:15px; height:15px; padding:0; accent-color:#8abf61; }
.filter-panel input,.filter-panel select { width:100%; min-width:150px; }
.table-wrap { width:100%; min-width:0; max-width:100%; overflow:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; scrollbar-color:#d9e4ce transparent; }
.table-wrap table { width:100%; min-width:900px; border-collapse:collapse; font-size:11px; }
.table-wrap th { padding:12px 13px; border-top:1px solid #eaf0e3; border-bottom:1px solid #eaf0e3; background:#f8fbf4; color:#6c785f; font-size:11px; font-weight:400; text-align:left; white-space:nowrap; }
.table-wrap th:first-child { border-radius:6px 0 0 0; }
.table-wrap th:last-child { border-radius:0 6px 0 0; }
.table-wrap td { padding:16px 13px; border-bottom:1px solid #edf2e7; color:#5c6c50; vertical-align:middle; line-height:1.8; }
.table-wrap tbody tr:hover { background:#fcfdf9; }
.table-wrap tbody tr:last-child td { border-bottom:0; }
.table-wrap td:has(.button) { white-space:nowrap; }
.table-wrap td .button { min-height:30px; padding:4px 10px; font-size:11px; }
.table-wrap .button.primary { background:#f3f8ec; border-color:#d9e8cc; color:#789963; }
.table-wrap .button.primary:hover { background:#eaf4de; border-color:#bcd5a5; }
.account-name { display:block; color:#5c6c50; font-size:11px; font-weight:500; overflow-wrap:anywhere; }
.account-email { display:block; margin-top:3px; color:#6c785f; font-size:11px; line-height:1.7; overflow-wrap:anywhere; }
.expiry { font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
#cardOrdersTable { min-width:1080px; }
#cardOrdersTable :is(th,td):nth-child(3),#cardOrdersTable :is(th,td):nth-child(6),#topupOrdersTable :is(th,td):nth-child(3),#topupOrdersTable :is(th,td):nth-child(4),#topupOrdersTable :is(th,td):nth-child(6),#usersTable :is(th,td):nth-child(2) { text-align:right; font-variant-numeric:tabular-nums; }
#usersTable { min-width:1150px; }
#usersTable td:first-child { min-width:225px; }
#cardsTable { min-width:940px; }
#cardsTable :is(th,td):nth-child(4) { text-align:right; font-variant-numeric:tabular-nums; }
#topupOrdersTable { min-width:1080px; }
#topupOrdersTable td:first-child { max-width:240px; overflow-wrap:anywhere; }
#applicationsTable { min-width:1050px; }
#auditTable { min-width:1050px; }
#auditTable :is(th,td):first-child { white-space:nowrap; font-variant-numeric:tabular-nums; }
#auditTable td:nth-child(4) { max-width:230px; overflow-wrap:anywhere; }
.profile-grid { display:grid; gap:6px; min-width:200px; max-width:245px; }
.profile-grid input { width:100%; height:30px; font-size:11px; }
.profile-grid .button { width:max-content; }
.edit-grid { display:flex; align-items:center; gap:6px; }
.edit-grid select { min-width:90px; height:31px; padding:0 8px; font-size:11px; }
.edit-grid input,.limit-input { width:70px; height:31px; padding:0 8px; font-size:11px; }
.application-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.application-actions select,.application-actions input { height:31px; font-size:11px; }
.application-actions input { width:70px; }
.application-actions select { min-width:80px; }
.audit-change { display:flex; align-items:center; flex-wrap:wrap; gap:5px; max-width:310px; }
.audit-change span { display:inline-block; padding:2px 5px; border-radius:4px; background:#f4f7ef; color:#99aa88; font-size:11px; }
.audit-action { font-size:11px; }
.audit-reason { min-width:170px; max-width:250px; overflow-wrap:anywhere; }
.invite-token-result { margin-top:20px; padding:16px; border:1px solid #d6e7c8; border-radius:8px; background:#f7fbf2; }
.invite-token-result>strong { color:#739354; font-size:12px; }
.invite-token-result p { margin:5px 0 12px; color:#6c785f; font-size:11px; }
.invite-token-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.invite-token-row code { flex:1; min-width:220px; padding:8px 11px; border:1px solid #e1ead6; border-radius:6px; background:#fff; color:#8a9c79; font:11px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap:anywhere; }
.usdt-scan-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; padding:12px 14px; border:1px solid #e6eddc; border-radius:7px; background:#fafcf6; }
.usdt-scan-toolbar p { margin:0; color:#6c785f; font-size:11px; line-height:1.8; }
.usdt-scan-toolbar .button { flex:none; }
/* Runtime diagnostics and published-rule content. */
.readiness-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.readiness-grid>div { padding:15px 16px; border:1px solid #e7eedf; border-radius:8px; background:#fcfdf9; }
.readiness-grid strong { display:block; margin-top:7px; color:#5c6c50; font-size:13px; line-height:1.8; font-weight:500; }
.commercial-summary { padding:13px 15px; border:1px solid #eee5cc; border-radius:7px; background:#fdfbf3; color:#aa9a6d; font-size:12px; }
.readiness-meta { margin:10px 0 0; color:#6c785f; font-size:11px; }
.readiness-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px 14px; margin-top:12px; border:1px solid #e3ebda; border-radius:7px; background:#fafcf7; color:#6c785f; font-size:11px; }
.readiness-actions a { color:#7e9f64; text-decoration:none; }
.readiness-actions a:hover { text-decoration:underline; }
.capability-gates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:18px; }
.capability-gate { padding:16px; border:1px solid #e8eddf; border-radius:8px; background:#fff; }
.capability-gate.blocked { border-color:#eee4d1; background:#fffdfa; }
.capability-gate.passed { border-color:#e1ecd6; background:#fcfef9; }
.capability-gate-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12px; }
.capability-gate-heading strong { color:#5c6c50; font-weight:500; }
.capability-gate-note { margin:8px 0 0; color:#6c785f; font-size:11px; }
.capability-gate-evidence { display:flex; flex-wrap:wrap; gap:6px; padding:8px 9px; margin:12px 0 0; border-radius:5px; background:#f5f8ef; color:#6c785f; font-size:11px; }
.capability-gate-evidence span { color:#6c785f; }
.capability-gate ul { margin:12px 0 0; padding-left:16px; color:#6c785f; font-size:11px; }
.capability-gate li+li { margin-top:10px; }
.capability-gate li strong,.capability-gate li small,.capability-gate li code { display:block; }
.capability-gate li strong { color:#5c6c50; font-size:11px; font-weight:500; }
.capability-gate li small { margin-top:3px; color:#6c785f; font-size:11px; line-height:1.7; }
.capability-gate li code { color:#bdad8d; font:9px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap:anywhere; }
.capability-gate li.clear { list-style:none; margin-left:-16px; }
.rules-grid,.rule-summary,.diagnostic-grid,.system-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.rules-card h3,.system-card h3 { margin:22px 0 12px; color:#5c6c50; font-size:13px; font-weight:500; }
.rule-item,.price-rule-card,.diagnostic-item,.system-integration,.integration-card { padding:15px 16px; border:1px solid #e5eddb; border-radius:8px; background:#fcfef9; min-width:0; }
.rule-item span,.rule-item small,.diagnostic-item>span,.system-integration>span { display:block; color:#6c785f; font-size:11px; }
.rule-item strong,.diagnostic-item>strong,.system-integration>strong { display:block; margin-top:7px; color:#5c6c50; font-size:16px; font-weight:500; font-variant-numeric:tabular-nums; }
.rule-item small { margin-top:7px; }
.rule-description { margin-top:16px; padding:15px; border:1px solid #e7eddc; border-radius:8px; background:#fafcf6; color:#6c785f; font-size:11px; }
.rules-card .table-wrap { margin-top:18px; }
.rules-card .table-wrap table { min-width:760px; }
.system-card .table-wrap table { min-width:760px; }
/* Native dialogs are hidden until opened, avoiding a first-paint flash. */
dialog { width:min(720px,calc(100vw - 40px)); max-height:calc(100vh - 48px); margin:8vh auto auto; padding:0; overflow:auto; border:1px solid #e1e9d8; border-radius:12px; background:#fff; color:var(--ink); box-shadow:0 20px 70px rgb(30 45 25 / 15%); }
dialog::backdrop { background:rgb(35 46 29 / 25%); }
dialog.usdt-review-dialog { width:min(780px,calc(100vw - 40px)); padding:25px; }
.usdt-review-form { display:grid; gap:14px; }
.usdt-review-form .section-heading { margin:0 0 4px; }
.usdt-review-form h2 { font-size:18px; color:#6f8c56; font-weight:500; }
.usdt-review-form h3 { margin:0; padding-top:8px; color:#5c6c50; font-size:12px; font-weight:500; }
.usdt-review-form>.muted-text { margin:0; }
.usdt-review-form>label:not(.usdt-ack) { color:#6c785f; font-size:11px; }
.usdt-review-form>input,.usdt-review-form>select { width:100%; }
.usdt-review-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 20px; margin:0; padding:16px; border:1px solid #e6eddc; border-radius:8px; background:#fafcf6; }
.usdt-review-details>div { min-width:0; }
.usdt-review-details dt { color:#6c785f; font-size:11px; }
.usdt-review-details dd { margin:4px 0 0; color:#5c6c50; font-size:11px; line-height:1.8; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.usdt-candidates { display:grid; gap:12px; }
.usdt-candidate { border:1px solid #e4ecd9; border-radius:8px; overflow:hidden; }
.usdt-candidate>strong { display:block; padding:12px 16px; color:#5c6c50; font-size:11px; font-weight:500; }
.usdt-candidate .usdt-review-details { border:0; border-top:1px solid #e9efdf; border-radius:0; background:#fff; }
.usdt-ack { display:flex; align-items:flex-start; gap:10px; padding:12px; border:1px solid #e3ecd7; border-radius:7px; color:#5c6c50; font-size:11px; line-height:1.9; }
.usdt-ack input { flex:none; margin:3px 0 0; }
.usdt-review-form .error { margin:0; }
.usdt-review-form>button[type="submit"] { justify-self:end; margin-top:4px; }
.is-loading { color:transparent!important; background:linear-gradient(90deg,#f2f6ec 25%,#fff 45%,#f2f6ec 65%); background-size:300% 100%; animation:admin-shimmer 1.4s ease-in-out infinite; }
.is-loading>* { visibility:hidden; }
@keyframes admin-spin { to { transform:rotate(360deg); } }
@keyframes admin-shimmer { from { background-position:100% 0; } to { background-position:-100% 0; } }
@media(min-width:1600px) { .admin-content { padding-left:44px; padding-right:44px; } .workspace-kpi { padding:24px 25px 19px; } }
@media(max-width:1150px) {
  :root { --sidebar-width:192px; }
  .admin-content { padding:25px 24px 45px; }
  .workspace-kpis { gap:12px; }
  .workspace-kpi { padding:17px; }
  .overview-grid { grid-template-columns:minmax(0,1.2fr) minmax(270px,1fr); gap:15px; }
  .queue-card,.overview-links-card { padding:20px 19px 10px; }
  .task-row { gap:11px; }
  .task-copy small { max-width:220px; }
  .operations-flow ol { gap:12px; }
  .operations-flow small { max-width:120px; }
}
@media(max-width:900px) {
  :root { --header-height:64px; }
  .topbar { padding:0 21px; }
  .admin-workspace { grid-template-columns:minmax(0,1fr); }
  .sidebar { z-index:30; height:auto; padding:8px 16px; border-right:0; border-bottom:1px solid var(--line); }
  .sidebar-heading,.nav-group-label,.sidebar-foot { display:none; }
  .side-nav { display:flex; gap:5px; overflow:auto; scrollbar-width:none; }
  .side-nav::-webkit-scrollbar { display:none; }
  .nav-group { display:contents; }
  .side-link { flex:none; min-width:max-content; width:auto; min-height:40px; padding:9px 12px; gap:8px; font-size:12px; }
  .side-link .ui-icon { width:16px; height:16px; }
  .admin-content { padding:22px 22px 40px; }
  .page-header { margin-bottom:24px; }
  .page-breadcrumb { margin-bottom:12px; }
  .page-header-meta { display:none; }
  .overview-grid { grid-template-columns:1fr; }
  .overview-links { grid-template-columns:repeat(3,minmax(0,1fr)); gap:17px; }
  .overview-links>button { align-items:flex-start; min-height:90px; border:0; padding:15px 0; gap:9px; }
  .overview-links>button .task-arrow { display:none; }
  .overview-links small { max-width:150px; }
  .capability-gates { grid-template-columns:1fr; }
  [data-workspace-section] { scroll-margin-top:140px; }
}
@media(max-width:640px) {
  .topbar { padding:0 15px; gap:10px; }
  .brand { gap:8px; }
  .brand-mark { width:27px; height:27px; }
  .brand strong { font-size:18px; }
  .brand-divider { margin:0 2px; height:15px; }
  .brand-label { font-size:11px; }
  .top-actions { gap:10px; }
  .top-link { font-size:11px; }
  .top-link .ui-icon { display:none; }
  .top-actions .badge { max-width:98px; overflow:hidden; text-overflow:ellipsis; font-size:10px; }
  .sidebar { padding:7px 11px; }
  .side-link { min-height:42px; padding:9px 11px; }
  .admin-content { padding:20px 15px 35px; }
  .page-header h1 { font-size:23px; }
  .page-header>div>p:last-child { font-size:11px; line-height:1.8; }
  .workspace-overview-head { align-items:flex-start; }
  .workspace-overview-head p { max-width:200px; font-size:11px; }
  .workspace-overview-head .button { min-height:36px; padding:6px 10px; font-size:11px; }
  .workspace-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .workspace-kpi { padding:16px 15px 13px; }
  .kpi-label { font-size:11px; }
  .workspace-kpi strong { font-size:28px; margin:10px 0 12px; }
  .workspace-kpi small { font-size:10px; gap:5px; }
  .overview-grid { margin-top:16px; gap:16px; }
  .queue-card,.overview-links-card { padding:19px 18px 9px; }
  .task-row { min-height:86px; }
  .task-icon { width:35px; height:35px; border-radius:8px; }
  .task-copy strong { font-size:12px; }
  .task-copy small { max-width:230px; font-size:11px; }
  .overview-links { grid-template-columns:1fr; gap:0; }
  .overview-links>button { align-items:center; min-height:75px; border-bottom:1px solid #f0f3eb; }
  .overview-links>button .task-arrow { display:block; }
  .overview-links small { max-width:none; }
  .operations-flow { padding:18px; margin-top:16px; }
  .operations-flow ol { grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px 12px; }
  .operations-flow small { max-width:none; }
  .users-card,.readiness-card,.commercial-readiness-card { padding:19px 17px; margin-top:16px; }
  .section-heading { align-items:flex-start; gap:12px; }
  .section-heading h2 { font-size:15px; }
  .section-heading>.button { min-height:36px; padding:6px 10px; font-size:11px; }
  .filter-panel { padding:13px; gap:12px 9px; }
  .filter-panel label,.filter-panel .filter-grow { flex:1; min-width:100%; max-width:none; }
  .filter-panel input,.filter-panel select { min-height:42px; height:42px; }
  .filter-panel>.button { min-height:40px; }
  .table-wrap th { padding:11px; }
  .table-wrap td { padding:14px 11px; }
  .table-wrap td .button { min-height:36px; font-size:11px; }
  .readiness-grid,.rules-grid,.rule-summary,.diagnostic-grid,.system-grid { grid-template-columns:1fr; }
  .usdt-scan-toolbar { flex-direction:column; align-items:flex-start; gap:12px; }
  dialog,dialog.usdt-review-dialog { width:calc(100vw - 24px); max-height:calc(100dvh - 32px); margin-top:16px; }
  dialog.usdt-review-dialog { padding:20px; }
  .usdt-review-details { grid-template-columns:1fr; }
  .usdt-review-form>button[type="submit"] { width:100%; min-height:44px; }
  .usdt-review-form>input,.usdt-review-form>select { min-height:42px; }
  .message { margin:50px 16px; padding:26px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

/* Shared object drawer and deliberate, neutral confirmation. */
.icon-button { display:inline-flex; align-items:center; justify-content:center; flex:none; width:35px; height:35px; padding:0; border:1px solid transparent; border-radius:7px; background:transparent; color:#9aaa89; }
.icon-button:hover { background:#f2f7ec; color:#75965d; }
.ops-detail-dialog { position:fixed; inset:0 0 0 auto; width:min(800px,calc(100vw - 32px)); height:100dvh; max-height:100dvh; margin:0; padding:0; border-top:0; border-right:0; border-bottom:0; border-radius:12px 0 0 12px; }
.dialog-header { position:sticky; top:0; z-index:3; display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:85px; padding:20px 27px; border-bottom:1px solid #eaf0e1; background:#fff; }
.dialog-header h2 { margin:0; color:#5c6c50; font-size:18px; font-weight:500; }
.ops-detail-body { padding:25px 27px 40px; }
.ops-detail-body h3 { margin:25px 0 15px; padding-top:20px; border-top:1px solid #edf2e5; color:#8b9f77; font-size:13px; font-weight:500; }
.ops-detail-body .table-wrap table { min-width:650px; }
.detail-grid,.description-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 24px; margin:0; }
.detail-grid>div,.description-grid>div { min-width:0; }
.detail-grid dt,.description-grid dt { color:#6c785f; font-size:11px; }
.detail-grid dd,.description-grid dd { margin:5px 0 0; color:#5c6c50; font-size:12px; line-height:1.8; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.ops-confirm-dialog { width:min(520px,calc(100vw - 32px)); margin-top:min(16vh,160px); }
.ops-confirm-form { display:grid; gap:18px; padding:27px; }
.ops-confirm-form h2 { margin:0 0 6px; color:#5c6c50; font-size:19px; font-weight:500; }
.ops-confirm-form .muted-text { margin:0; }
.ops-confirm-summary { padding:15px; border:1px solid #e6eddc; border-radius:8px; background:#fafcf6; color:#5c6c50; font-size:12px; line-height:1.9; overflow-wrap:anywhere; }
.ops-confirm-summary p { margin:0; }
.ops-confirm-summary p+p { margin-top:8px; }
.form-label { display:grid; gap:7px; color:#5c6c50; font-size:11px; }
.form-label textarea { width:100%; min-height:85px; padding:10px 11px; resize:vertical; font-size:12px; line-height:1.7; }
.confirmation-ack { display:flex; align-items:flex-start; gap:10px; color:#6c785f; font-size:11px; line-height:1.8; }
.confirmation-ack input { flex:none; margin:3px 0 0; }
.ops-confirm-form .error { margin:0; }
.dialog-actions { display:flex; justify-content:flex-end; gap:9px; padding-top:17px; border-top:1px solid #edf2e5; }
@media(max-width:640px) { .ops-detail-dialog { width:100vw; max-height:100dvh; margin:0; border-radius:0; } .dialog-header { min-height:76px; padding:18px 20px; } .ops-detail-body { padding:20px; } .detail-grid,.description-grid { grid-template-columns:1fr; gap:17px; } .ops-confirm-form { padding:22px; } .dialog-actions .button { min-height:42px; } }

/* Business records use the same readable type scale as the agent workbench. */
.page-header>div>p:last-child,.workspace-overview-head p,.section-heading p,.muted-text { color:#697586; font-size:13px; }
.table-wrap table { color:#445240; font-size:14px; }
.table-wrap th { color:#697586; font-size:12px; font-weight:500; }
.table-wrap td { color:#445240; }
.table-wrap td .button { min-height:34px; font-size:12px; }
.account-name { color:#34472c; font-size:14px; }
.account-email { color:#697586; font-size:12px; }
.button { font-size:13px; }
input,select,textarea { color:#445240; font-size:14px; }
input::placeholder,textarea::placeholder { color:#8d9887; }
.filter-panel label { color:#697586; font-size:12px; }
.badge,.lock,.tier-pill,.application-status,.summary-badge { font-size:12px; padding:3px 8px; }
.badge.muted { color:#697586; }
.badge.ok { color:#4d7336; }
.badge.bad { color:#a85252; }
.empty { color:#7b8674; font-size:13px; }
.expiry,.audit-action,.audit-reason { color:#697586; font-size:12px; }
.numeric { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
#usersTable { min-width:1040px; }
#applicationsTable { min-width:800px; }
#applicationsTable :is(th,td):nth-child(3) { text-align:right; font-variant-numeric:tabular-nums; }
.ops-description-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 28px; margin:0; }
.ops-description-grid>div { min-width:0; }
.ops-description-grid dt { color:#697586; font-size:12px; line-height:1.7; }
.ops-description-grid dd { margin:6px 0 0; color:#34472c; font-size:14px; line-height:1.8; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.ops-detail-body>.muted-text { margin-top:22px; }
.ops-detail-body h3 { color:#4d6440; font-size:15px; }
.ops-edit-form { display:grid; grid-template-columns:minmax(0,1fr); gap:15px; margin:26px 0 0; padding:23px 0 0; border-top:1px solid #e9ece8; }
.ops-edit-form>h3 { margin:0; padding:0; border:0; color:#4d6440; font-size:15px; }
.ops-edit-form>label { display:grid; gap:7px; width:100%; max-width:520px; color:#697586; font-size:13px; }
.ops-edit-form :is(input:not([type="checkbox"]),select,textarea) { width:100%; min-height:40px; color:#34472c; font-size:14px; }
.ops-edit-form>button { justify-self:start; }
.ops-edit-form .muted-text { margin:0; font-size:13px; line-height:1.8; }
.ops-detail-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:23px 0 0; }
.ops-detail-actions .button { min-height:38px; }
.ops-callout { margin:23px 0 0; padding:17px 19px; border:1px solid #dee9d5; border-radius:8px; background:#f8fbf4; color:#617352; font-size:13px; line-height:1.9; }
.ops-callout>h3 { margin:0 0 7px; padding:0; border:0; color:#4d6440; font-size:14px; }
.ops-callout>strong { display:block; margin-bottom:5px; color:#4d6440; font-size:14px; font-weight:500; }
.ops-callout>p { margin:0; }
.ops-callout .button { margin-top:13px; }
.ops-confirm-summary { color:#566c46; font-size:14px; }
.form-label,.confirmation-ack { color:#697586; font-size:13px; }
.form-label textarea { color:#34472c; font-size:14px; }
.usdt-review-form h3 { color:#566c46; font-size:14px; }
.usdt-review-form>label:not(.usdt-ack),.usdt-ack { color:#697586; font-size:13px; }
#usdtReviewExpected.usdt-review-details { display:block; }
.usdt-candidate>.ops-description-grid { padding:17px; border-top:1px solid #e9ece8; }
.usdt-candidate>strong { color:#5c744a; font-size:13px; }
#rulesWorkspace>.ops-callout:first-child { margin-top:0; }
#rulesWorkspace .ops-edit-form { margin-top:22px; padding-top:22px; }
#rulesWorkspace .table-wrap table { min-width:740px; }
#rulesWorkspace .ops-edit-form .table-wrap :is(input[type="number"],input[type="text"]) { width:145px; max-width:100%; min-height:38px; height:38px; font-size:14px; }
#rulesWorkspace .ops-edit-form .table-wrap label { display:flex; align-items:center; gap:9px; color:#697586; font-size:13px; }
#rulesWorkspace .ops-edit-form input[type="checkbox"] { width:16px; height:16px; margin:0; }
#rulesWorkspace h3,#systemWorkspace h3 { margin:27px 0 17px; color:#4d6440; font-size:16px; font-weight:500; }
#systemWorkspace>h3:first-child { margin-top:0; }
#rulesWorkspace details { margin-top:25px; padding-top:20px; border-top:1px solid #e9ece8; }
#rulesWorkspace summary { margin-bottom:16px; color:#617352; font-size:14px; cursor:pointer; }
#rulesWorkspace .ops-detail-actions { margin-top:2px; }
@media(max-width:640px) { .ops-description-grid { grid-template-columns:minmax(0,1fr); gap:19px; } .ops-edit-form :is(input:not([type="checkbox"]),select,textarea) { min-height:44px; } .ops-detail-actions .button { min-height:42px; } .filter-panel label { font-size:12px; } .page-header>div>p:last-child,.workspace-overview-head p { font-size:12px; } .table-wrap td .button { min-height:38px; font-size:12px; } }

#overviewQueue .workspace-shortcut { display:block; width:100%; padding:20px 0; min-height:86px; border:0; border-bottom:1px solid #edf1e6; background:transparent; color:#4d6440; text-align:left; }
#overviewQueue .workspace-shortcut:last-child { border-bottom:0; }
#overviewQueue .workspace-shortcut strong { display:block; color:#4d6440; font-size:14px; font-weight:500; }
#overviewQueue .workspace-shortcut span { display:block; margin-top:6px; color:#697586; font-size:12px; line-height:1.7; }
#overviewQueue .workspace-shortcut:hover strong { color:#6d954f; }
@media(max-width:640px) {
  .topbar { padding-top:env(safe-area-inset-top); height:calc(var(--header-height) + env(safe-area-inset-top)); }
  .sidebar { top:calc(var(--header-height) + env(safe-area-inset-top)); }
  .admin-content,.ops-detail-body { padding-bottom:max(32px,env(safe-area-inset-bottom)); }
  .button,.side-link,.icon-button,.top-link,.table-wrap td .button,.section-heading>.button,.workspace-overview-head .button { min-height:48px; }
  .icon-button { min-width:48px; }
  .ops-edit-form input:not([type="checkbox"]),.ops-edit-form select,.filter-panel input,.filter-panel select,.usdt-review-form>input,.usdt-review-form>select { min-height:48px; }
  .dialog-actions { padding-bottom:max(8px,env(safe-area-inset-bottom)); }
}

/* Mobile records: one record per card; complex pricing comparisons keep local scrolling. */
@media(max-width:640px) {
  .table-wrap:has(>#cardOrdersTable),.table-wrap:has(>#topupOrdersTable),.table-wrap:has(>#usersTable),.table-wrap:has(>#applicationsTable),.table-wrap:has(>#cardsTable),.table-wrap:has(>#auditTable) { overflow:visible; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) { display:block; width:100%; min-width:0!important; border:0; border-collapse:separate; font-size:14px; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) thead { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) tbody { display:grid; width:100%; gap:8px; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:0; padding:4px 0; border:1px solid #e3eadb; border-radius:10px; background:#fbfdf8; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) tbody tr:hover { background:#fbfdf8; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) tbody td { display:block; width:auto; min-width:0!important; max-width:none!important; padding:10px 12px; border:0!important; color:#445240; text-align:left!important; white-space:normal!important; overflow-wrap:anywhere; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) tbody td::before { content:attr(data-label); display:block; margin-bottom:5px; color:#74816c; font-size:12px; line-height:1.6; font-weight:400; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) tbody td:first-child { grid-column:1/-1; padding-bottom:13px; border-bottom:1px solid #eaf0e2!important; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) tbody td:last-child { grid-column:1/-1; padding-top:12px; border-top:1px solid #eaf0e2!important; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) .numeric { text-align:left!important; white-space:normal; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) tbody td .button { width:100%; min-height:48px; padding:11px 14px; font-size:14px; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) .account-name { font-size:14px; line-height:1.8; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) .account-email { font-size:12px; line-height:1.8; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) .badge { min-height:25px; font-size:12px; }
  :is(#cardOrdersTable,#topupOrdersTable,#usersTable,#applicationsTable,#cardsTable,#auditTable) .audit-reason { min-width:0; max-width:none; }
}
@media(max-width:640px) {
  #auditTable tbody td:nth-child(5) { grid-column:1/-1; }
}
@media(max-width:640px) {
  #adminApp button,dialog button { min-height:48px; }
  #adminApp .filter-panel { gap:12px 9px; }
}
@media(max-width:640px) {
  #opsDetailDialog .button,#opsConfirmDialog .button,#usdtReviewDialog .button { min-height:48px; }
  dialog .icon-button { width:48px; height:48px; }
}
