/* =====================================================================
   AydaPayKYC — Admin panel (sidebar + topbar layout)
   Builds on the brand tokens defined in aydapay.css
   ===================================================================== */

:root {
  --sb-width: 268px;
  --sb-collapsed: 84px;
  --tb-height: 70px;
  --adm-bg: #f8f3f4;
  --st-pending: #d99a00;
  --st-review: #2f6fb3;
  --st-approved: #1f8a4c;
  --st-rejected: #b42318;
}

body.ap-admin { background: var(--adm-bg); display: block; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.ap-sidebar {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 1045;
  width: var(--sb-width);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--ap-burgundy-900) 0%, #3a0010 55%, var(--ap-burgundy-800) 100%);
  color: rgba(255,255,255,.75);
  transition: width .3s cubic-bezier(.2,.8,.2,1), transform .3s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.ap-sidebar::after { /* soft gold glow */
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,184,0,.18), transparent 70%);
  bottom: -90px; inset-inline-start: -90px; pointer-events: none;
}
.ap-sb-brand { height: var(--tb-height); display: flex; align-items: center; padding: 0 1.4rem; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.ap-sb-brand .ap-brand { color: #fff; font-size: 1.2rem; }
.ap-sb-brand .ap-brand .ap-brand-kyc { color: var(--ap-gold); }
.ap-sb-brand .ap-logo { width: 34px; height: 34px; }

.ap-sb-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 1rem .9rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.ap-sb-section { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.4); padding: 1.1rem .8rem .5rem; white-space: nowrap; }
html[lang="ar"] .ap-sb-section { letter-spacing: 0; font-size: .78rem; }

.ap-sb-link {
  position: relative; display: flex; align-items: center; gap: .85rem;
  padding: .72rem .85rem; margin-bottom: .2rem; border-radius: 12px;
  color: rgba(255,255,255,.78); text-decoration: none; font-weight: 600; white-space: nowrap;
  transition: background .2s, color .2s;
}
.ap-sb-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.ap-sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.ap-sb-link.active { background: rgba(245,184,0,.14); color: var(--ap-gold); }
.ap-sb-link.active::before {
  content: ""; position: absolute; inset-inline-start: -.9rem; top: 22%; bottom: 22%; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--ap-gold);
}
html[dir="rtl"] .ap-sb-link.active::before { border-radius: 4px 0 0 4px; }
.ap-sb-link .ap-sb-badge {
  margin-inline-start: auto; min-width: 24px; height: 22px; padding: 0 .45rem; border-radius: 999px;
  background: var(--ap-gold); color: var(--ap-burgundy-900); font-size: .74rem; font-weight: 800;
  display: inline-grid; place-items: center;
}
.ap-sb-sub { padding-inline-start: 2.6rem; margin-bottom: .4rem; }
.ap-sb-sub a { display: flex; align-items: center; gap: .55rem; padding: .38rem .6rem; border-radius: 8px; color: rgba(255,255,255,.6); text-decoration: none; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.ap-sb-sub a:hover { color: #fff; background: rgba(255,255,255,.05); }
.ap-sb-sub a.active { color: var(--ap-gold); }
.ap-sb-sub .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ap-sb-sub .cnt { margin-inline-start: auto; font-size: .78rem; opacity: .75; }

.ap-sb-user { flex-shrink: 0; margin: .9rem; padding: .8rem; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .7rem; position: relative; z-index: 1; }
.ap-avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ap-gold-400), var(--ap-gold)); color: var(--ap-burgundy-900); font-weight: 800; text-transform: uppercase;
}
.ap-sb-user .who { min-width: 0; line-height: 1.2; }
.ap-sb-user .who strong { color: #fff; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-sb-user .who small { color: rgba(255,255,255,.55); }
.ap-sb-user button { margin-inline-start: auto; background: transparent; border: 0; color: rgba(255,255,255,.6); padding: .35rem; border-radius: 8px; }
.ap-sb-user button:hover { color: var(--ap-gold); background: rgba(255,255,255,.06); }
.ap-sb-user button svg { width: 18px; height: 18px; }

/* Collapsed sidebar (desktop) */
@media (min-width: 992px) {
  body.ap-sb-collapsed .ap-sidebar { width: var(--sb-collapsed); }
  body.ap-sb-collapsed .ap-admin-main { margin-inline-start: var(--sb-collapsed); }
  body.ap-sb-collapsed .ap-sb-brand { padding: 0; justify-content: center; }
  body.ap-sb-collapsed .ap-sb-brand .ap-brand > span,
  body.ap-sb-collapsed .ap-sb-link .lbl,
  body.ap-sb-collapsed .ap-sb-sub,
  body.ap-sb-collapsed .ap-sb-user .who,
  body.ap-sb-collapsed .ap-sb-user button { display: none; }
  body.ap-sb-collapsed .ap-sb-section { text-align: center; padding-inline: 0; font-size: 0; }
  body.ap-sb-collapsed .ap-sb-section::before { content: "•••"; font-size: .7rem; letter-spacing: .1em; }
  body.ap-sb-collapsed .ap-sb-link { justify-content: center; }
  body.ap-sb-collapsed .ap-sb-link .ap-sb-badge { position: absolute; top: 4px; inset-inline-end: 6px; min-width: 18px; height: 18px; font-size: .65rem; padding: 0 .3rem; }
  body.ap-sb-collapsed .ap-sb-user { justify-content: center; padding: .6rem; }
}

/* Mobile: sidebar slides in over the content */
.ap-sb-backdrop { display: none; }
@media (max-width: 991.98px) {
  .ap-sidebar { transform: translateX(-100%); box-shadow: none; }
  html[dir="rtl"] .ap-sidebar { transform: translateX(100%); }
  body.ap-sb-open .ap-sidebar, html[dir="rtl"] body.ap-sb-open .ap-sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.35); }
  body.ap-sb-open .ap-sb-backdrop { display: block; position: fixed; inset: 0; z-index: 1044; background: rgba(30,18,22,.45); backdrop-filter: blur(2px); }
}

/* ---------- Main + topbar ---------- */
.ap-admin-main { margin-inline-start: var(--sb-width); min-height: 100vh; display: flex; flex-direction: column; transition: margin .3s cubic-bezier(.2,.8,.2,1); }
@media (max-width: 991.98px) { .ap-admin-main { margin-inline-start: 0; } }

.ap-topbar {
  position: sticky; top: 0; z-index: 1030; height: var(--tb-height);
  display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem;
  background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--ap-line);
}
.ap-tb-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--ap-line); background: #fff; color: var(--ap-ink);
  display: inline-grid; place-items: center; position: relative; flex-shrink: 0; transition: all .2s;
}
.ap-tb-btn:hover { border-color: var(--ap-burgundy); color: var(--ap-burgundy); background: var(--ap-burgundy-50); }
.ap-tb-btn svg { width: 20px; height: 20px; }
.ap-tb-btn .ping { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 20px; height: 20px; padding: 0 .3rem; border-radius: 999px; background: var(--ap-burgundy); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.ap-tb-title { min-width: 0; }
.ap-tb-title h1 { font-size: 1.2rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-tb-title .crumbs { font-size: .8rem; color: var(--ap-muted); white-space: nowrap; }
.ap-tb-title .crumbs a { color: var(--ap-muted); text-decoration: none; }
.ap-tb-title .crumbs a:hover { color: var(--ap-burgundy); }

.ap-tb-search { position: relative; flex: 1; max-width: 420px; margin-inline-start: auto; }
.ap-tb-search input { padding-inline-start: 2.6rem; border-radius: 12px; background: var(--adm-bg); border-color: transparent; height: 44px; }
.ap-tb-search input:focus { background: #fff; }
.ap-tb-search svg { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ap-muted); pointer-events: none; }
.ap-tb-actions { display: flex; align-items: center; gap: .55rem; }
@media (max-width: 767.98px) { .ap-tb-search { display: none; } .ap-tb-actions { margin-inline-start: auto; } .ap-topbar { padding: 0 1rem; } }

.ap-tb-menu { border-radius: 16px; border: 1px solid var(--ap-line); box-shadow: var(--ap-shadow); padding: .5rem; min-width: 290px; }
.ap-tb-menu .dropdown-header { font-weight: 800; color: var(--ap-ink); font-size: .9rem; }
.ap-tb-menu .dropdown-item { border-radius: 10px; padding: .6rem .75rem; display: flex; gap: .7rem; align-items: center; white-space: normal; font-weight: 600; }
.ap-tb-menu .dropdown-item:active, .ap-tb-menu .dropdown-item.active { background: var(--ap-burgundy); color: #fff; }
.ap-tb-menu .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.ap-tb-menu .ic svg { width: 18px; height: 18px; }
.ap-tb-menu small { display: block; color: var(--ap-muted); font-weight: 500; }
.ap-tb-menu .dropdown-item:active small { color: rgba(255,255,255,.8); }
.ap-tb-user { display: flex; align-items: center; gap: .6rem; border: 0; background: transparent; padding: .25rem; border-radius: 14px; }
.ap-tb-user:hover { background: var(--ap-burgundy-50); }
.ap-tb-user .ap-avatar { width: 40px; height: 40px; }
.ap-tb-user .nm { font-weight: 700; line-height: 1.1; text-align: start; }
.ap-tb-user .nm small { display: block; color: var(--ap-muted); font-weight: 500; font-size: .75rem; }
@media (max-width: 575.98px) { .ap-tb-user .nm { display: none; } }

.ap-admin-content { padding: 1.75rem 1.5rem 2.5rem; flex: 1; }
@media (max-width: 575.98px) { .ap-admin-content { padding: 1.25rem 1rem 2rem; } }
.ap-admin-footer { padding: 1rem 1.5rem; color: var(--ap-muted); font-size: .85rem; border-top: 1px solid var(--ap-line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ---------- Panels, KPI tiles ---------- */
.ap-panel { background: #fff; border: 1px solid var(--ap-line); border-radius: 18px; box-shadow: 0 1px 2px rgba(74,0,19,.04); }
.ap-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--ap-line); }
.ap-panel-head h2 { font-size: 1.02rem; margin: 0; }
.ap-panel-head .sub { font-size: .82rem; color: var(--ap-muted); }
.ap-panel-body { padding: 1.35rem; }
.ap-panel-link { font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap; }

.ap-kpi { position: relative; overflow: hidden; padding: 1.3rem 1.35rem; height: 100%; transition: transform .25s, box-shadow .25s; }
.ap-kpi:hover { transform: translateY(-3px); box-shadow: var(--ap-shadow); }
.ap-kpi .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.ap-kpi .lbl { font-weight: 700; color: var(--ap-muted); font-size: .88rem; }
.ap-kpi .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.ap-kpi .ic svg { width: 21px; height: 21px; }
.ap-kpi .val { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ap-ink); direction: ltr; display: inline-block; }
.ap-kpi .foot { margin-top: .7rem; font-size: .82rem; color: var(--ap-muted); display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.ap-kpi.hero { background: linear-gradient(140deg, var(--ap-burgundy), var(--ap-burgundy-900)); border: 0; color: #fff; }
.ap-kpi.hero .lbl, .ap-kpi.hero .foot { color: rgba(255,255,255,.75); }
.ap-kpi.hero .val { color: #fff; }
.ap-kpi.hero::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(245,184,0,.35), transparent 70%); bottom: -70px; inset-inline-end: -50px; }
.ic-burgundy { background: var(--ap-burgundy-50); color: var(--ap-burgundy); }
.ic-gold { background: var(--ap-gold-50); color: #a67800; }
.ic-green { background: #e8f5ee; color: var(--st-approved); }
.ic-blue { background: #eaf1f9; color: var(--st-review); }
.ic-red { background: #fdecea; color: var(--st-rejected); }
.ic-onhero { background: rgba(255,255,255,.12); color: var(--ap-gold); }
.ap-trend { font-weight: 800; border-radius: 999px; padding: .1rem .5rem; font-size: .76rem; direction: ltr; display: inline-block; }
.ap-trend.up { background: #e8f5ee; color: var(--st-approved); }
.ap-trend.down { background: #fdecea; color: var(--st-rejected); }
.ap-trend.flat { background: #f1eef0; color: var(--ap-muted); }
.ap-kpi.hero .ap-trend.up { background: rgba(255,255,255,.15); color: #b9f3cf; }
.ap-kpi.hero .ap-trend.down { background: rgba(255,255,255,.15); color: #ffc9c2; }
.ap-kpi.hero .ap-trend.flat { background: rgba(255,255,255,.15); color: #fff; }

/* ---------- Charts ---------- */
.ap-chart { position: relative; direction: ltr; }
.ap-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.ap-chart .grid { stroke: #efe6e9; stroke-width: 1; }
.ap-chart .axis { fill: var(--ap-muted); font-size: 11px; font-family: var(--ap-font); }
.ap-chart .bar { fill: var(--ap-burgundy); transition: fill .15s; }
.ap-chart .bar.today { fill: #a3002b; }
.ap-chart .hit { fill: transparent; cursor: pointer; }
.ap-chart g.col:hover .bar { fill: var(--ap-burgundy-600); }
.ap-chart g.col:hover .hl { fill: var(--ap-burgundy-50); }
.ap-chart .hl { fill: transparent; }
.ap-tooltip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, calc(-100% - 10px));
  background: var(--ap-ink); color: #fff; border-radius: 10px; padding: .45rem .7rem; font-size: .8rem; white-space: nowrap;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.4); opacity: 0; transition: opacity .12s;
}
.ap-tooltip.show { opacity: 1; }
.ap-tooltip strong { display: block; font-size: .95rem; }

.ap-stack { display: flex; gap: 2px; height: 14px; border-radius: 99px; overflow: hidden; background: #f1eaec; }
.ap-stack span { display: block; height: 100%; min-width: 4px; transition: filter .15s; }
.ap-stack span:hover { filter: brightness(1.12); }
.ap-legend { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.ap-legend li { display: flex; align-items: center; gap: .7rem; padding: .62rem 0; border-bottom: 1px dashed var(--ap-line); }
.ap-legend li:last-child { border-bottom: 0; }
.ap-legend .sw { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.ap-legend .name { font-weight: 600; }
.ap-legend .num { margin-inline-start: auto; font-weight: 800; direction: ltr; }
.ap-legend .pct { width: 52px; text-align: end; color: var(--ap-muted); font-size: .85rem; direction: ltr; }
.sw-Pending { background: var(--st-pending); }
.sw-UnderReview { background: var(--st-review); }
.sw-Approved { background: var(--st-approved); }
.sw-Rejected { background: var(--st-rejected); }

/* ---------- Status pill ---------- */
.ap-status { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.ap-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ap-status.st-Pending { background: #fff5dc; color: #8a6100; }
.ap-status.st-Started { background: #f1ecfb; color: #5b3fa6; }
.ap-status.st-Open { background: #f1f1f3; color: #5d5d68; }
.ap-status.st-Started::before { animation: ap-pulse-dot 1.6s ease-in-out infinite; }
@keyframes ap-pulse-dot { 50% { opacity: .35; } }
.ap-status.st-UnderReview { background: #eaf1f9; color: var(--st-review); }
.ap-status.st-Approved { background: #e8f5ee; color: var(--st-approved); }
.ap-status.st-Rejected { background: #fdecea; color: var(--st-rejected); }

/* ---------- Tables ---------- */
.ap-table { margin: 0; }
.ap-table thead th { background: #fcf8f9; color: var(--ap-muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; border-bottom: 1px solid var(--ap-line); padding: .85rem 1.1rem; white-space: nowrap; }
html[lang="ar"] .ap-table thead th { letter-spacing: 0; font-size: .82rem; }
.ap-table tbody td { padding: .85rem 1.1rem; vertical-align: middle; border-color: #f3ecee; }
.ap-table tbody tr { transition: background .15s; }
.ap-table tbody tr:hover { background: #fdf8f9; }
.ap-table tbody tr:last-child td { border-bottom: 0; }
.ap-person { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.ap-person .ap-avatar { width: 38px; height: 38px; border-radius: 11px; font-size: .85rem; background: var(--ap-burgundy-50); color: var(--ap-burgundy); }
.ap-person strong { display: block; line-height: 1.2; }
.ap-person small { color: var(--ap-muted); }
.ap-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: .86rem; direction: ltr; unicode-bidi: embed; }
.ap-flag { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 800; color: #8a6100; background: #fff5dc; padding: .2rem .55rem; border-radius: 999px; }
.ap-flag svg { width: 13px; height: 13px; }
.ap-empty { text-align: center; padding: 3rem 1rem; color: var(--ap-muted); }
.ap-empty .ic { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--ap-burgundy-50); color: var(--ap-burgundy); }
.ap-empty .ic svg { width: 28px; height: 28px; }
.ap-num { direction: ltr; unicode-bidi: embed; }

/* ---------- Filter tabs ---------- */
.ap-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.ap-tabs a { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .95rem; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--ap-muted); background: #fff; border: 1px solid var(--ap-line); transition: all .2s; }
.ap-tabs a:hover { color: var(--ap-burgundy); border-color: var(--ap-burgundy-100); }
.ap-tabs a.active { background: var(--ap-burgundy); color: #fff; border-color: var(--ap-burgundy); }
.ap-tabs .cnt { background: rgba(0,0,0,.06); border-radius: 999px; padding: 0 .5rem; font-size: .76rem; }
.ap-tabs a.active .cnt { background: rgba(255,255,255,.2); }

/* ---------- Activity feed ---------- */
.ap-feed { list-style: none; padding: 0; margin: 0; }
.ap-feed li { display: flex; gap: .85rem; padding: .8rem 0; position: relative; }
.ap-feed li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 17px; top: 46px; bottom: -6px; width: 2px; background: #f1e7ea; }
.ap-feed .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.ap-feed .ic svg { width: 17px; height: 17px; }
.ap-feed .txt { font-size: .9rem; line-height: 1.4; min-width: 0; }
.ap-feed .txt small { display: block; color: var(--ap-muted); margin-top: .15rem; }

/* ---------- Pager ---------- */
.ap-pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.35rem; border-top: 1px solid var(--ap-line); font-size: .88rem; color: var(--ap-muted); }
.ap-pager .pagination { margin: 0; gap: .3rem; }
.ap-pager .page-link { border-radius: 10px !important; border: 1px solid var(--ap-line); color: var(--ap-ink); font-weight: 700; min-width: 38px; text-align: center; }
.ap-pager .page-item.active .page-link { background: var(--ap-burgundy); border-color: var(--ap-burgundy); color: #fff; }
.ap-pager .page-item.disabled .page-link { color: #c9bcc0; }

/* ---------- Detail page ---------- */
.ap-dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .7rem 1rem; margin: 0; }
.ap-dl dt { color: var(--ap-muted); font-weight: 600; font-size: .9rem; }
.ap-dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.ap-alert { display: flex; gap: .8rem; align-items: flex-start; padding: .95rem 1.1rem; border-radius: 14px; margin-bottom: .8rem; font-weight: 600; }
.ap-alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: .1rem; }
.ap-alert.warn { background: #fff7e0; color: #7a5600; border: 1px solid #f7e2a6; }
.ap-alert.danger { background: #fdecea; color: #8f1c12; border: 1px solid #f6c9c3; }
.ap-alert.ok { background: #e8f5ee; color: #17673a; border: 1px solid #bfe3cd; }
.ap-doc { border: 1px solid var(--ap-line); border-radius: 14px; overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; }
.ap-doc .thumb { aspect-ratio: 4 / 3; background: #f7f1f3; display: grid; place-items: center; overflow: hidden; }
.ap-doc .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ap-doc:hover .thumb img { transform: scale(1.04); }
.ap-doc .thumb svg { width: 42px; height: 42px; color: var(--ap-burgundy); }
.ap-doc .meta { padding: .7rem .85rem; font-size: .82rem; }
.ap-doc .meta strong { display: block; font-size: .9rem; }
.ap-doc .meta small { color: var(--ap-muted); }

/* ---------- Messages ---------- */
.ap-msg { padding: 1.2rem 1.35rem; border-bottom: 1px solid var(--ap-line); position: relative; }
.ap-msg:last-child { border-bottom: 0; }
.ap-msg.unread { background: linear-gradient(90deg, rgba(245,184,0,.07), transparent 40%); }
html[dir="rtl"] .ap-msg.unread { background: linear-gradient(270deg, rgba(245,184,0,.07), transparent 40%); }
.ap-msg.unread::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--ap-gold); }
.ap-msg .body { white-space: pre-line; margin: .8rem 0; color: var(--ap-ink); }
.ap-chip { display: inline-flex; align-items: center; padding: .18rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #f3edef; color: var(--ap-muted); }
.ap-chip.burgundy { background: var(--ap-burgundy-50); color: var(--ap-burgundy); }
.ap-chip.gold { background: rgba(245,184,0,.16); color: #7a5a00; }

/* ---------- Login ---------- */
.ap-login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--ap-bg); }
.ap-login-art { position: relative; overflow: hidden; color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(150deg, var(--ap-burgundy) 0%, var(--ap-burgundy-900) 100%); }
.ap-login-art .ap-brand { color: #fff; }
.ap-login-art .ap-brand .ap-brand-kyc { color: var(--ap-gold); }
.ap-login-art h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 460px; }
.ap-login-art p { color: rgba(255,255,255,.75); max-width: 440px; }
.ap-login-art .ap-shield-wrap { min-height: 300px; }
.ap-login-art .ap-ring { border-color: rgba(255,255,255,.18); }
.ap-login-art .ap-ring-2 { border-color: rgba(245,184,0,.4); }
.ap-login-form { display: grid; place-items: center; padding: 2rem 1.25rem; }
.ap-login-card { width: 100%; max-width: 410px; }
.ap-login-card .form-control { height: 50px; }
.ap-pw { position: relative; }
.ap-pw button { position: absolute; inset-inline-end: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ap-muted); padding: .35rem; }
.ap-pw button svg { width: 20px; height: 20px; }
@media (max-width: 991.98px) { .ap-login { grid-template-columns: 1fr; } .ap-login-art { display: none; } }
.ap-login-card p svg { width: 1em; height: 1em; vertical-align: -.125em; }

/* ---------- Staff & roles ---------- */
.ap-rules { background: var(--ap-burgundy-50); border: 1px solid var(--ap-burgundy-100); border-radius: 12px; padding: .8rem 1rem; }
.ap-rules ul { margin: 0; padding-inline-start: 1.1rem; font-size: .85rem; color: var(--ap-muted); }
.ap-role-pick { display: grid; gap: .6rem; }
.ap-role-pick label { display: block; cursor: pointer; margin: 0; }
.ap-role-pick input { position: absolute; opacity: 0; pointer-events: none; }
.ap-role-pick .box { display: block; position: relative; padding: .85rem 1rem; padding-inline-start: 2.8rem; border: 1.5px solid var(--ap-line); border-radius: 14px; transition: all .2s; }
.ap-role-pick .box::before { content: ""; position: absolute; inset-inline-start: 1rem; top: 1.05rem; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cdbdc2; background: #fff; transition: all .2s; }
.ap-role-pick .box strong { display: block; }
.ap-role-pick .box small { display: block; color: var(--ap-muted); }
.ap-role-pick .box .perms { display: inline-block; margin-top: .35rem; font-size: .75rem; font-weight: 800; color: var(--ap-burgundy); }
.ap-role-pick label:hover .box { border-color: var(--ap-burgundy-100); background: #fffafb; }
.ap-role-pick input:checked + .box { border-color: var(--ap-burgundy); background: var(--ap-burgundy-50); box-shadow: 0 0 0 3px rgba(128,0,32,.08); }
.ap-role-pick input:checked + .box::before { border-color: var(--ap-burgundy); background: radial-gradient(circle, var(--ap-burgundy) 45%, #fff 50%); }
.ap-role-pick input:focus-visible + .box { outline: 2px solid var(--ap-burgundy); outline-offset: 2px; }
.ap-role-pick label.disabled { cursor: not-allowed; opacity: .5; }

.ap-role-card.super { border-color: var(--ap-gold-200); background: linear-gradient(180deg, var(--ap-gold-50), #fff 45%); }
.ap-role-card .small svg { width: 1em; height: 1em; vertical-align: -.125em; }
.ap-meter { height: 8px; border-radius: 99px; background: #f1eaec; overflow: hidden; }
.ap-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ap-burgundy), var(--ap-gold)); }

.ap-perm-group { border: 1px solid var(--ap-line); border-radius: 14px; overflow: hidden; margin-bottom: 1rem; }
.ap-perm-head { background: #fcf8f9; padding: .7rem 1rem; font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ap-burgundy); border-bottom: 1px solid var(--ap-line); }
html[lang="ar"] .ap-perm-head { letter-spacing: 0; }
.ap-perm { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; margin: 0; border-bottom: 1px solid #f3ecee; cursor: pointer; transition: background .15s; }
.ap-perm:last-child { border-bottom: 0; }
.ap-perm:hover { background: #fffafb; }
.ap-perm strong { display: block; font-size: .95rem; }
.ap-perm small { display: block; color: var(--ap-muted); }
.ap-perm.locked { cursor: default; }
.ap-perm .form-switch .form-check-input { width: 2.6em; height: 1.35em; margin: 0; cursor: pointer; }
.ap-panel-body p svg, .ap-alert + p svg { width: 1em; height: 1em; vertical-align: -.125em; }

/* ---------- Merchants & billing ---------- */
.ap-alert.trial { background: var(--ap-gold-50); color: var(--ap-burgundy-800); border: 1px solid var(--ap-gold-200); }
.ap-meter.high span { background: linear-gradient(90deg, #d99a00, #f5b800); }
.ap-meter.full span { background: #b42318; }
.ap-usage .ap-meter { height: 10px; }
.ap-money { font-weight: 800; direction: ltr; unicode-bidi: embed; white-space: nowrap; }
.ap-plan-card { border: 1.5px solid var(--ap-line); border-radius: 16px; padding: 1.1rem; height: 100%; display: flex; flex-direction: column; transition: all .2s; }
.ap-plan-card.current { border-color: var(--ap-burgundy); background: var(--ap-burgundy-50); }
.ap-plan-card.pending { border-color: var(--ap-gold); background: var(--ap-gold-50); }
.ap-plan-card .price { font-size: 1.6rem; font-weight: 800; direction: ltr; display: inline-block; }
.ap-plan-card ul { list-style: none; padding: 0; margin: .6rem 0 1rem; font-size: .88rem; color: var(--ap-muted); flex: 1; }
.ap-plan-card li::before { content: "✓ "; color: var(--ap-burgundy); font-weight: 800; }
.ap-copy { display: flex; gap: .5rem; }
.ap-copy input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; direction: ltr; background: #fcf8f9; }
.ap-scope-head { display: flex; align-items: center; gap: .6rem; margin: 1.5rem 0 .9rem; }
.ap-scope-head h2 { font-size: 1.05rem; margin: 0; }
.ap-scope-head:first-child { margin-top: 0; }

/* Printable invoice */
.ap-invoice { max-width: 820px; margin: 0 auto; }
.ap-invoice .head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 3px solid var(--ap-burgundy); padding-bottom: 1.2rem; margin-bottom: 1.5rem; }
.ap-invoice .total { font-size: 1.8rem; font-weight: 800; color: var(--ap-burgundy); direction: ltr; display: inline-block; }
@media print {
  .ap-sidebar, .ap-topbar, .ap-admin-footer, .no-print, .ap-alert { display: none !important; }
  .ap-admin-main { margin: 0 !important; }
  .ap-admin-content { padding: 0 !important; }
  body.ap-admin { background: #fff; }
  .ap-panel { border: 0; box-shadow: none; }
}

/* ---------- Workflows & links ---------- */
.ap-sec-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ap-burgundy); color: var(--ap-gold); font-size: .8rem; margin-inline-end: .55rem; vertical-align: 1px; }
.ap-toggles { border: 1px solid var(--ap-line); border-radius: 14px; overflow: hidden; }
.ap-seg { display: inline-flex; flex-wrap: wrap; background: #f6eff1; border-radius: 12px; padding: 4px; gap: 4px; }
.ap-seg label { margin: 0; cursor: pointer; }
.ap-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ap-seg span { display: block; padding: .45rem .9rem; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--ap-muted); transition: all .2s; }
.ap-seg input:checked + span { background: #fff; color: var(--ap-burgundy); box-shadow: 0 2px 6px rgba(74,0,19,.12); }
.ap-seg input:focus-visible + span { outline: 2px solid var(--ap-burgundy); }
.ap-country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 1rem; max-height: 280px; overflow-y: auto; border: 1px solid var(--ap-line); border-radius: 12px; padding: .6rem .8rem; background: #fcf8f9; }
.ap-country-grid label { display: flex; align-items: center; gap: .45rem; font-size: .86rem; padding: .2rem 0; margin: 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-country-grid label[hidden] { display: none; }
.ap-country-grid input { accent-color: var(--ap-burgundy); flex-shrink: 0; }
.ap-journey { list-style: none; counter-reset: j; padding: 0; margin: 0; }
.ap-journey li { counter-increment: j; position: relative; padding: .2rem 0 1rem; padding-inline-start: 2.6rem; }
.ap-journey li::before { content: counter(j); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ap-burgundy); color: var(--ap-gold); font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.ap-journey li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--ap-burgundy-100); }
.ap-journey strong { display: block; }
.ap-journey small { color: var(--ap-muted); }
.ap-wf-facts { list-style: none; padding: 0; margin: 0 0 .8rem; display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .82rem; }
.ap-wf-facts li { color: #b9a9ae; text-decoration: line-through; }
.ap-wf-facts li.on { color: var(--ap-ink); text-decoration: none; }
.ap-wf-facts li.on::before { content: "✓ "; color: var(--ap-burgundy); font-weight: 800; }
.ap-doc-multi .box { font-size: .9rem; }
.ap-chip svg { width: 12px; height: 12px; vertical-align: -1px; }

/* ---------- Demo accounts (development only) ---------- */
.ap-demo-box { border: 1.5px dashed var(--ap-gold); background: var(--ap-gold-50); border-radius: 16px; padding: 1rem; }
.ap-demo-account { display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; text-align: start; background: #fff; border: 1px solid var(--ap-line); border-radius: 12px; padding: .6rem .8rem; margin-bottom: .45rem; transition: all .2s; }
.ap-demo-account:hover { border-color: var(--ap-burgundy); box-shadow: 0 4px 12px -6px rgba(128,0,32,.35); }
.ap-demo-account small { color: var(--ap-muted); }
.ap-demo-account .go { font-size: .8rem; font-weight: 800; color: var(--ap-burgundy); white-space: nowrap; }

/* ---------- Webhooks ---------- */
.ap-code { background: #1e1216; color: #f6e6ea; border-radius: 12px; padding: .9rem 1rem; font-size: .78rem; line-height: 1.55; overflow-x: auto; white-space: pre; margin-bottom: .8rem; }
.ap-code code { color: inherit; }
.ap-msg code.ap-ref { color: var(--ap-ink); }

/* ---------- KYB risk ---------- */
.ap-risk { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.ap-risk::before, .ap-risk-dot { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.ap-risk-dot { margin-inline-end: .35rem; }
.risk-Low { color: var(--st-approved); }
.risk-Medium { color: #8a6100; }
.risk-High { color: var(--st-rejected); }
.ap-risk.risk-Low { background: #e8f5ee; }
.ap-risk.risk-Medium { background: #fff5dc; }
.ap-risk.risk-High { background: #fdecea; }
.ap-risk-panel { border-inline-start: 5px solid currentColor; }
.ap-risk-panel.risk-Low { background: #f3fbf6; }
.ap-risk-panel.risk-Medium { background: #fffaf0; }
.ap-risk-panel.risk-High { background: #fef5f4; }
.ap-risk-panel svg { width: 20px; height: 20px; }
.ap-risk-panel ul, .ap-risk-panel strong { color: var(--ap-ink); }
.ap-person .ap-avatar svg { width: 18px; height: 18px; }

/* ---------- Create verification link ---------- */
.ap-type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 575.98px) { .ap-type-pick { grid-template-columns: 1fr; } }
.ap-type-pick label, .ap-wf-pick label { margin: 0; cursor: pointer; display: block; }
.ap-type-pick input, .ap-wf-pick input { position: absolute; opacity: 0; pointer-events: none; }
.ap-type-pick .box { display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1.1rem 1.2rem; border: 1.5px solid var(--ap-line); border-radius: 16px; transition: all .2s; }
.ap-type-pick .box .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ap-burgundy-50); color: var(--ap-burgundy); margin-bottom: .4rem; }
.ap-type-pick .box .ic svg { width: 22px; height: 22px; }
.ap-type-pick .box small { color: var(--ap-muted); }
.ap-type-pick input:checked + .box { border-color: var(--ap-burgundy); background: var(--ap-burgundy-50); box-shadow: 0 0 0 3px rgba(128,0,32,.08); }
.ap-type-pick input:checked + .box .ic { background: var(--ap-burgundy); color: var(--ap-gold); }
.ap-type-pick input:focus-visible + .box, .ap-wf-pick input:focus-visible + .box { outline: 2px solid var(--ap-burgundy); outline-offset: 2px; }
.ap-wf-pick { display: grid; gap: .5rem; }
.ap-wf-pick .box { display: block; padding: .75rem 1rem; padding-inline-start: 2.6rem; position: relative; border: 1.5px solid var(--ap-line); border-radius: 12px; transition: all .2s; }
.ap-wf-pick .box::before { content: ""; position: absolute; inset-inline-start: .95rem; top: 1rem; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #cdbdc2; background: #fff; }
.ap-wf-pick .box strong { display: block; }
.ap-wf-pick .box small { color: var(--ap-muted); }
.ap-wf-pick input:checked + .box { border-color: var(--ap-burgundy); background: #fffafb; }
.ap-wf-pick input:checked + .box::before { border-color: var(--ap-burgundy); background: radial-gradient(circle, var(--ap-burgundy) 45%, #fff 50%); }
.ap-tabs a svg { width: 14px; height: 14px; }

/* ---------- Pay per session ---------- */
.ap-price-tag { display: inline-block; margin-inline-start: .4rem; padding: .05rem .45rem; border-radius: 999px; background: var(--ap-gold-50); border: 1px solid var(--ap-gold-200); color: #8a6100; font-size: .72rem; font-weight: 800; vertical-align: 1px; }
.ap-session-cost { border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1rem; background: linear-gradient(135deg, var(--ap-burgundy), var(--ap-burgundy-900)); color: #fff; }
.ap-session-cost .small { color: rgba(255,255,255,.75) !important; }
.ap-session-cost .amount { font-size: 2rem; font-weight: 800; color: var(--ap-gold); line-height: 1.2; }
.ap-card-cost { display: flex; justify-content: space-between; align-items: center; padding: .45rem .7rem; border-radius: 10px; background: var(--ap-gold-50); font-size: .85rem; }
.ap-card-cost strong { color: var(--ap-burgundy); }
.ap-price-example { padding: .7rem 0; border-bottom: 1px dashed var(--ap-line); }
.ap-price-example:last-of-type { border-bottom: 0; }
.ap-mini-stat { border: 1px solid var(--ap-line); border-radius: 12px; padding: .6rem .3rem; }
.ap-mini-stat .v { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.ap-mini-stat .v small { font-size: .7rem; color: var(--ap-muted); }
.ap-mini-stat .l { font-size: .75rem; color: var(--ap-muted); font-weight: 600; }
.ap-mini-stat.gold { background: var(--ap-gold-50); border-color: var(--ap-gold-200); }
.ap-mini-stat.gold .v { color: var(--ap-burgundy); }

/* ---- Verification features (workflow editor, cards, checks) ---- */
.ap-feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .75rem; }
.ap-feature { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border: 1.5px solid var(--ap-line, #eee3e6); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; margin: 0; }
.ap-feature:hover { border-color: #e2c7cf; }
.ap-feature.on { border-color: var(--ap-burgundy); background: var(--ap-burgundy-50); box-shadow: 0 6px 18px -12px rgba(110, 14, 42, .45); }
.ap-feature.unavailable { cursor: not-allowed; opacity: .6; background: #faf7f8; }
.ap-feature .ic { flex: 0 0 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #f6eef1; color: var(--ap-burgundy); }
.ap-feature.on .ic { background: var(--ap-burgundy); color: #fff; }
.ap-feature .ic svg { width: 19px; height: 19px; }
.ap-feature .txt { flex: 1; min-width: 0; }
.ap-feature .txt strong { display: block; font-size: .92rem; }
.ap-feature .txt small { display: block; color: var(--ap-muted); font-size: .78rem; line-height: 1.45; }
.ap-feature .end { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.ap-feat-pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.ap-feat-pills span { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; padding: .18rem .5rem; border-radius: 999px; background: #f4f0f1; color: #b9a9ae; text-decoration: line-through; }
.ap-feat-pills span.on { background: var(--ap-burgundy-50); color: var(--ap-burgundy); text-decoration: none; font-weight: 600; }
.ap-feat-pills svg { width: 12px; height: 12px; }

.ap-result { border: 1px solid var(--ap-line, #eee3e6); border-radius: 14px; padding: .9rem 1rem; height: 100%; }
.ap-result .hd { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.ap-result .hd .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #f6eef1; color: var(--ap-burgundy); }
.ap-result .hd .ic svg { width: 17px; height: 17px; }
.ap-result .hd strong { flex: 1; font-size: .9rem; }
.ap-check-outcome { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; }
.ap-check-outcome.Clear { background: #e7f6ee; color: #146c43; }
.ap-check-outcome.Review { background: #fff4d6; color: #8a5a00; }
.ap-check-outcome.Alert { background: #fde8ea; color: #a3122b; }
.ap-result.Alert { border-color: #f3b8c0; }
.ap-result ul.flags { margin: 0 0 .5rem; padding-inline-start: 1.1rem; font-size: .82rem; }
.ap-result dl { display: grid; grid-template-columns: minmax(120px, 30%) minmax(0, 1fr); gap: 0; font-size: .8rem; margin: 0; border: 1px solid var(--ap-line, #eee3e6); border-radius: 10px; overflow: hidden; }
.ap-result dt, .ap-result dd { padding: .4rem .65rem; border-bottom: 1px solid var(--ap-line, #eee3e6); }
.ap-result dt:nth-last-of-type(1), .ap-result dd:last-of-type { border-bottom: 0; }
.ap-result dt { color: var(--ap-muted); font-weight: 500; background: #fbf8f9; }
.ap-result dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ap-result dd.tech { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; text-align: start; }
@media (max-width: 575.98px) { .ap-result dl { grid-template-columns: minmax(0, 1fr); } .ap-result dt { border-bottom: 0; padding-bottom: 0; } }
.ap-result .compare { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .4rem; }
.ap-result .compare img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: #f4f0f1; }
.ap-result video { width: 100%; border-radius: 10px; background: #000; max-height: 260px; margin-top: .4rem; }
.ap-challenge { font-size: 1.05rem; font-weight: 700; letter-spacing: .08em; white-space: nowrap; display: inline-block; }
.ap-auto-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.ap-auto-pick label { margin: 0; cursor: pointer; }
.ap-auto-pick input { position: absolute; opacity: 0; pointer-events: none; }
.ap-auto-pick .box { display: block; height: 100%; padding: .75rem .9rem; border: 1.5px solid var(--ap-line, #eee3e6); border-radius: 12px; }
.ap-auto-pick .box strong { display: block; font-size: .9rem; }
.ap-auto-pick .box small { color: var(--ap-muted); font-size: .76rem; }
.ap-auto-pick input:checked + .box { border-color: var(--ap-burgundy); background: var(--ap-burgundy-50); }
.ap-auto-pick input:focus-visible + .box { outline: 2px solid var(--ap-burgundy); }
.ap-score { display: flex; align-items: center; gap: .6rem; margin: .2rem 0 .5rem; }
.ap-score .bar { flex: 1; height: 10px; border-radius: 999px; background: #f1eef0; overflow: hidden; }
.ap-score .bar span { display: block; height: 100%; border-radius: 999px; background: #18a957; }
.ap-score.Review .bar span { background: #d48a00; } .ap-score.Alert .bar span { background: #d31f3c; }
.ap-score b { font-size: .95rem; min-width: 52px; text-align: end; }
.ap-cmp { width: 100%; font-size: .78rem; border-collapse: collapse; margin-top: .3rem; }
.ap-cmp th { color: var(--ap-muted); font-weight: 500; text-align: start; padding: .3rem .4rem; border-bottom: 1px solid var(--ap-line, #eee3e6); }
.ap-cmp td { padding: .35rem .4rem; border-bottom: 1px solid var(--ap-line, #eee3e6); overflow-wrap: anywhere; }
.ap-cmp .ok { color: #146c43; font-weight: 800; } .ap-cmp .no { color: #a3122b; font-weight: 800; }
.ap-auto-chip { font-size: .68rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; background: #eef2ff; color: #3446a8; }
.ap-job { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 12px; background: #f6f8ff; border: 1px solid #dfe5fb; margin-bottom: .8rem; font-size: .86rem; }
.ap-job.Failed { background: #fff6f7; border-color: #f3c3cb; }
.ap-job .spin { width: 16px; height: 16px; border: 2px solid #9fb0f0; border-top-color: #3446a8; border-radius: 50%; animation: ap-spin 1s linear infinite; }
@keyframes ap-spin { to { transform: rotate(360deg); } }
.ap-job > svg { width: 18px; height: 18px; flex-shrink: 0; }
