/* Publisher shell uses .pub-sidebar (React-style); older .ap-sidebar rules do not apply. */
.ap-nav-group {
  margin: 0;
  padding: 0;
  border: 0;
}
.ap-nav-group summary.ap-nav-summary {
  list-style: none;
  padding: 0.35rem 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.55);
  cursor: pointer;
  user-select: none;
}
.ap-nav-group summary.ap-nav-summary::-webkit-details-marker {
  display: none;
}
.ap-nav-group .ap-nav-link {
  padding-left: 1.35rem;
  font-size: 0.85rem;
}

:root {
  --ap-bg: #f1f5f9;
  --ap-card: #fff;
  --ap-text: #0f172a;
  --ap-muted: #64748b;
  --ap-border: #e2e8f0;
  --ap-sidebar: #0f172a;
  --ap-sidebar-text: #e2e8f0;
  --ap-accent: #2563eb;
  --ap-accent-hover: #1d4ed8;
  --ap-danger: #dc2626;
  --ap-success: #16a34a;
  --ra-chart-click: #3b82f6;
  --ra-chart-conv: #22c55e;
  --ra-chart-earn: #eab308;
  --ap-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght.woff2?v=1") format("woff2-variations"),
       url("fonts/inter-latin-wght.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }
body.ap-body { margin: 0; font-family: var(--ap-font); background: var(--ap-bg); color: var(--ap-text); }

.ap-shell { display: flex; min-height: 100vh; }
.ap-sidebar {
  width: 240px; flex-shrink: 0; background: var(--ap-sidebar); color: var(--ap-sidebar-text);
  display: flex; flex-direction: column; padding: 1rem 0;
}
.ap-brand { font-weight: 700; padding: 0 1rem 1rem; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.ap-nav { flex: 1; padding: .75rem 0; display: flex; flex-direction: column; gap: 2px; }
.ap-nav-link {
  display: block; padding: .55rem 1rem; color: rgba(226,232,240,.9); text-decoration: none; font-size: .9rem;
}
.ap-nav-link:hover { background: rgba(255,255,255,.06); }
.ap-nav-link.is-active { background: rgba(37, 99, 235, .35); color: #fff; }
.ap-sidebar-foot { padding: .5rem 0; border-top: 1px solid rgba(255,255,255,.08); }

.ap-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ap-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; background: var(--ap-card); border-bottom: 1px solid var(--ap-border);
}
.ap-page-title { margin: 0; font-size: 1.15rem; font-weight: 600; }
.ap-user { font-size: .875rem; color: var(--ap-muted); }
.ap-content { padding: 1.5rem; flex: 1; }

.ap-card {
  background: var(--ap-card); border-radius: 10px; border: 1px solid var(--ap-border);
  padding: 1.25rem; margin-bottom: 1rem;
}
.ap-grid { display: grid; gap: 1rem; }
.ap-grid-6 { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ap-grid-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.ap-stat {
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; border-radius: 10px; padding: 1rem;
}
.ap-stat-label { font-size: .7rem; opacity: .85; margin-bottom: .25rem; }
.ap-stat-value { font-size: 1.5rem; font-weight: 700; }
.ap-stat-sub { font-size: .65rem; opacity: .75; margin-top: .25rem; }

.ap-substats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ap-substat { background: var(--ap-card); border: 1px solid var(--ap-border); border-radius: 10px; padding: 1rem; }
.ap-substat h3 { margin: 0 0 .5rem; font-size: .875rem; color: var(--ap-muted); }
.ap-substat-rows { display: grid; gap: .35rem; font-size: .875rem; }

.ap-table-wrap { overflow-x: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.ap-table th, .ap-table td { border-bottom: 1px solid var(--ap-border); padding: .5rem .65rem; text-align: left; }
.ap-table th { background: #f8fafc; font-weight: 600; }
.ap-table tr:hover { background: #f8fafc; }

.ap-btn {
  display: inline-block; padding: .45rem .85rem; border-radius: 8px; border: none; cursor: pointer;
  font-size: .85rem; font-weight: 500; text-decoration: none; color: #fff; background: var(--ap-accent);
}
.ap-btn:hover { background: var(--ap-accent-hover); }
.ap-btn-secondary { background: #64748b; }
.ap-btn-danger { background: var(--ap-danger); }
.ap-btn-sm { padding: .25rem .5rem; font-size: .75rem; }

.ap-form-row { margin-bottom: .75rem; }
.ap-form-row label { display: block; font-size: .8rem; color: var(--ap-muted); margin-bottom: .25rem; }
.ap-form-row input, .ap-form-row select, .ap-form-row textarea {
  width: 100%; max-width: 420px; padding: .45rem .6rem; border: 1px solid var(--ap-border); border-radius: 8px;
}
.ap-form-inline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }

.ap-loading { display: flex; align-items: center; justify-content: center; min-height: 120px; color: var(--ap-muted); }
.ap-msg { padding: .75rem; border-radius: 8px; margin-bottom: 1rem; font-size: .875rem; }
.ap-msg-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ap-msg-ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.ap-modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; z-index: 50;
}
.ap-modal-overlay.is-open { display: flex; }
.ap-modal { background: var(--ap-card); border-radius: 12px; padding: 1.25rem; max-width: 520px; width: 92%; max-height: 90vh; overflow-y: auto; }
.ap-modal h2 { margin: 0 0 1rem; font-size: 1.1rem; }

.ap-pre {
  background: #f8fafc; padding: 1rem; border-radius: 8px; border: 1px solid var(--ap-border);
  font-size: 0.8rem; max-height: 320px; overflow: auto;
}

@media (max-width: 768px) {
  .ap-shell { flex-direction: column; }
  .ap-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .ap-nav { flex-direction: row; flex-wrap: wrap; }
  .ap-substats { grid-template-columns: 1fr; }
}

/* ========== Admin UI (aligned with React affiliate-admin-panel) ========== */
body.ap-admin {
  font-family: var(--ap-font);
  background: #f9fafb;
  color: #111827;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: middle;
}
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: middle;
}
.ap-admin .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ra-shell {
  display: flex;
  min-height: 100vh;
}
.ra-sidebar {
  width: 16rem;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 20;
  transition: width 0.25s ease;
}
.ra-shell.ra-collapsed .ra-sidebar {
  width: 5rem;
}
.ra-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.25rem 0.75rem;
  margin-bottom: 0.25rem;
}
.ra-brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ra-brand-lockup {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  overflow: visible;
  text-overflow: clip;
}
.ra-brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #dc2626;
}
.ra-shell.ra-collapsed .ra-brand {
  display: none;
}
.ra-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.ra-icon-btn:hover {
  background: #e5e7eb;
}
.ra-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.15rem;
}
.ra-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  transition: background 0.15s, color 0.15s;
}
.ra-nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.ra-nav-link.is-active {
  background: #2563eb;
  color: #fff;
}
.ra-nav-ico {
  --nav-from: #94a3b8;
  --nav-to: #64748b;
  font-size: 1.05rem !important;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  overflow: hidden;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  color: #fff !important;
  background: linear-gradient(165deg, var(--nav-from) 0%, var(--nav-to) 100%) !important;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08), 0 4px 8px color-mix(in srgb, var(--nav-to) 28%, transparent);
}
.ra-nav-ico--dollar {
  font-size: 1.2rem !important;
  font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 24;
  font-weight: 700;
  line-height: 1;
  width: 1.75rem;
}
/* Colorful sidebar icon badges — deep saturations */
.ra-nav-ico--dashboard { --nav-from: #1d4ed8; --nav-to: #1e3a8a; }
.ra-nav-ico--offers,
.ra-nav-ico--dollar { --nav-from: #16a34a; --nav-to: #14532d; }
.ra-nav-ico--campaigns { --nav-from: #ea580c; --nav-to: #9a3412; }
.ra-nav-ico--campaigns-all { --nav-from: #d97706; --nav-to: #92400e; }
.ra-nav-ico--campaigns-approved { --nav-from: #16a34a; --nav-to: #14532d; }
.ra-nav-ico--campaigns-add,
.ra-nav-ico--campaigns-create { --nav-from: #059669; --nav-to: #064e3b; }
.ra-nav-ico--campaigns-compare { --nav-from: #0284c7; --nav-to: #0c4a6e; }
.ra-nav-ico--campaigns-analytics { --nav-from: #7c3aed; --nav-to: #4c1d95; }
.ra-nav-ico--campaigns-aliases { --nav-from: #ea580c; --nav-to: #9a3412; }
.ra-nav-ico--campaigns-payout-blocks { --nav-from: #dc2626; --nav-to: #7f1d1d; }
.ra-nav-ico--campaigns-image-bot { --nav-from: #db2777; --nav-to: #9d174d; }
.ra-nav-ico--campaigns-webhooks { --nav-from: #4f46e5; --nav-to: #312e81; }
.ra-nav-ico--campaigns-gateways { --nav-from: #0d9488; --nav-to: #115e59; }
.ra-nav-ico--campaigns-domains,
.ra-nav-ico--int-domain { --nav-from: #0284c7; --nav-to: #0c4a6e; }
.ra-nav-ico--campaigns-mine { --nav-from: #d97706; --nav-to: #92400e; }
.ra-nav-ico--forms { --nav-from: #7c3aed; --nav-to: #4c1d95; }
.ra-nav-ico--forms-builder { --nav-from: #9333ea; --nav-to: #6b21a8; }
.ra-nav-ico--payouts { --nav-from: #059669; --nav-to: #064e3b; }
.ra-nav-ico--pay { --nav-from: #16a34a; --nav-to: #14532d; }
.ra-nav-ico--bulk-pay { --nav-from: #0d9488; --nav-to: #115e59; }
.ra-nav-ico--manual-pay { --nav-from: #ca8a04; --nav-to: #854d0e; }
.ra-nav-ico--wallet-gateways { --nav-from: #1d4ed8; --nav-to: #1e3a8a; }
.ra-nav-ico--wallet-requests { --nav-from: #0891b2; --nav-to: #164e63; }
.ra-nav-ico--user-wallet-requests { --nav-from: #7c3aed; --nav-to: #4c1d95; }
.ra-nav-ico--bulk { --nav-from: #4f46e5; --nav-to: #312e81; }
.ra-nav-ico--monitors { --nav-from: #0891b2; --nav-to: #164e63; }
.ra-nav-ico--vip-monitor { --nav-from: #ca8a04; --nav-to: #854d0e; }
.ra-nav-ico--campaign-monitor { --nav-from: #0891b2; --nav-to: #155e75; }
.ra-nav-ico--tools { --nav-from: #64748b; --nav-to: #334155; }
.ra-nav-ico--tickets { --nav-from: #d97706; --nav-to: #92400e; }
.ra-nav-ico--ban { --nav-from: #dc2626; --nav-to: #7f1d1d; }
.ra-nav-ico--ip-whitelist { --nav-from: #16a34a; --nav-to: #14532d; }
.ra-nav-ico--refer-list { --nav-from: #1d4ed8; --nav-to: #1e3a8a; }
.ra-nav-ico--vip-access { --nav-from: #d97706; --nav-to: #92400e; }
.ra-nav-ico--vip-common { --nav-from: #ca8a04; --nav-to: #854d0e; }
.ra-nav-ico--manage-site { --nav-from: #64748b; --nav-to: #1e293b; }
.ra-nav-ico--reports { --nav-from: #4f46e5; --nav-to: #312e81; }
.ra-nav-ico--rep-conv { --nav-from: #ca8a04; --nav-to: #854d0e; }
.ra-nav-ico--rep-clicks,
.ra-nav-ico--click-report { --nav-from: #db2777; --nav-to: #9d174d; }
.ra-nav-ico--rep-goal,
.ra-nav-ico--goal-report { --nav-from: #4f46e5; --nav-to: #312e81; }
.ra-nav-ico--cutback-report { --nav-from: #dc2626; --nav-to: #7f1d1d; }
.ra-nav-ico--pending-payments { --nav-from: #d97706; --nav-to: #92400e; }
.ra-nav-ico--account { --nav-from: #1d4ed8; --nav-to: #1e3a8a; }
.ra-nav-ico--acc-profile { --nav-from: #1d4ed8; --nav-to: #1e3a8a; }
.ra-nav-ico--acc-api { --nav-from: #0284c7; --nav-to: #0c4a6e; }
.ra-nav-ico--acc-postback { --nav-from: #7c3aed; --nav-to: #4c1d95; }
.ra-nav-ico--payments { --nav-from: #059669; --nav-to: #064e3b; }
.ra-nav-ico--pay-withdraw { --nav-from: #0d9488; --nav-to: #115e59; }
.ra-nav-ico--pay-history { --nav-from: #0d9488; --nav-to: #134e4a; }
.ra-nav-ico--camp-link { --nav-from: #7c3aed; --nav-to: #4c1d95; }
.ra-nav-ico--aff-reports { --nav-from: #0284c7; --nav-to: #0c4a6e; }
.ra-nav-ico--postback { --nav-from: #7c3aed; --nav-to: #4c1d95; }
.ra-nav-ico--advertisers { --nav-from: #d97706; --nav-to: #92400e; }
.ra-nav-ico--requests { --nav-from: #0d9488; --nav-to: #115e59; }
.ra-nav-ico--notify { --nav-from: #e11d48; --nav-to: #9f1239; }
.ra-nav-ico--telegram { --nav-from: #0284c7; --nav-to: #0c4a6e; }
.ra-nav-ico--backup { --nav-from: #0f766e; --nav-to: #134e4a; }
.ra-nav-ico--profile { --nav-from: #64748b; --nav-to: #1e293b; }
.ra-nav-ico--logout { --nav-from: #dc2626; --nav-to: #7f1d1d; }
.ra-nav-link.is-active .ra-nav-ico,
.ra-nav-group-btn.is-active .ra-nav-ico {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45), 0 3px 8px rgb(15 23 42 / 0.2);
}
.ra-nav-group {
  display: flex;
  flex-direction: column;
}
.ra-nav-group-btn {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.ra-nav-group-btn .ra-nav-arrow {
  margin-left: auto;
  font-size: 1.125rem !important;
  transition: transform 0.2s;
  color: inherit;
  opacity: 0.7;
}
.ra-nav-group.is-open > .ra-nav-group-btn .ra-nav-arrow {
  transform: rotate(180deg);
}
.ra-nav-children {
  display: none;
  flex-direction: column;
  gap: 0.125rem;
  padding-left: 0.35rem;
  margin: 0.125rem 0 0.25rem;
  border-left: 2px solid #e2e8f0;
  margin-left: 1.35rem;
}
.ra-nav-group.is-open > .ra-nav-children {
  display: flex;
}
.ra-nav-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.ra-nav-child:hover,
.ra-nav-subchild:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.ra-nav-child.is-active,
.ra-nav-subchild.is-active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}
.ra-nav-child-ico {
  font-size: 0.95rem !important;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  text-align: center;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.42rem;
  overflow: hidden;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  color: #fff !important;
  background: linear-gradient(165deg, var(--nav-from, #94a3b8) 0%, var(--nav-to, #64748b) 100%) !important;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08), 0 3px 6px color-mix(in srgb, var(--nav-to, #64748b) 28%, transparent);
}
.ra-nav-child-txt {
  min-width: 0;
}
.ra-nav-subgroup {
  display: flex;
  flex-direction: column;
}
.ra-nav-subgroup-btn .ra-nav-sub-arrow {
  margin-left: auto;
  font-size: 1rem !important;
  transition: transform 0.2s;
  opacity: 0.7;
}
.ra-nav-subgroup.is-open > .ra-nav-subgroup-btn .ra-nav-sub-arrow {
  transform: rotate(180deg);
}
.ra-nav-sub-children {
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  padding-left: 0.5rem;
  margin: 0.1rem 0 0.15rem 1.75rem;
}
.ra-nav-subgroup.is-open > .ra-nav-sub-children {
  display: flex;
}
.ra-nav-subchild {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  transition: background 0.15s, color 0.15s;
}
.ra-shell.ra-collapsed .ra-nav-group .ra-nav-children,
.ra-shell.ra-collapsed .ra-nav-arrow,
.ra-shell.ra-collapsed .ra-nav-sub-arrow {
  display: none !important;
}
.ra-shell.ra-collapsed .ra-nav-txt {
  display: none;
}
.ra-shell.ra-collapsed .ra-nav-link {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.ra-sidebar-foot {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}
.ra-nav {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.ra-nav-logout:hover {
  background: #ef4444;
  color: #fff;
}
.ra-nav-logout:hover .ra-nav-ico {
  color: #fff;
}

.ra-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  margin-left: 16rem;
  transition: margin-left 0.25s ease;
}
.ra-shell.ra-collapsed .ra-main {
  margin-left: 5rem;
}

.ra-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.ra-welcome {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}
.ra-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Theme + notifications icons only (not menu / profile) */
.ra-topbar-actions > .ra-icon-btn[data-theme-toggle],
.ra-topbar-actions > .ra-notify-btn {
  width: 2.4rem;
  height: 2.4rem;
}
.ra-topbar-actions > .ra-icon-btn[data-theme-toggle] .material-symbols-outlined,
.ra-topbar-actions > .ra-notify-btn .material-symbols-outlined {
  font-size: 1.3rem !important;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
}
.ra-topbar-actions > .ra-icon-btn[data-theme-toggle] {
  color: #7c3aed;
}
.ra-topbar-actions > .ra-icon-btn[data-theme-toggle]:hover {
  background: #f3e8ff;
  color: #6d28d9;
}
.ra-topbar-actions > .ra-notify-btn {
  color: #2563eb;
}
.ra-topbar-actions > .ra-notify-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
html.dark body.ap-admin .ra-topbar-actions > .ra-icon-btn[data-theme-toggle],
html.dark body.ap-publisher .ra-topbar-actions > .ra-icon-btn[data-theme-toggle] {
  color: #c4b5fd;
}
html.dark body.ap-admin .ra-topbar-actions > .ra-icon-btn[data-theme-toggle]:hover,
html.dark body.ap-publisher .ra-topbar-actions > .ra-icon-btn[data-theme-toggle]:hover {
  background: #2e1065;
  color: #ddd6fe;
}
html.dark body.ap-admin .ra-topbar-actions > .ra-notify-btn,
html.dark body.ap-publisher .ra-topbar-actions > .ra-notify-btn {
  color: #60a5fa;
}
html.dark body.ap-admin .ra-topbar-actions > .ra-notify-btn:hover,
html.dark body.ap-publisher .ra-topbar-actions > .ra-notify-btn:hover {
  background: #172554;
  color: #93c5fd;
}
.ra-notify-btn .ra-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.625rem;
  line-height: 1rem;
  text-align: center;
}
.ra-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  margin-left: 0.25rem;
}
.ra-profile-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Match sidebar “ADMIN” badge (red / small / bold caps) */
body.ap-admin .ra-profile-name.ra-brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #dc2626;
  max-width: 12rem;
}
.ra-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ra-content {
  flex: 1;
  padding: 1.5rem;
  background: #f9fafb;
  overflow: auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Dashboard (React-style) */
.ra-dash-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #6b7280;
}
.ra-chart-canvas { position: relative; }
.ra-dash-wait {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem !important;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(3px);
}
.ra-dash-wait[hidden] { display: none !important; }
.ra-dash-wait .ap-wait-scene { width: min(28rem, 100%); }
html.dark .ra-dash-wait { background: rgba(15, 23, 42, 0.9); }
.ra-dash {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 100%;
  width: 100%;
}
.ra-dash-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 1024px) {
  .ra-dash-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Admin dashboard — fit top cards + chart + bottom cards in one viewport (no scroll) */
body.ap-admin .ra-content:has(.ra-dash--admin) {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 4rem);
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  padding: 0.85rem 1.15rem;
  box-sizing: border-box;
}
body.ap-admin .ra-content:has(.ra-dash--admin) #dash-root {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.ap-admin .ra-dash--admin {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  gap: 0.5rem;
  box-sizing: border-box;
  overflow: hidden;
}
body.ap-admin .ra-dash--admin .ra-dash-cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  flex: 0 0 auto;
}
body.ap-admin .ra-dash--admin .ra-stat-card {
  min-height: 6.5rem;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
}
body.ap-admin .ra-dash--admin .ra-stat-value {
  font-size: 1.35rem;
}
body.ap-admin .ra-dash--admin .ra-stat-watermark {
  font-size: 2.25rem !important;
}
body.ap-admin .ra-dash--admin .ra-chart-card {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.ap-admin .ra-dash--admin .ra-chart-head {
  flex: 0 0 auto;
  padding: 0.4rem 0.85rem;
}
body.ap-admin .ra-dash--admin .ra-chart-canvas {
  flex: 1 1 0;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0.35rem 0.5rem 0.4rem;
}
body.ap-admin .ra-dash--admin .ra-dash-bottom {
  flex: 0 0 auto;
  gap: 0.5rem;
}
body.ap-admin .ra-dash--admin .ra-bottom-stat {
  padding: 0.85rem 1rem;
  min-height: 6.5rem;
}
body.ap-admin .ra-dash--admin .ra-bottom-num {
  font-size: 1.2rem;
}

/* Publisher dashboard — full width + fit chart + bottom cards in one viewport */
body.ap-publisher .ra-shell {
  width: 100%;
  max-width: none;
}
body.ap-publisher .ra-main {
  width: auto;
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
}
body.ap-publisher .ra-content:has(.ra-dash--publisher) {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 4rem);
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  padding: 0.85rem 1.15rem;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}
body.ap-publisher .ra-content:has(.ra-dash--publisher) #dash-root {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
}
body.ap-publisher .ra-dash--publisher {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  gap: 0.65rem;
  box-sizing: border-box;
  overflow: hidden;
}
body.ap-publisher .ra-dash--publisher .ra-chart-card {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.ap-publisher .ra-dash--publisher .ra-chart-head {
  flex: 0 0 auto;
  padding: 0.45rem 0.9rem;
}
body.ap-publisher .ra-dash--publisher .ra-chart-canvas {
  flex: 1 1 0;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0.4rem 0.6rem 0.5rem;
}
body.ap-publisher .ra-dash--publisher .ra-dash-bottom {
  flex: 0 0 auto;
  width: 100%;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.ap-publisher .ra-dash--publisher .ra-bottom-stat {
  padding: 0.9rem 1rem;
  min-height: 6.75rem;
}
@media (max-width: 900px) {
  body.ap-publisher .ra-content:has(.ra-dash--publisher) {
    height: auto;
    max-height: none;
    overflow: auto;
  }
  body.ap-publisher .ra-dash--publisher {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.ap-publisher .ra-dash--publisher .ra-chart-card {
    flex: 0 0 auto;
    min-height: 280px;
  }
  body.ap-publisher .ra-dash--publisher .ra-chart-canvas {
    height: var(--ra-chart-mobile-h, 320px) !important;
    min-height: var(--ra-chart-mobile-h, 320px) !important;
    max-height: var(--ra-chart-mobile-h, 320px) !important;
  }
  body.ap-publisher .ra-dash--publisher .ra-dash-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  body.ap-admin .ra-dash--admin .ra-dash-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  body.ap-admin .ra-content:has(.ra-dash--admin) {
    height: auto;
    max-height: none;
    overflow: auto;
  }
  body.ap-admin .ra-dash--admin {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.ap-admin .ra-dash--admin .ra-dash-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.ap-admin .ra-dash--admin .ra-chart-card {
    flex: none;
    min-height: 16rem;
  }
  body.ap-admin .ra-dash--admin .ra-chart-canvas {
    flex: none;
    min-height: 16rem !important;
    height: var(--ra-chart-mobile-h, 320px) !important;
    max-height: var(--ra-chart-mobile-h, 320px) !important;
  }
}
.ra-stat-card {
  position: relative;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  min-height: 4.5rem;
}
.ra-stat-watermark {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  font-size: 2.25rem !important;
  opacity: 0.15;
  pointer-events: none;
}
.ra-stat-inner {
  position: relative;
  z-index: 1;
}
.ra-stat-label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  opacity: 0.85;
}
.ra-stat-value {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.ra-stat-sub {
  margin: 0.15rem 0 0;
  font-size: 0.625rem;
  opacity: 0.75;
}
.ra-g-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.ra-g-green { background: linear-gradient(135deg, #22c55e, #15803d); }
.ra-g-purple { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.ra-g-indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
.ra-g-sky { background: linear-gradient(135deg, #0ea5e9, #1d4ed8); }
.ra-g-pink { background: linear-gradient(135deg, #ec4899, #be185d); }

.ra-chart-card {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0.25rem 0;
}
.ra-chart-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.ra-chart-ico {
  color: #3b82f6;
  font-size: 1.25rem !important;
}
.ra-chart-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
}
.ra-chart-canvas {
  flex: none;
  height: 330px;
  min-height: 330px;
  max-height: 330px;
  padding: 0.5rem;
  position: relative;
  background:
    linear-gradient(180deg, rgba(248,250,252,0.9) 0%, rgba(255,255,255,1) 100%);
  border-radius: 0.75rem;
}
/* No CSS fake grid — Chart.js already draws axis-aligned grid lines (avoids double lining). */
.ra-chart-canvas--ready::before {
  content: none;
  display: none;
}
.ra-chart-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  position: relative;
  z-index: 1;
}

/* Desktop dashboard — fixed graph height (do not stretch to viewport) */
@media (min-width: 1024px) {
  .ra-dash {
    min-height: 0;
  }
  .ra-chart-card {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
  }
  .ra-chart-canvas {
    height: 330px;
    min-height: 330px;
    max-height: 330px;
  }
  /* Default publisher chart height (non-dashboard pages); dashboard uses .ra-dash--publisher fit */
  body.ap-publisher:not(:has(.ra-dash--publisher)) .ra-chart-canvas {
    height: 380px;
    min-height: 380px;
    max-height: 380px;
  }
  body.ap-admin:not(:has(.ra-dash--admin)) .ra-chart-canvas {
    height: 305px;
    min-height: 305px;
    max-height: 305px;
  }
}

.ra-dash-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .ra-dash-bottom {
    grid-template-columns: 1fr;
  }
  .ra-dash-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ra-bottom-stat {
  position: relative;
  border-radius: 0.75rem;
  padding: 1.15rem 1.05rem;
  min-height: 8.25rem;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ra-bottom-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.ra-bottom-green { background: linear-gradient(135deg, #22c55e, #15803d); }
.ra-bottom-yellow { background: linear-gradient(135deg, #eab308, #a16207); }
.ra-bottom-head {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  margin-bottom: 0.65rem;
}
.ra-bottom-head h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  grid-column: 1;
  justify-self: start;
}
.ra-bottom-tag {
  font-size: 0.625rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}
.ra-bottom-grid > div .ra-bottom-tag {
  display: inline-block;
  margin: 0 0 0.2rem;
}
.ra-bottom-num--flash {
  animation: ra-live-flash 0.35s ease;
}
@keyframes ra-live-flash {
  from { transform: scale(1.08); opacity: 0.7; }
  to { transform: scale(1); opacity: 1; }
}
.ra-bottom-head .ra-bottom-tag {
  grid-column: 2;
  justify-self: center;
}
.ra-bottom-num--flash {
  animation: ra-live-flash 0.35s ease;
}
@keyframes ra-live-flash {
  from { transform: scale(1.08); opacity: 0.7; }
  to { transform: scale(1); opacity: 1; }
}
.ra-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  text-align: center;
}
.ra-bottom-dim {
  margin: 0;
  font-size: 0.68rem;
  opacity: 0.75;
}
.ra-bottom-num {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Admin mobile drawer — see "Mobile responsive" section at end of file */

/* Publisher uses same ra-shell as admin (no separate topbar offset) */
body.ap-publisher {
  font-family: var(--ap-font);
  background: #f9fafb;
  color: #111827;
  margin: 0;
  padding-top: 0;
}
.ap-publisher .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Publisher nav icon colors (match admin vibrance) */
body.ap-publisher .ra-nav-ico--dashboard { color: #2563eb; }
body.ap-publisher .ra-nav-ico--campaigns { color: #ea580c; }
body.ap-publisher .ra-nav-ico--reports { color: #4f46e5; }
body.ap-publisher .ra-nav-ico--account { color: #0891b2; }
body.ap-publisher .ra-nav-ico--payments { color: #059669; }
body.ap-publisher .ra-nav-ico--camp-link { color: #7c3aed; }
body.ap-publisher .ra-nav-ico--notify { color: #e11d48; }
body.ap-publisher .ra-nav-ico--logout { color: #dc2626; }
body.ap-publisher .ra-nav-link.is-active .ra-nav-ico { color: #fff; }

/* Older publisher topbar/sidebar kept for leftover pages; shell uses ra-* now */
.pub-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.pub-logo {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pub-logo-hi { color: #2563eb; }
.pub-logo-rest { color: #374151; }
.pub-top-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.pub-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #6b7280;
  text-decoration: none;
  cursor: pointer;
}
.pub-icon-btn:hover {
  background: #e5e7eb;
}
.pub-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.625rem;
  line-height: 1rem;
  text-align: center;
}
.pub-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-left: 0.25rem;
}

.pub-sidebar {
  position: fixed;
  top: 3.5rem;
  left: 0;
  bottom: 0;
  width: 16rem;
  z-index: 20;
  background: #f3f4f6;
  border-right: 1px solid #e5e7eb;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pub-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.15rem;
}
.pub-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.pub-nav-item:hover {
  background: #e5e7eb;
  color: #111827;
}
.pub-nav-item.is-active {
  background: #2563eb;
  color: #fff;
}
.pub-nav-item.is-active .material-symbols-outlined {
  color: #fff;
}
.pub-nav-item .material-symbols-outlined {
  font-size: 1.25rem !important;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
  color: #6b7280;
}
.pub-nav-item.is-active .material-symbols-outlined {
  color: #fff;
}

.pub-group {
  border-radius: 0.5rem;
  margin: 0;
}
.pub-group-head {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.75rem;
  min-height: 2.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  transition: background 0.15s, color 0.15s;
}
.pub-group-head::-webkit-details-marker {
  display: none;
}
.pub-group-head:hover {
  background: #e5e7eb;
}
.pub-group-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.pub-group-left .material-symbols-outlined {
  font-size: 1.25rem !important;
  flex-shrink: 0;
}
.pub-group-left .pub-nav-ico--dashboard { color: #2563eb; }
.pub-group-left .pub-nav-ico--campaigns { color: #ea580c; }
.pub-group-left .pub-nav-ico--reports { color: #4f46e5; }
.pub-group-left .pub-nav-ico--account { color: #0891b2; }
.pub-group-left .pub-nav-ico--payments { color: #059669; }
.pub-group-left .pub-nav-ico--camp-link { color: #7c3aed; }
.pub-group-left .pub-nav-ico--camp-link { color: #7c3aed; }
.pub-chev {
  font-size: 1.15rem !important;
  color: #9ca3af;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.pub-group[open] .pub-chev {
  transform: rotate(180deg);
}
.pub-group:has(.pub-sublink.is-active) > .pub-group-head {
  background: #e5e7eb;
  color: #111827;
}
.pub-group-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.25rem;
  padding-left: 0.15rem;
}
.pub-sublink {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.875rem;
  color: #4b5563;
  transition: background 0.15s, color 0.15s;
}
.pub-sublink:hover {
  background: #e5e7eb;
  color: #111827;
}
.pub-sublink.is-active {
  background: #2563eb;
  color: #fff;
}
.pub-sublink-ico {
  font-size: 0.95rem !important;
  flex-shrink: 0;
  opacity: 0.85;
}
.pub-sublink.is-active .pub-sublink-ico {
  color: #fff;
}
.pub-nav-foot {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}
.pub-logout:hover {
  background: #ef4444 !important;
  color: #fff !important;
}
.pub-logout:hover .material-symbols-outlined {
  color: #fff !important;
}
.pub-nav-ico {
  font-size: 1.25rem !important;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}
.pub-nav-ico--dashboard { color: #2563eb; }
.pub-nav-ico--campaigns { color: #ea580c; }
.pub-nav-ico--reports { color: #4f46e5; }
.pub-nav-ico--account { color: #0891b2; }
.pub-nav-ico--payments { color: #059669; }
.pub-nav-ico--logout { color: #dc2626; }
.pub-nav-ico--camp-link { color: #7c3aed; }
.pub-group-title-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 0.05rem;
}
.pub-group-title-line {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
}
.pub-group--campaign-link > .pub-group-head {
  align-items: center;
  min-height: 3rem;
}
.pub-group--campaign-link .pub-sublink-ico {
  color: #64748b;
  opacity: 0.9;
}
.pub-nav-item.is-active .pub-nav-ico,
.pub-sublink.is-active .pub-sublink-ico {
  color: #fff !important;
}
.pub-sublink-ico {
  color: #64748b;
}
.pub-group-body .pub-sublink[href*="all-offers"] .pub-sublink-ico { color: #2563eb; }
.pub-group-body .pub-sublink[href*="approved"] .pub-sublink-ico { color: #16a34a; }
.pub-group-body .pub-sublink[href*="create"] .pub-sublink-ico { color: #ea580c; }
.pub-group-body .pub-sublink[href*="my-campaigns"] .pub-sublink-ico { color: #7c3aed; }
.pub-group-body .pub-sublink[href*="referrals"] .pub-sublink-ico { color: #db2777; }
.pub-group-body .pub-sublink[href*="conversion"] .pub-sublink-ico { color: #059669; }
.pub-group-body .pub-sublink[href*="clicks"] .pub-sublink-ico { color: #db2777; }
.pub-group-body .pub-sublink[href*="goal"] .pub-sublink-ico { color: #d97706; }
.pub-group-body .pub-sublink[href*="profile"] .pub-sublink-ico { color: #475569; }
.pub-group-body .pub-sublink[href*="/api"] .pub-sublink-ico { color: #0284c7; }
.pub-group-body .pub-sublink[href*="postback"] .pub-sublink-ico { color: #9333ea; }
.pub-group-body .pub-sublink[href*="withdrawal"] .pub-sublink-ico { color: #059669; }
.pub-group-body .pub-sublink[href*="payment-history"] .pub-sublink-ico { color: #0d9488; }

/* Publisher postback page */
.ra-pb-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 72rem;
}
.ra-pb-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 55%, #ecfeff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}
.ra-pb-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}
.ra-pb-sub {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: #64748b;
  max-width: 40rem;
}
.ra-pb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .ra-pb-grid { grid-template-columns: 1fr; }
}
.ra-pb-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ra-pb-card-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}
.ra-pb-card-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}
.ra-pb-card-head p {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.45;
}
.ra-pb-card-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  color: #fff;
  font-size: 1.35rem !important;
  flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(30, 58, 138, 0.42);
}
.ra-pb-card-ico--event {
  background: linear-gradient(165deg, #7c3aed, #4c1d95);
  color: #fff;
  box-shadow: 0 8px 16px rgba(76, 29, 149, 0.42);
}
.ra-pb-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(12rem, 0.9fr);
  gap: 1rem;
}
@media (max-width: 720px) {
  .ra-pb-form-grid { grid-template-columns: 1fr; }
}
.ra-pb-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}
.ra-pb-textarea {
  width: 100%;
  min-height: 8.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #111827;
  background: #f8fafc;
  resize: vertical;
  line-height: 1.45;
}
.ra-pb-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #fff;
}
.ra-pb-tokens-panel {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.85rem;
}
.ra-pb-tokens-label {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.ra-pb-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.45;
  word-break: break-all;
}
.ra-pb-hint code {
  font-size: 0.7rem;
  color: #4338ca;
}
.ra-pb-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}
.ra-pb-steps {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  color: #4b5563;
  font-size: 0.875rem;
  line-height: 1.7;
}
.ra-pb-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  background: #7c3aed;
  color: #fff !important;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
.ra-pb-cta:hover { background: #6d28d9; }
.ra-pb-cta .material-symbols-outlined { font-size: 1.1rem; }
html.dark .ra-pb-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #312e81 55%, #134e4a 100%);
  border-color: #334155;
}
html.dark .ra-pb-title { color: #f8fafc; }
html.dark .ra-pb-sub,
html.dark .ra-pb-card-head p,
html.dark .ra-pb-steps { color: #94a3b8; }
html.dark .ra-pb-card {
  background: #111827;
  border-color: #374151;
}
html.dark .ra-pb-card-head h2 { color: #f3f4f6; }
html.dark .ra-pb-textarea {
  background: #0f172a;
  border-color: #374151;
  color: #e5e7eb;
}
html.dark .ra-pb-tokens-panel {
  background: #0f172a;
  border-color: #374151;
}
html.dark .ra-pb-hint code { color: #a5b4fc; }

.pub-group-left .material-symbols-outlined {
  color: #fff !important;
}
.pub-nav-ico {
  font-size: 1.25rem !important;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}
.pub-nav-ico--dashboard { color: #2563eb; }
.pub-nav-ico--campaigns { color: #ea580c; }
.pub-nav-ico--reports { color: #4f46e5; }
.pub-nav-ico--account { color: #0891b2; }
.pub-nav-ico--payments { color: #059669; }
.pub-nav-ico--logout { color: #dc2626; }
.pub-nav-ico--camp-link { color: #7c3aed; }
.pub-group-title-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 0.05rem;
}
.pub-group-title-line {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
}
.pub-group--campaign-link > .pub-group-head {
  align-items: center;
  min-height: 3rem;
}
.pub-group--campaign-link .pub-sublink-ico {
  color: #64748b;
  opacity: 0.9;
}
.pub-nav-item.is-active .pub-nav-ico,
.pub-sublink.is-active .pub-sublink-ico {
  color: #fff !important;
}
.pub-sublink-ico {
  color: #64748b;
}
.pub-group-body .pub-sublink[href*="all-offers"] .pub-sublink-ico { color: #2563eb; }
.pub-group-body .pub-sublink[href*="approved"] .pub-sublink-ico { color: #16a34a; }
.pub-group-body .pub-sublink[href*="create"] .pub-sublink-ico { color: #ea580c; }
.pub-group-body .pub-sublink[href*="my-campaigns"] .pub-sublink-ico { color: #7c3aed; }
.pub-group-body .pub-sublink[href*="referrals"] .pub-sublink-ico { color: #db2777; }
.pub-group-body .pub-sublink[href*="conversion"] .pub-sublink-ico { color: #059669; }
.pub-group-body .pub-sublink[href*="clicks"] .pub-sublink-ico { color: #db2777; }
.pub-group-body .pub-sublink[href*="goal"] .pub-sublink-ico { color: #d97706; }
.pub-group-body .pub-sublink[href*="profile"] .pub-sublink-ico { color: #475569; }
.pub-group-body .pub-sublink[href*="/api"] .pub-sublink-ico { color: #0284c7; }
.pub-group-body .pub-sublink[href*="postback"] .pub-sublink-ico { color: #9333ea; }
.pub-group-body .pub-sublink[href*="withdrawal"] .pub-sublink-ico { color: #059669; }
.pub-group-body .pub-sublink[href*="payment-history"] .pub-sublink-ico { color: #0d9488; }

/* Publisher postback page */
.ra-pb-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 72rem;
}
.ra-pb-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 55%, #ecfeff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}
.ra-pb-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}
.ra-pb-sub {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: #64748b;
  max-width: 40rem;
}
.ra-pb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .ra-pb-grid { grid-template-columns: 1fr; }
}
.ra-pb-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ra-pb-card-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}
.ra-pb-card-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}
.ra-pb-card-head p {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.45;
}
.ra-pb-card-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #2563eb;
  font-size: 1.35rem !important;
  flex-shrink: 0;
}
.ra-pb-card-ico--event {
  background: #f3e8ff;
  color: #9333ea;
}
.ra-pb-field { margin-bottom: 1rem; }
.ra-pb-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}
.ra-pb-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 7rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #111827;
  background: #fff;
  resize: vertical;
  line-height: 1.45;
}
.ra-pb-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.ra-pb-tokens-panel {
  margin-top: 0.15rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid #e0e7ff;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
.ra-pb-tokens-label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4338ca;
}
.ra-pb-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.ra-pb-token {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.38rem 0.78rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.ra-pb-token:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}
.ra-pb-token.is-used {
  transform: scale(0.96);
}
.ra-pb-token--blue { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.ra-pb-token--indigo { background: #e0e7ff; color: #4338ca; border-color: #a5b4fc; }
.ra-pb-token--cyan { background: #cffafe; color: #0e7490; border-color: #67e8f9; }
.ra-pb-token--violet { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.ra-pb-token--amber { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.ra-pb-token--green { background: #dcfce7; color: #15803d; border-color: #86efac; }
.ra-pb-token--teal { background: #ccfbf1; color: #0f766e; border-color: #5eead4; }
.ra-pb-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  word-break: break-all;
}
.ra-pb-hint code {
  font-size: 0.72rem;
  color: #4f46e5;
}
.ra-pb-actions {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ra-pb-saved {
  margin-top: 0.15rem;
}
.ra-pb-cancel,
.ra-pb-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border-radius: 0.65rem;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.ra-pb-cancel:hover,
.ra-pb-delete:hover { background: #f1f5f9; }
.ra-pb-delete { color: #b91c1c; border-color: #fecaca; }
.ra-pb-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.65rem;
  padding: 0.7rem 1.15rem;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
.ra-pb-save:hover { filter: brightness(1.05); }
.ra-pb-save:disabled { opacity: 0.65; cursor: wait; }
.ra-campaigns-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  border-radius: 0.65rem;
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
.ra-campaigns-btn--save {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 55%, #4c1d95 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.45);
}
.ra-campaigns-btn--save:hover { filter: brightness(1.06); }
.ra-campaigns-btn--save:disabled { opacity: 0.65; cursor: wait; }
.ra-campaigns-btn--cancel {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.ra-campaigns-btn--cancel:hover { background: #e5e7eb; }
.ra-pb-steps {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  color: #4b5563;
  font-size: 0.875rem;
  line-height: 1.7;
}
.ra-pb-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  background: #7c3aed;
  color: #fff !important;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
.ra-pb-cta:hover { background: #6d28d9; }
.ra-pb-cta .material-symbols-outlined { font-size: 1.1rem; }
html.dark .ra-pb-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #312e81 55%, #134e4a 100%);
  border-color: #334155;
}
html.dark .ra-pb-title { color: #f8fafc; }
html.dark .ra-pb-sub,
html.dark .ra-pb-card-head p,
html.dark .ra-pb-steps { color: #94a3b8; }
html.dark .ra-pb-card {
  background: #111827;
  border-color: #374151;
}
html.dark .ra-pb-card-head h2 { color: #f3f4f6; }
html.dark .ra-pb-field label { color: #d1d5db; }
html.dark .ra-pb-textarea {
  background: #0f172a;
  border-color: #374151;
  color: #e5e7eb;
}
html.dark .ra-pb-tokens-panel {
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
  border-color: #4338ca;
}
html.dark .ra-pb-tokens-label { color: #a5b4fc; }
html.dark .ra-pb-hint code { color: #a5b4fc; }

.pub-main {
  margin-left: 16rem;
  min-height: calc(100vh - 3.5rem);
  display: flex;
  flex-direction: column;
}
.pub-content {
  flex: 1;
  padding: 1.5rem;
  background: #f9fafb;
}

/* Publisher dashboard: 3 summary cards only */
.pub-dash-top.ra-dash-cards {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .pub-dash-top.ra-dash-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Page title under shell (both panels) */
.panel-page-head {
  padding: 0 0 1rem;
  margin-bottom: 0.25rem;
}
.panel-page-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}
body.ap-publisher .panel-page-head {
  padding: 1rem 1.5rem 0.75rem;
  margin: 0;
  background: #f9fafb;
}

/* —— Shared inner UI: cards, tables, forms (React/Tailwind look) —— */
body.ap-admin .ra-content .ap-card,
body.ap-publisher .pub-content .ap-card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
body.ap-admin .ra-content .ap-card h2,
body.ap-publisher .pub-content .ap-card h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}
body.ap-admin .ra-content .ap-muted,
body.ap-publisher .pub-content .ap-muted {
  color: #6b7280;
  font-size: 0.875rem;
}

body.ap-admin .ra-content .ap-table,
body.ap-publisher .pub-content .ap-table {
  font-size: 0.84rem;
  border-collapse: separate;
  border-spacing: 0;
}
body.ap-admin .ra-content .ap-table th,
body.ap-publisher .pub-content .ap-table th {
  background: #0f172a;
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 0;
  padding: 0.85rem 0.9rem;
  white-space: nowrap;
}
body.ap-admin .ra-content .ap-table td,
body.ap-publisher .pub-content .ap-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 0.8rem 0.9rem;
  color: #0f172a;
  white-space: nowrap;
  background: #fff;
  vertical-align: middle;
}
body.ap-admin .ra-content .ap-table tbody tr:nth-child(even) td,
body.ap-publisher .pub-content .ap-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}
body.ap-admin .ra-content .ap-table tr:hover td,
body.ap-publisher .pub-content .ap-table tr:hover td {
  background: #eff6ff !important;
}

body.ap-admin .ra-content .ap-btn,
body.ap-publisher .pub-content .ap-btn {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}
body.ap-admin .ra-content .ap-btn-secondary,
body.ap-publisher .pub-content .ap-btn-secondary {
  background: #6b7280;
}
body.ap-admin .ra-content .ap-btn-danger,
body.ap-publisher .pub-content .ap-btn-danger {
  background: #dc2626;
}

body.ap-admin .ra-content .ap-form-row label,
body.ap-publisher .pub-content .ap-form-row label {
  color: #4b5563;
  font-weight: 500;
  font-size: 0.8125rem;
}
body.ap-admin .ra-content .ap-form-row input,
body.ap-admin .ra-content .ap-form-row select,
body.ap-admin .ra-content .ap-form-row textarea,
body.ap-publisher .pub-content .ap-form-row input,
body.ap-publisher .pub-content .ap-form-row select,
body.ap-publisher .pub-content .ap-form-row textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
body.ap-admin .ra-content .ap-form-row input:focus,
body.ap-admin .ra-content .ap-form-row select:focus,
body.ap-admin .ra-content .ap-form-row textarea:focus,
body.ap-publisher .pub-content .ap-form-row input:focus,
body.ap-publisher .pub-content .ap-form-row select:focus,
body.ap-publisher .pub-content .ap-form-row textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body.ap-admin .ra-content .ap-modal,
body.ap-publisher .pub-content .ap-modal {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}
body.ap-admin .ra-content .ap-modal-overlay,
body.ap-publisher .pub-content .ap-modal-overlay {
  background: rgba(17, 24, 39, 0.45);
}

body.ap-admin .ra-content .ap-msg-error,
body.ap-publisher .pub-content .ap-msg-error {
  border-radius: 0.5rem;
}
body.ap-admin .ra-content .ap-msg-ok,
body.ap-publisher .pub-content .ap-msg-ok {
  border-radius: 0.5rem;
}

body.ap-admin .ra-content .ap-pre,
body.ap-publisher .pub-content .ap-pre {
  border-radius: 0.5rem;
  background: #f9fafb;
  border-color: #e5e7eb;
}

/* Publisher mobile drawer — see "Mobile responsive" section at end of file */

/* Auth screens (React Login.js style) */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #f3f4f6;
  font-family: var(--ap-font);
}
.auth-card {
  width: 100%;
  max-width: 28rem;
  background: #fff;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
}
.auth-card h1,
.auth-card h2 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: #111827;
}
.auth-lead {
  text-align: center;
  color: #4b5563;
  font-size: 0.9rem;
  margin: -0.5rem 0 1.25rem;
}
.auth-card label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.35rem;
}
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.auth-card input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.auth-card button[type="submit"] {
  width: 100%;
  padding: 0.6rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
.auth-card button[type="submit"]:hover {
  background: #1d4ed8;
}
.auth-err {
  background: #fee2e2;
  border: 1px solid #f87171;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.auth-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 1rem;
  text-align: center;
}
.auth-hint a {
  color: #2563eb;
}

.auth-choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.auth-choice {
  display: block;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: filter 0.15s;
}
.auth-choice:hover {
  filter: brightness(1.06);
}
.auth-choice-admin {
  background: #1e40af;
}
.auth-choice-pub {
  background: #15803d;
}

.auth-card--register button[type='submit'] {
  background: #15803d;
}
.auth-card--register button[type='submit']:hover {
  background: #166534;
}

/* Publisher auth (login + register) — matches admin login layout */
.auth-shell--publisher {
  position: relative;
  overflow: hidden;
  background: #f0f4ff;
  padding: 1.5rem;
}

.auth-publisher-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-publisher-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}

.auth-publisher-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: auth-publisher-float 12s ease-in-out infinite;
}

.auth-publisher-orb--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: #93c5fd;
}

.auth-publisher-orb--2 {
  width: 360px;
  height: 360px;
  right: -60px;
  bottom: -100px;
  background: #c4b5fd;
  animation-delay: -4s;
}

@keyframes auth-publisher-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.05); }
}

.auth-card--publisher {
  position: relative;
  z-index: 1;
  max-width: 26rem;
  padding: 2.25rem 2rem 1.75rem;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 25px 50px -12px rgba(37, 99, 235, 0.12),
    0 8px 24px -8px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-card--publisher.auth-card--register {
  max-width: 28rem;
}

.auth-publisher-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-publisher-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.85rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2563eb, #15803d);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.auth-publisher-logo svg {
  width: 1.75rem;
  height: 1.75rem;
}

.auth-publisher-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.auth-card--publisher h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.pub-brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #15803d;
}

.auth-card--publisher .auth-lead {
  margin: 0;
  color: #64748b;
  font-size: 0.875rem;
}

.auth-publisher-form {
  margin-top: 0.25rem;
}

.auth-card--publisher .auth-field {
  margin-bottom: 1.1rem;
}

.auth-card--publisher input[type="email"],
.auth-card--publisher input[type="password"],
.auth-card--publisher input[type="text"],
.auth-card--publisher input[type="tel"] {
  width: 100%;
  margin-bottom: 0;
  padding: 0.7rem 0.85rem 0.7rem 2.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-card--publisher input::placeholder {
  color: #94a3b8;
}

.auth-card--publisher input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-publisher-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.auth-publisher-submit svg {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.2s;
}

.auth-publisher-submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.auth-publisher-submit:hover svg {
  transform: translateX(3px);
}

.auth-publisher-submit:active {
  transform: translateY(0);
}

.auth-err--publisher {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  margin-bottom: 1rem;
}

.auth-err--publisher svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.auth-ok--publisher {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.auth-hint--publisher {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.875rem;
}

.auth-hint--publisher a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.auth-hint--publisher a:hover {
  text-decoration: underline;
}

.auth-publisher-foot {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .auth-card--publisher {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 1rem;
  }

  .auth-card--publisher h1 {
    font-size: 1.45rem;
  }
}

.auth-ok {
  color: #15803d;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-card-wide {
  max-width: 26rem;
}

.auth-card--publisher.auth-card--wide {
  max-width: 26rem;
}

.auth-forgot-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  color: #111827;
}

.auth-card--publisher .auth-step-desc {
  color: #64748b;
  font-size: 0.875rem;
  margin: 0 0 1rem;
  text-align: center;
}

.auth-card--publisher .msg {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
}

.auth-card--publisher .msg-ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.auth-card--publisher .msg-err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-card--publisher button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ap-pw-field-host {
  padding: 0;
  background: transparent;
  border: none;
}

.ap-pw-field-host.auth-input-wrap {
  position: static;
}

.ap-pw-inline {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.ap-pw-inline-input-wrap {
  flex: 1;
  min-width: 0;
}

.ap-pw-inline-input-wrap input,
.ap-pw-field-host input[type="password"],
.ap-pw-field-host input.ra-campaigns-form-input {
  width: 100%;
  margin-bottom: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ap-pw-inline-input-wrap input::placeholder {
  color: #94a3b8;
}

.ap-pw-inline-input-wrap input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ap-pw-inline-actions {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  flex-shrink: 0;
}

.ap-pw-toggle,
.ap-pw-generate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ap-pw-toggle {
  width: 2.75rem;
  background: #f5f3ff;
  color: #6b7280;
}

.ap-pw-toggle:hover {
  background: #ede9fe;
  color: #5b21b6;
}

.ap-pw-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.ap-pw-generate {
  gap: 0.4rem;
  padding: 0 0.9rem;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.ap-pw-generate svg {
  width: 1rem;
  height: 1rem;
}

.ap-pw-generate:hover {
  background: #ede9fe;
  color: #5b21b6;
}

.ap-pw-toggle .hidden {
  display: none;
}

.ap-pw-helper {
  margin-top: 0.4rem;
}

.ap-pw-hint {
  margin: 0.35rem 0 0.4rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.ap-pw-helper-strength.hidden,
.ap-pw-helper-match.hidden {
  display: none;
}

.ap-pw-helper-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.ap-pw-helper-rule {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.15rem 0.45rem 0.15rem 0.3rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}

.ap-pw-helper-rule-ico {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  flex-shrink: 0;
  position: relative;
}

.ap-pw-helper-rule.is-met {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.ap-pw-helper-rule.is-met .ap-pw-helper-rule-ico {
  border-color: #16a34a;
  background: #16a34a;
}

.ap-pw-helper-rule.is-met .ap-pw-helper-rule-ico::after {
  content: '';
  position: absolute;
  left: 0.17rem;
  top: 0.08rem;
  width: 0.22rem;
  height: 0.38rem;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg);
}

.ap-pw-helper-strength {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
  width: 100%;
}

.ap-pw-helper-bar {
  flex: 1;
  max-width: 8rem;
  height: 0.3rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.ap-pw-helper-bar span {
  display: block;
  height: 100%;
  width: 33%;
  border-radius: inherit;
  background: #ef4444;
  transition: width 0.2s ease, background 0.2s ease;
}

.ap-pw-helper-bar span.is-level-2 {
  width: 66%;
  background: #f59e0b;
}

.ap-pw-helper-bar span.is-level-3 {
  width: 100%;
  background: #16a34a;
}

.ap-pw-helper-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  min-width: 3.5rem;
}

.ap-pw-helper-match {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
}

.ap-pw-helper-match.is-ok {
  color: #15803d;
}

.ap-pw-helper-match.is-bad {
  color: #dc2626;
}

@media (max-width: 480px) {
  .ap-pw-inline {
    flex-wrap: wrap;
  }

  .ap-pw-inline-actions {
    width: 100%;
  }

  .ap-pw-generate {
    flex: 1;
  }
}

.auth-step-desc {
  color: #4b5563;
  font-size: 0.9rem;
  margin: -0.5rem 0 1rem;
  text-align: center;
}
.auth-card .msg {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}
.auth-card .msg-ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.auth-card .msg-err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.auth-card button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Admin login (/superadmin) — day mode */
.auth-shell--admin {
  position: relative;
  overflow: hidden;
  background: #f0f4ff;
  padding: 1.5rem;
}

.auth-admin-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-admin-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}

.auth-admin-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: auth-admin-float 12s ease-in-out infinite;
}

.auth-admin-orb--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: #93c5fd;
}

.auth-admin-orb--2 {
  width: 360px;
  height: 360px;
  right: -60px;
  bottom: -100px;
  background: #c4b5fd;
  animation-delay: -4s;
}

@keyframes auth-admin-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.05); }
}

.auth-card--admin {
  position: relative;
  z-index: 1;
  max-width: 26rem;
  padding: 2.25rem 2rem 1.75rem;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 25px 50px -12px rgba(37, 99, 235, 0.12),
    0 8px 24px -8px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-admin-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-admin-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.85rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.auth-admin-logo svg {
  width: 1.75rem;
  height: 1.75rem;
}

.auth-admin-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.auth-card--admin h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.auth-card--admin .auth-lead {
  margin: 0;
  color: #64748b;
  font-size: 0.875rem;
}

.auth-err--admin {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.auth-err--admin svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.auth-admin-form {
  margin-top: 0.25rem;
}

.auth-field {
  margin-bottom: 1.1rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: #94a3b8;
  pointer-events: none;
}

.auth-card--admin input[type="email"],
.auth-card--admin input[type="password"] {
  width: 100%;
  margin-bottom: 0;
  padding: 0.7rem 0.85rem 0.7rem 2.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-card--admin input::placeholder {
  color: #94a3b8;
}

.auth-card--admin input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-admin-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.auth-admin-submit svg {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.2s;
}

.auth-admin-submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.auth-admin-submit:hover svg {
  transform: translateX(3px);
}

.auth-admin-submit:active {
  transform: translateY(0);
}

.auth-admin-foot {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .auth-card--admin {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 1rem;
  }

  .auth-card--admin h1 {
    font-size: 1.45rem;
  }
}

.hidden {
  display: none !important;
}

.auth-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Page header strip (matches React Offers.js admin header) */
.ra-page-strip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.08),
    0 4px 6px -4px rgb(0 0 0 / 0.08);
  border: 1px solid #e5e7eb;
  transition: background-color 0.2s, border-color 0.2s;
}
@media (min-width: 768px) {
  .ra-page-strip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.ra-page-strip-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.2s;
}
.ra-page-strip-ico {
  color: #3b82f6;
  font-size: 1.75rem !important;
  flex-shrink: 0;
}
.ra-page-strip-ico--green {
  color: #22c55e;
}
.ra-page-strip-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ra-fab-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: #16a34a;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.12);
  transition:
    transform 0.15s ease,
    background-color 0.15s ease;
}
.ra-fab-add:hover {
  background: #15803d;
  transform: scale(1.05);
}
.ra-fab-add:active {
  transform: scale(0.95);
}
.ra-fab-add .material-symbols-outlined {
  font-size: 1.25rem !important;
}

body.ap-admin .ra-content .ra-offers-table-card {
  overflow-x: auto;
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.06),
    0 4px 6px -4px rgb(0 0 0 / 0.06);
}

/* Dark theme (React ThemeContext: html.dark + localStorage ap-theme) */
html.dark body.ap-admin,
html.dark body.ap-publisher {
  color: #e5e7eb;
}
html.dark body.ap-admin .ra-sidebar,
html.dark body.ap-publisher .ra-sidebar {
  background: #1f2937;
  border-right-color: #374151;
}
html.dark body.ap-admin .ra-brand,
html.dark body.ap-admin .ra-nav-link,
html.dark body.ap-publisher .ra-brand,
html.dark body.ap-publisher .ra-nav-link {
  color: #d1d5db;
}
html.dark body.ap-admin .pub-logo-rest,
html.dark body.ap-publisher .pub-logo-rest {
  color: #d1d5db;
}
html.dark body.ap-admin .ra-brand-tag {
  color: #f87171;
}
html.dark body.ap-admin .ra-nav-link:hover,
html.dark body.ap-publisher .ra-nav-link:hover {
  background: #374151;
  color: #f9fafb;
}
html.dark body.ap-admin .ra-nav-link.is-active,
html.dark body.ap-publisher .ra-nav-link.is-active {
  background: #2563eb;
  color: #fff;
}
html.dark body.ap-admin .ra-nav-children,
html.dark body.ap-publisher .ra-nav-children {
  border-left-color: #374151;
}
html.dark body.ap-admin .ra-nav-child,
html.dark body.ap-admin .ra-nav-subchild,
html.dark body.ap-publisher .ra-nav-child,
html.dark body.ap-publisher .ra-nav-subchild {
  color: #9ca3af;
}
html.dark body.ap-admin .ra-nav-child:hover,
html.dark body.ap-admin .ra-nav-subchild:hover,
html.dark body.ap-publisher .ra-nav-child:hover,
html.dark body.ap-publisher .ra-nav-subchild:hover {
  background: #374151;
  color: #f9fafb;
}
html.dark body.ap-admin .ra-nav-child.is-active,
html.dark body.ap-admin .ra-nav-subchild.is-active,
html.dark body.ap-publisher .ra-nav-child.is-active,
html.dark body.ap-publisher .ra-nav-subchild.is-active {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}
html.dark .ra-nav-ico,
html.dark .ra-nav-child-ico {
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
}
html.dark .ra-nav-link.is-active .ra-nav-ico,
html.dark .ra-nav-group-btn.is-active .ra-nav-ico {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28), 0 3px 8px rgb(0 0 0 / 0.35);
}
html.dark body.ap-admin .ra-sidebar-foot,
html.dark body.ap-publisher .ra-sidebar-foot {
  border-top-color: #374151;
}
html.dark body.ap-admin .ra-topbar,
html.dark body.ap-publisher .ra-topbar {
  background: #111827;
  border-bottom-color: #374151;
}
html.dark body.ap-admin .ra-welcome,
html.dark body.ap-publisher .ra-welcome {
  color: #f3f4f6;
}
html.dark body.ap-admin .ra-icon-btn,
html.dark body.ap-publisher .ra-icon-btn {
  color: #9ca3af;
}
html.dark body.ap-admin .ra-icon-btn:hover,
html.dark body.ap-publisher .ra-icon-btn:hover {
  background: #374151;
  color: #e5e7eb;
}
html.dark body.ap-admin .ra-profile-name,
html.dark body.ap-publisher .ra-profile-name {
  color: #d1d5db;
}
html.dark body.ap-admin .ra-profile-name.ra-brand-tag {
  color: #dc2626;
}
html.dark body.ap-admin .ra-content,
html.dark body.ap-publisher .ra-content {
  background: #111827;
}
html.dark body.ap-admin .ra-chart-card {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-admin .ra-chart-head {
  border-bottom-color: #374151;
}
html.dark body.ap-admin .ra-chart-title {
  color: #e5e7eb;
}
html.dark body.ap-admin .ra-chart-canvas,
html.dark body.ap-publisher .ra-chart-canvas {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.95) 0%, rgba(31, 41, 55, 1) 100%);
}
html.dark body.ap-admin .ra-page-strip,
html.dark body.ap-admin .ra-content .ap-card,
html.dark body.ap-admin .ra-offers-table-card {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-admin .ra-page-strip-title {
  color: #e5e7eb;
}
html.dark body.ap-admin .ra-content .ap-table th {
  background: #020617;
  color: #e2e8f0;
  border-color: #1f2937;
}
html.dark body.ap-admin .ra-content .ap-table td {
  border-color: #1f2937;
  color: #e5e7eb;
  background: #111827;
}
html.dark body.ap-admin .ra-content .ap-table tbody tr:nth-child(even) td {
  background: #0f172a;
}
html.dark body.ap-admin .ra-content .ap-table tr:hover td {
  background: #172554 !important;
}
html.dark body.ap-admin .ra-content .ap-modal-overlay {
  background: rgba(0, 0, 0, 0.65);
}
html.dark body.ap-admin .ra-content .ap-modal {
  background: #1f2937;
  color: #e5e7eb;
  border-color: #374151;
}
html.dark body.ap-admin .ra-content .ap-form-row input,
html.dark body.ap-admin .ra-content .ap-form-row select,
html.dark body.ap-admin .ra-content .ap-form-row textarea {
  background: #111827;
  border-color: #4b5563;
  color: #e5e7eb;
}

html.dark body.ap-publisher {
  background: #111827;
  color: #e5e7eb;
}
html.dark body.ap-publisher .pub-topbar {
  background: #111827;
  border-bottom-color: #374151;
}
html.dark body.ap-publisher .pub-logo-rest {
  color: #d1d5db;
}
html.dark body.ap-publisher .pub-icon-btn {
  color: #9ca3af;
}
html.dark body.ap-publisher .pub-icon-btn:hover {
  background: #374151;
  color: #e5e7eb;
}
html.dark body.ap-publisher .pub-sidebar {
  background: #1f2937;
  border-right-color: #374151;
}
html.dark body.ap-publisher .pub-nav-item {
  color: #d1d5db;
}
html.dark body.ap-publisher .pub-nav-item:hover {
  background: #374151;
}
html.dark body.ap-publisher .pub-nav-item.is-active {
  background: #2563eb;
  color: #fff;
}
html.dark body.ap-publisher .pub-group-head {
  color: #e5e7eb;
}
html.dark body.ap-publisher .pub-group-head:hover {
  background: #374151;
}
html.dark body.ap-publisher .pub-sublink {
  color: #9ca3af;
}
html.dark body.ap-publisher .pub-sublink:hover {
  background: #374151;
  color: #e5e7eb;
}
html.dark body.ap-publisher .pub-sublink.is-active {
  background: rgba(37, 99, 235, 0.35);
  color: #fff;
}
html.dark body.ap-publisher .pub-nav-item.is-active .pub-nav-ico,
html.dark body.ap-publisher .pub-sublink.is-active .pub-sublink-ico {
  color: #fff !important;
}
html.dark body.ap-publisher .pub-nav-item.is-active .pub-nav-ico,
html.dark body.ap-publisher .pub-sublink.is-active .pub-sublink-ico {
  color: #fff !important;
}
html.dark body.ap-publisher .pub-content {
  background: #111827;
}
html.dark body.ap-publisher .pub-content .ap-card {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-publisher .pub-content .ap-table th {
  background: #374151;
  color: #d1d5db;
}
html.dark body.ap-publisher .pub-content .ap-table td {
  border-color: #374151;
  color: #e5e7eb;
}
html.dark body.ap-publisher .ra-page-strip {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-publisher .ra-page-strip-title {
  color: #e5e7eb;
}
html.dark body.ap-publisher .pub-content .ap-modal-overlay {
  background: rgba(0, 0, 0, 0.65);
}
html.dark body.ap-publisher .pub-content .ap-modal {
  background: #1f2937;
  color: #e5e7eb;
  border-color: #374151;
}
html.dark body.ap-publisher .pub-content .ap-form-row input,
html.dark body.ap-publisher .pub-content .ap-form-row select,
html.dark body.ap-publisher .pub-content .ap-form-row textarea {
  background: #111827;
  border-color: #4b5563;
  color: #e5e7eb;
}

/* ========== Campaigns Page: React-style parity ========== */
.ra-campaign-table thead th {
  background: #2563eb;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
}

.ra-campaign-table th,
.ra-campaign-table td {
  padding: 0.75rem 1.5rem;
}

.ra-campaign-table tbody tr:hover td {
  background: #f3f4f6;
}

.ra-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.ra-status-pill--active {
  background: #dcfce7; /* green-100 */
  color: #16a34a; /* green-600 */
}

.ra-status-pill--paused {
  background: #fef3c7; /* yellow-100 */
  color: #d97706; /* yellow-600 */
}

.ra-status-pill--archived,
.ra-status-pill--default {
  background: #e5e7eb; /* gray-200 */
  color: #4b5563; /* gray-600 */
}

.ra-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.ra-action-btn .material-symbols-outlined {
  font-size: 1.1rem;
  line-height: 1;
}

.ra-action-btn--edit {
  background: #fef3c7; /* yellow-100 */
  color: #d97706; /* yellow-600 */
}

.ra-action-btn--edit:hover {
  background: #fde68a; /* yellow-200 */
}

.ra-action-btn--delete {
  background: #fee2e2; /* red-100 */
  color: #dc2626; /* red-600 */
}

.ra-action-btn--delete:hover {
  background: #fecaca; /* red-200 */
}

html.dark body.ap-admin .ra-campaign-table thead th {
  background: #2563eb;
  color: #fff;
}

html.dark body.ap-admin .ra-campaign-table tbody tr:hover td {
  background: rgba(55, 65, 81, 0.5);
}

html.dark body.ap-admin .ra-status-pill--active {
  background: rgba(6, 78, 59, 0.55); /* green-800/50 */
  color: #86efac; /* green-300 */
}

html.dark body.ap-admin .ra-status-pill--paused {
  background: rgba(161, 98, 7, 0.45); /* yellow-800/50-ish */
  color: #fde68a; /* yellow-300 */
}

html.dark body.ap-admin .ra-status-pill--archived,
html.dark body.ap-admin .ra-status-pill--default {
  background: rgba(55, 65, 81, 0.45); /* gray-800/50-ish */
  color: #d1d5db; /* gray-300 */
}

.ra-status-pill--good {
  background: #dcfce7;
  color: #16a34a;
}

.ra-status-pill--bad {
  background: #fee2e2;
  color: #dc2626;
}

html.dark body.ap-admin .ra-status-pill--good {
  background: rgba(6, 78, 59, 0.55);
  color: #86efac;
}

html.dark body.ap-admin .ra-status-pill--bad {
  background: rgba(127, 29, 29, 0.35);
  color: #fca5a5;
}

html.dark body.ap-admin .ra-action-btn--edit {
  background: #5a4100; /* yellow-900-ish */
  color: #fbbf24; /* yellow-400 */
}

html.dark body.ap-admin .ra-action-btn--edit:hover {
  background: #4a3400;
}

html.dark body.ap-admin .ra-action-btn--delete {
  background: #5b1717; /* red-900-ish */
  color: #f87171; /* red-400 */
}

html.dark body.ap-admin .ra-action-btn--delete:hover {
  background: #4b1111;
}

/* Offers modal header (React-like) */
.ra-offer-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1rem 0;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--ap-border);
}

.ra-offer-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ap-muted);
  padding: 0.25rem;
  border-radius: 0.5rem;
}

.ra-offer-modal-close:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--ap-accent);
}

html.dark body.ap-admin .ra-offer-modal-head {
  border-bottom-color: #374151;
}

html.dark body.ap-admin .ra-offer-modal-close {
  color: #9ca3af;
}

html.dark body.ap-admin .ra-offer-modal-close:hover {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
}

/* Offers modal Events (React OfferFormModal parity) */
.ap-event-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.ap-event-row input {
  max-width: none !important;
  width: 160px;
  flex: 1 1 140px;
}

.ap-event-row .ev-remove {
  flex: 0 0 auto;
}

.ra-offer-select-manage {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ra-offer-select-manage select {
  flex: 1 1 auto;
  min-width: 0;
}
.ra-offer-meta-btn {
  flex: 0 0 auto;
  width: 2.05rem;
  height: 2.05rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}
.ra-offer-meta-btn .material-symbols-outlined {
  font-size: 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  color: inherit;
  overflow: hidden;
}
.ra-offer-meta-btn--add {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(165deg, #1d4ed8, #1e3a8a);
}
.ra-offer-meta-btn--edit {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(165deg, #475569, #1e293b);
}
.ra-offer-meta-btn:hover { filter: brightness(1.08); border-color: transparent; }
.ra-offer-meta-btn--danger {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(165deg, #f87171, #dc2626);
}
.ra-offer-meta-btn--danger:hover { background: linear-gradient(165deg, #f87171, #b91c1c); border-color: transparent; }
html.dark body.ap-admin .ra-offer-meta-btn {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}
html.dark body.ap-admin .ra-offer-meta-btn--add,
html.dark body.ap-admin .ra-offer-meta-btn--edit,
html.dark body.ap-admin .ra-offer-meta-btn--danger {
  border-color: transparent;
  color: #fff;
}
html.dark body.ap-admin .ra-offer-meta-btn:hover { filter: brightness(1.08); }

.ra-autofill-trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.ra-pay-pin {
  -webkit-text-security: disc;
  text-security: disc;
}

/* React OfferFormModal iPhone-style toggles */
.ra-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ra-toggle-text {
  font-size: 0.85rem;
  color: var(--ap-muted);
}

.ra-toggle {
  position: relative;
  width: 48px;
  height: 24px;
  display: inline-block;
  cursor: pointer;
  user-select: none;
}

.ra-toggle > input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ra-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #d1d5db; /* gray-300 */
  transition: background 150ms ease;
}

.ra-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 150ms ease;
}

.ra-toggle > input:checked ~ .ra-toggle-track {
  background: #2563eb; /* blue-600 */
}

.ra-toggle > input:checked ~ .ra-toggle-thumb {
  transform: translateX(24px);
}

html.dark body.ap-admin .ra-toggle-text {
  color: #d1d5db;
}

html.dark body.ap-admin .ra-toggle-track {
  background: #4b5563; /* gray-600 */
}

html.dark body.ap-admin .ra-toggle-thumb {
  background: #111827;
}

/* Admin report pages (Conversion + Click) — React Reports.js / ClickReport.js parity */
.ra-reports-page {
  padding: 1rem;
  margin: 0 -0.25rem 2rem;
}
.ra-reports-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
html.dark body.ap-admin .ra-reports-card {
  background: #111827;
  border-color: #374151;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.2);
}
.ra-reports-filter-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  background:
    linear-gradient(180deg, #f8fafc 0%, #fff 55%);
  border-color: #e2e8f0;
}
@media (min-width: 768px) {
  .ra-reports-filter-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.ra-reports-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  width: 100%;
}
.ra-reports-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  min-width: 0;
}
.ra-reports-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  min-width: 11rem;
  flex: 0 1 12.5rem;
}
.ra-reports-field > span,
.ra-reports-field > label {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
}
html.dark body.ap-admin .ra-reports-field > span,
html.dark body.ap-publisher .ra-reports-field > span,
html.dark body.ap-admin .ra-reports-field > label,
html.dark body.ap-publisher .ra-reports-field > label {
  color: #94a3b8;
}
.ra-reports-field .ra-reports-date-input,
.ra-reports-field .ra-reports-select {
  width: 100%;
  min-width: 0;
}
.ra-reports-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}
.ra-reports-queue-btn {
  border: 1px solid #fdba74;
  border-radius: 0.75rem;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ra-reports-queue-btn::before {
  content: "pending_actions";
  font-family: "Material Symbols Outlined";
  font-size: 1.15rem;
  font-weight: 500;
}
.ra-reports-queue-btn:hover { filter: brightness(0.98); background: #ffedd5; }
.ra-reports-queue-btn.is-active,
#r-queue.is-active {
  background: linear-gradient(165deg, #ea580c, #c2410c);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.35);
}
html.dark body.ap-admin .ra-reports-queue-btn,
html.dark body.ap-publisher .ra-reports-queue-btn {
  background: #431407;
  border-color: #9a3412;
  color: #fed7aa;
}
html.dark body.ap-admin .ra-reports-queue-btn.is-active,
html.dark body.ap-publisher .ra-reports-queue-btn.is-active {
  background: linear-gradient(165deg, #ea580c, #c2410c);
  color: #fff;
}
@media (max-width: 767px) {
  .ra-reports-field,
  .ra-reports-filter-actions {
    width: 100%;
    flex: 1 1 100%;
    margin-left: 0;
  }
  .ra-reports-filter-actions .ra-reports-apply-btn,
  .ra-reports-queue-btn {
    width: 100%;
  }
}
.ra-reports-filter-card--conv {
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}
.ra-reports-filter-grid {
  display: grid;
  width: 100%;
  gap: 0.85rem 1rem;
  align-items: end;
  grid-template-columns: minmax(16rem, 1.6fr) minmax(11rem, 1fr) minmax(11rem, 1fr);
  grid-template-areas:
    "period period actions"
    "click upi status";
}
.ra-reports-filter-grid .ra-reports-field--period { grid-area: period; min-width: 0; flex: none; }
.ra-reports-filter-grid .ra-reports-filter-actions {
  grid-area: actions;
  margin-left: 0;
  justify-self: end;
  align-self: end;
  flex-wrap: nowrap;
}
.ra-reports-filter-grid .ra-reports-field[for="r-click"] { grid-area: click; min-width: 0; flex: none; }
.ra-reports-filter-grid .ra-reports-field[for="r-upi"] { grid-area: upi; min-width: 0; flex: none; }
.ra-reports-filter-grid .ra-reports-field[for="r-status"] { grid-area: status; min-width: 0; flex: none; }
.ra-reports-filter-grid .ra-reports-field--period .ra-reports-period-bar {
  width: 100%;
  max-width: 100%;
}
.ra-reports-filter-grid .ra-reports-field--period .ra-reports-date-input {
  min-width: 0;
  width: auto;
  flex: 1 1 8rem;
}
.ra-reports-filter-grid .ra-reports-queue-btn .ra-reports-record-count {
  margin: 0;
  background: rgba(255,255,255,.28);
  color: inherit;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.78rem;
}
.ra-reports-filter-grid .ra-reports-filter-actions > button {
  height: 2.65rem;
  padding-top: 0;
  padding-bottom: 0;
  width: auto;
}
@media (max-width: 1100px) {
  .ra-reports-filter-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "period period"
      "click upi"
      "status actions";
  }
  .ra-reports-filter-grid .ra-reports-filter-actions {
    justify-self: stretch;
    width: 100%;
  }
  .ra-reports-filter-grid .ra-reports-filter-actions > button {
    flex: 1 1 auto;
  }
}
@media (max-width: 700px) {
  .ra-reports-filter-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "period"
      "click"
      "upi"
      "status"
      "actions";
  }
  .ra-reports-filter-grid .ra-reports-filter-actions {
    flex-wrap: wrap;
  }
  .ra-reports-filter-grid .ra-reports-filter-actions > button {
    width: 100%;
    height: auto;
    padding: 0.7rem 1.15rem;
  }
}
.ra-reports-period-bar {
  display: flex;
  align-items: stretch;
  flex: 0 1 auto;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.ra-reports-period-bar > .ap-select {
  display: flex;
  align-items: stretch;
  width: auto !important;
  flex: 0 0 auto;
  min-width: 10.5rem;
}
.ra-reports-period-bar > select.ra-reports-select {
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-width: 10.5rem;
}
.ra-reports-period-bar .ap-select-trigger {
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  height: auto;
  min-height: 2.65rem;
  min-width: 10.5rem;
}
.ra-reports-period-bar .ap-select-trigger:hover:not(:disabled),
.ra-reports-period-bar .ap-select.is-open .ap-select-trigger {
  border-color: transparent;
}
.ra-reports-period-bar .ra-reports-date-range {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  margin-left: 0;
  padding: 0.28rem 0.5rem 0.28rem 0.1rem;
}
.ra-reports-period-bar .ra-reports-date-input {
  min-width: 9.4rem;
  width: 9.4rem;
  padding: 0.38rem 0.55rem;
  box-shadow: none;
  background: #f8fafc;
}
html.dark body.ap-admin .ra-reports-period-bar,
html.dark body.ap-publisher .ra-reports-period-bar {
  background: #0f172a;
  border-color: #4b5563;
}
html.dark body.ap-admin .ra-reports-period-bar .ra-reports-date-input,
html.dark body.ap-publisher .ra-reports-period-bar .ra-reports-date-input {
  background: #1e2937;
  border-color: #475569;
}
@media (max-width: 720px) {
  .ra-reports-period-bar {
    flex-wrap: wrap;
    width: 100%;
  }
  .ra-reports-period-bar > .ap-select,
  .ra-reports-period-bar > select.ra-reports-select {
    width: 100% !important;
    min-width: 0;
  }
  .ra-reports-period-bar .ra-reports-date-range {
    width: 100%;
    margin-left: 0;
    padding: 0 0.45rem 0.45rem;
    flex-wrap: wrap;
  }
}
.ra-reports-period-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b !important;
  white-space: nowrap;
}
.ra-reports-period-label::before {
  content: "calendar_month";
  font-family: "Material Symbols Outlined";
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(165deg, #1d4ed8, #1e3a8a);
  box-shadow: 0 3px 8px rgba(30, 58, 138, 0.4);
}
html.dark body.ap-admin .ra-reports-period-label,
html.dark body.ap-publisher .ra-reports-period-label { color: #94a3b8 !important; }
.ra-reports-select {
  appearance: none;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  padding: 0.55rem 2.1rem 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  color: #0f172a;
  min-width: 180px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html.dark body.ap-admin .ra-reports-select,
html.dark body.ap-publisher .ra-reports-select {
  background-color: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-reports-date-range {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.ra-reports-date-input {
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff;
  color: #0f172a;
  min-width: 140px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html.dark body.ap-admin .ra-reports-date-input,
html.dark body.ap-publisher .ra-reports-date-input {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-reports-date-to {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4338ca !important;
}
html.dark body.ap-admin .ra-reports-date-to,
html.dark body.ap-publisher .ra-reports-date-to {
  background: rgba(67, 56, 202, 0.28);
  color: #c7d2fe !important;
}
.ra-reports-apply-btn {
  border: none;
  border-radius: 0.75rem;
  background: linear-gradient(165deg, #1d4ed8, #1e3a8a);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.35rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.45);
  transition: filter .15s, transform .05s;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.ra-reports-apply-btn::before {
  content: "filter_alt";
  font-family: "Material Symbols Outlined";
  font-size: 1.15rem;
  font-weight: 500;
}
@media (min-width: 768px) {
  .ra-reports-apply-btn { width: auto; }
}
.ra-reports-apply-btn:hover { filter: brightness(1.06); }
.ra-reports-apply-btn:active { transform: scale(0.98); }
.ra-reports-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #eef2f7;
}
html.dark body.ap-admin .ra-reports-section-head,
html.dark body.ap-publisher .ra-reports-section-head { border-color: #374151; }
.ra-reports-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a !important;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
html.dark body.ap-admin .ra-reports-section-title,
html.dark body.ap-publisher .ra-reports-section-title { color: #f8fafc !important; }
.ra-reports-hint {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.55;
}
html.dark body.ap-admin .ra-reports-hint,
html.dark body.ap-publisher .ra-reports-hint {
  background: #1f2937;
  border-color: #374151;
  color: #cbd5e1;
}
.ra-reports-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}
.ra-reports-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ra-reports-legend-chip b {
  color: #1d4ed8;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.ra-reports-legend-note {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 600;
}
html.dark body.ap-admin .ra-reports-legend-chip,
html.dark body.ap-publisher .ra-reports-legend-chip {
  background: #1f2937;
  border-color: #374151;
  color: #e2e8f0;
}
html.dark body.ap-admin .ra-reports-legend-note,
html.dark body.ap-publisher .ra-reports-legend-note {
  background: rgba(37, 99, 235, 0.18);
  border-color: #1e3a8a;
  color: #93c5fd;
}
.ra-reports-record-count {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b !important;
}
html.dark body.ap-admin .ra-reports-record-count { color: #94a3b8 !important; }
.ra-reports-cols-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background .15s, border-color .15s;
}
html.dark body.ap-admin .ra-reports-cols-toggle,
html.dark body.ap-publisher .ra-reports-cols-toggle {
  background: rgba(37, 99, 235, 0.18);
  border-color: #1e3a8a;
  color: #93c5fd;
}
.ra-reports-cols-toggle:hover { background: #dbeafe; border-color: #93c5fd; }
html.dark body.ap-admin .ra-reports-cols-toggle:hover,
html.dark body.ap-publisher .ra-reports-cols-toggle:hover { background: #1e293b; }
.ra-reports-cols-toggle .material-symbols-outlined { font-size: 1.05rem !important; }

.ra-reports-cols-card {
  padding: 1.1rem 1.2rem 1.2rem;
}
.ra-reports-cols-card .ra-reports-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #eef2f7;
}
html.dark body.ap-admin .ra-reports-cols-card .ra-reports-section-head,
html.dark body.ap-publisher .ra-reports-cols-card .ra-reports-section-head {
  border-bottom-color: #374151;
}
.ra-reports-cols-card .ra-reports-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
html.dark body.ap-admin .ra-reports-cols-card .ra-reports-section-title,
html.dark body.ap-publisher .ra-reports-cols-card .ra-reports-section-title {
  color: #f8fafc;
}
.ra-reports-cols-title-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-size: 1.05rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.35);
}

.ra-reports-col-wrap {
  padding: 0.15rem 0 0;
}
.ra-reports-col-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.ra-reports-col-inner label,
.ra-reports-col-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  margin: 0 !important;
  padding: 0.48rem 0.75rem !important;
  border-radius: 9999px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  font-size: 0.8rem !important;
  font-weight: 650;
  color: #334155 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  user-select: none;
}
.ra-reports-col-chip:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}
.ra-reports-col-chip:has(input:checked),
.ra-reports-col-inner label:has(input:checked) {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%) !important;
  border-color: #93c5fd !important;
  color: #1e3a8a !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
  font-weight: 750;
}
.ra-reports-col-chip span,
.ra-reports-col-inner label > span {
  line-height: 1.2;
}
.ra-reports-col-inner input[type="checkbox"],
.ra-reports-col-chip input[type="checkbox"] {
  width: 1.05rem !important;
  height: 1.05rem !important;
  margin: 0 !important;
  accent-color: #2563eb;
  flex-shrink: 0;
  cursor: pointer;
}
html.dark body.ap-admin .ra-reports-col-chip,
html.dark body.ap-publisher .ra-reports-col-chip,
html.dark body.ap-admin .ra-reports-col-inner label,
html.dark body.ap-publisher .ra-reports-col-inner label {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}
html.dark body.ap-admin .ra-reports-col-chip:hover,
html.dark body.ap-publisher .ra-reports-col-chip:hover {
  background: #273549 !important;
  border-color: #1e3a8a !important;
  color: #93c5fd !important;
}
html.dark body.ap-admin .ra-reports-col-chip:has(input:checked),
html.dark body.ap-publisher .ra-reports-col-chip:has(input:checked),
html.dark body.ap-admin .ra-reports-col-inner label:has(input:checked),
html.dark body.ap-publisher .ra-reports-col-inner label:has(input:checked) {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(76, 29, 149, 0.22)) !important;
  border-color: #1e3a8a !important;
  color: #dbeafe !important;
}
.ra-reports-export-title { margin-bottom: 1rem; }
.ra-reports-export-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.ra-reports-exp {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.12);
  transition: filter .15s, transform .05s;
}
.ra-reports-exp .material-symbols-outlined { font-size: 20px; }
.ra-reports-exp:hover { filter: brightness(1.08); }
.ra-reports-exp:active { transform: scale(0.98); }
.ra-reports-exp--excel { background: #15803d; }
.ra-reports-exp--csv { background: #1d4ed8; }
.ra-reports-exp--pdf { background: #b91c1c; }
.ra-reports-exp--print { background: #4b5563; }
.ra-reports-exp--copy { background: #7c3aed; }
.ra-reports-loading {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 4rem 1rem;
  gap: 0.75rem;
}
.ra-reports-loading.is-active {
  display: flex;
}
.ra-reports-table-scroll.is-loading-hidden {
  display: none !important;
}
.ra-reports-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ra-reports-spin 0.8s linear infinite;
}
@keyframes ra-reports-spin { to { transform: rotate(360deg); } }
.ra-reports-loading-text {
  color: #111827 !important;
  font-size: 1rem;
}
html.dark body.ap-admin .ra-reports-loading-text { color: #f8fafc !important; }
.ra-offers-table-shell .ra-reports-table-scroll {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.ra-reports-table-scroll {
  overflow-x: auto;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
}
.ra-offers-table-shell .ra-reports-table-scroll {
  border: 0;
  border-radius: 0;
  background: transparent;
}
html.dark body.ap-admin .ra-reports-table-scroll {
  border-color: #374151;
  background: #111827;
}
html.dark body.ap-admin .ra-offers-table-shell .ra-reports-table-scroll {
  background: transparent;
  border: 0;
}
html.dark body.ap-admin .ra-offers-table-shell .ra-reports-table-scroll {
  background: transparent;
  border: 0;
}
.ra-reports-table {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
}
.ra-reports-table thead {
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
}
html.dark body.ap-admin .ra-reports-table thead,
html.dark body.ap-publisher .ra-reports-table thead {
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
}
.ra-reports-table th {
  padding: 0.85rem 0.9rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f8fafc !important;
  white-space: nowrap;
  min-width: 7rem;
  border-bottom: 0;
  background: transparent;
}
html.dark body.ap-admin .ra-reports-table th {
  color: #e2e8f0 !important;
  background: transparent;
}
.ra-reports-table td {
  padding: 0.8rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: #0f172a !important;
  white-space: nowrap;
  min-width: 7rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  text-align: center;
  background: #fff;
}
.ra-reports-table td .ra-reports-cell-text {
  font-weight: 500;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-reports-table td {
  color: #e5e7eb !important;
  border-color: #1f2937;
  background: #111827;
}
.ra-reports-table tbody tr {
  transition: background 0.12s ease;
}
.ra-reports-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}
html.dark body.ap-admin .ra-reports-table tbody tr:nth-child(even) td {
  background: #0f172a;
}
.ra-reports-table tbody tr:hover td {
  background: #eff6ff !important;
}
html.dark body.ap-admin .ra-reports-table tbody tr:hover td {
  background: #172554 !important;
}
.ra-reports-table tbody tr:last-child td {
  border-bottom: 0;
}
.ra-reports-table tbody tr.ra-row--ok td:first-child {
  box-shadow: inset 3px 0 0 #22c55e;
}
.ra-reports-table tbody tr.ra-row--warn td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}
.ra-reports-table tbody tr.ra-row--bad td:first-child {
  box-shadow: inset 3px 0 0 #ef4444;
}
.ra-reports-table tbody tr.ra-row--info td:first-child {
  box-shadow: inset 3px 0 0 #94a3b8;
}
.ra-reports-empty {
  text-align: center;
  padding: 2rem !important;
  color: #111827 !important;
}
html.dark body.ap-admin .ra-reports-empty { color: #f8fafc !important; }

/* Report cell data — Offers-matching chips / hierarchy */
.ra-cell-offer {
  display: inline-block;
  font-weight: 700;
  color: #0f172a !important;
  line-height: 1.25;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-cell-offer { color: #f8fafc !important; }
.ra-cell-id,
.ra-cell-pub-id,
.ra-cell-adv-id {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #475569 !important;
  font-size: 0.75rem;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-cell-id,
html.dark body.ap-admin .ra-cell-pub-id,
html.dark body.ap-admin .ra-cell-adv-id { color: #94a3b8 !important; }
.ra-cell-pub {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  background: #eef2ff;
  color: #3730a3 !important;
  border: 1px solid #c7d2fe;
}
html.dark body.ap-admin .ra-cell-pub {
  background: #1e1b4b;
  color: #c7d2fe !important;
  border-color: #4338ca;
}
.ra-cell-event,
.ra-chip--event,
.ra-chip--event-a,
.ra-chip--event-b,
.ra-chip--event-c,
.ra-chip--event-d,
.ra-chip--event-e {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ra-cell-event,
.ra-chip--event,
.ra-chip--event-a {
  background: #ecfeff;
  color: #0e7490 !important;
  border-color: #a5f3fc;
}
.ra-chip--event-b {
  background: #f0fdf4;
  color: #166534 !important;
  border-color: #bbf7d0;
}
.ra-chip--event-c {
  background: #fff7ed;
  color: #9a3412 !important;
  border-color: #fed7aa;
}
.ra-chip--event-d {
  background: #fdf4ff;
  color: #86198f !important;
  border-color: #f5d0fe;
}
.ra-chip--event-e {
  background: #eff6ff;
  color: #1d4ed8 !important;
  border-color: #bfdbfe;
}
html.dark body.ap-admin .ra-cell-event,
html.dark body.ap-admin .ra-chip--event,
html.dark body.ap-admin .ra-chip--event-a {
  background: #164e63;
  color: #a5f3fc !important;
  border-color: #0891b2;
}
.ra-cell-click {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155 !important;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
html.dark body.ap-admin .ra-cell-click {
  color: #e2e8f0 !important;
  background: #0f172a;
  border-color: #334155;
}
.ra-cell-upi,
.ra-cell-ip {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569 !important;
  white-space: nowrap;
}
.ra-cell-paydest,
.ra-offer-paydest {
  display: inline-block;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  max-width: none;
  line-height: 1.35;
}
html.dark body.ap-admin .ra-cell-upi,
html.dark body.ap-admin .ra-cell-ip { color: #cbd5e1 !important; }
.ra-cell-city {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  background: #f8fafc;
  color: #475569 !important;
  border: 1px solid #e2e8f0;
}
html.dark body.ap-admin .ra-cell-city {
  background: #1e293b;
  color: #cbd5e1 !important;
  border-color: #334155;
}
.ra-cell-date {
  font-weight: 600;
  color: #334155 !important;
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html.dark body.ap-admin .ra-cell-date { color: #cbd5e1 !important; }
.ra-cell-money {
  font-weight: 700;
  color: #15803d !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-cell-money { color: #86efac !important; }
.ra-cell-money-zero {
  font-weight: 600;
  color: #94a3b8 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-cell-money-zero { color: #64748b !important; }
.ra-cell-adv {
  color: #334155 !important;
  font-weight: 600;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-cell-adv { color: #cbd5e1 !important; }
.ra-reports-cell-text {
  color: #0f172a !important;
  font-weight: 500;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-reports-cell-text { color: #e5e7eb !important; }
.ra-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ra-chip--os,
.ra-chip--browser,
.ra-chip--meta {
  background: #f8fafc;
  color: #475569 !important;
  border-color: #e2e8f0;
}
html.dark body.ap-admin .ra-chip--os,
html.dark body.ap-admin .ra-chip--browser,
html.dark body.ap-admin .ra-chip--meta {
  background: #1e293b;
  color: #cbd5e1 !important;
  border-color: #334155;
}

.ra-reports-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ra-reports-status-pill--ok {
  background: #dcfce7;
  color: #14532d !important;
}
html.dark body.ap-admin .ra-reports-status-pill--ok {
  background: rgba(6, 78, 59, 0.45);
  color: #bbf7d0 !important;
}
.ra-reports-status-pill--bad {
  background: #fee2e2;
  color: #7f1d1d !important;
}
html.dark body.ap-admin .ra-reports-status-pill--bad {
  background: rgba(127, 29, 29, 0.45);
  color: #fecaca !important;
}
.ra-reports-status-pill--warn {
  background: #ffedd5;
  color: #9a3412 !important;
}
html.dark body.ap-admin .ra-reports-status-pill--warn {
  background: rgba(154, 52, 18, 0.4);
  color: #fdba74 !important;
}
.ra-reports-status-pill--info {
  background: #e2e8f0;
  color: #111827 !important;
}
html.dark body.ap-admin .ra-reports-status-pill--info {
  background: rgba(51, 65, 85, 0.55);
  color: #f8fafc !important;
}
.ra-reports-record-count {
  display: inline-flex;
  align-items: center;
  margin-left: 0.15rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
html.dark body.ap-admin .ra-reports-record-count,
html.dark body.ap-publisher .ra-reports-record-count {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd !important;
}
.ra-reports-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.ra-reports-page-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  color: #1e40af;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html.dark body.ap-admin .ra-reports-page-btn,
html.dark body.ap-publisher .ra-reports-page-btn {
  background: #1f2937;
  border-color: #374151;
  color: #93c5fd;
}
.ra-reports-page-btn:hover:not(:disabled) {
  background: #eff6ff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
}
html.dark body.ap-admin .ra-reports-page-btn:hover:not(:disabled),
html.dark body.ap-publisher .ra-reports-page-btn:hover:not(:disabled) { background: #1e3a8a; }
.ra-reports-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ra-reports-page-info {
  font-size: 0.875rem;
  color: #111827 !important;
  padding: 0 0.5rem;
}
html.dark body.ap-admin .ra-reports-page-info { color: #f8fafc !important; }

/* Postback page — React Postback.js parity */
.ra-postback-page {
  margin-top: -0.5rem;
  max-width: 100%;
}
.ra-postback-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .ra-postback-title { font-size: 1.5rem; }
}
html.dark body.ap-admin .ra-postback-title { color: #f9fafb; }
.ra-postback-title-ico {
  color: #22c55e;
  font-size: 1.5rem !important;
}
.ra-postback-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.ra-postback-card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  padding: 1rem 1.5rem;
}
@media (min-width: 640px) {
  .ra-postback-card { padding: 1.5rem; }
}
html.dark body.ap-admin .ra-postback-card {
  background: #1c1c1c;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.ra-postback-card-title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}
@media (min-width: 640px) {
  .ra-postback-card-title { font-size: 1.25rem; }
}
html.dark body.ap-admin .ra-postback-card-title { color: #f3f4f6; }
.ra-postback-field {
  margin-bottom: 1rem;
}
.ra-postback-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #4b5563;
}
html.dark body.ap-admin .ra-postback-label { color: #9ca3af; }
.ra-postback-select,
.ra-postback-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  color: #1f2937;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ra-postback-select:focus,
.ra-postback-input:focus {
  border-color: #2371f2;
  box-shadow: 0 0 0 1px #2371f2;
}
html.dark body.ap-admin .ra-postback-select,
html.dark body.ap-admin .ra-postback-input {
  background: #2c2c2c;
  border-color: #444;
  color: #fff;
}
.ra-postback-input-icon-wrap {
  position: relative;
}
.ra-postback-input-ico {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem !important;
  color: #6b7280;
  pointer-events: none;
}
html.dark body.ap-admin .ra-postback-input-ico { color: #9ca3af; }
.ra-postback-input--icon {
  padding-left: 2.25rem;
}
.ra-postback-adv-info {
  margin-bottom: 1rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.875rem;
}
html.dark body.ap-admin .ra-postback-adv-info { background: transparent; }
.ra-postback-adv-chips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
@media (min-width: 640px) {
  .ra-postback-adv-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ra-postback-adv-chip {
  --chip-from: #64748b;
  --chip-to: #334155;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-width: 0;
}
.ra-postback-adv-chip > .material-symbols-outlined {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  font-size: 1rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, var(--chip-from), var(--chip-to));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--chip-to) 35%, transparent);
}
.ra-postback-adv-chip > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ra-postback-adv-chip-lab {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.ra-postback-adv-chip-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
}
.ra-postback-adv-chip--click { --chip-from: #2563eb; --chip-to: #1e3a8a; }
.ra-postback-adv-chip--ip { --chip-from: #ea580c; --chip-to: #9a3412; }
.ra-postback-adv-chip--token { --chip-from: #7c3aed; --chip-to: #4c1d95; }
html.dark body.ap-admin .ra-postback-adv-chip {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-admin .ra-postback-adv-chip-lab { color: #94a3b8; }
html.dark body.ap-admin .ra-postback-adv-chip-val { color: #e5e7eb; }
.ra-postback-adv-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
}
.ra-postback-adv-key {
  color: #6b7280;
}
html.dark body.ap-admin .ra-postback-adv-key { color: #9ca3af; }
.ra-postback-adv-val {
  color: #111827;
  word-break: break-all;
}
html.dark body.ap-admin .ra-postback-adv-val { color: #e5e7eb; }

/* Postback advertiser picker — panel-style, not native select */
.ra-adv-picker {
  position: relative;
  width: 100%;
}
.ra-adv-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.62rem 0.8rem !important;
  border: 1px solid var(--ap-skin-input-border, #94a3b8) !important;
  border-radius: 0.7rem !important;
  background: #fff !important;
  color: var(--ap-skin-text, #0f172a) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 2.75rem;
}
.ra-adv-picker-trigger:hover:not(:disabled) {
  border-color: #60a5fa !important;
}
.ra-adv-picker.is-open .ra-adv-picker-trigger {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.ra-adv-picker-trigger:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.ra-adv-picker-trigger-body {
  min-width: 0;
  flex: 1;
}
.ra-adv-picker-placeholder {
  color: #94a3b8;
  font-weight: 600;
}
.ra-adv-picker-selected {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
}
.ra-adv-picker-name {
  color: #0f172a;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-adv-picker-chevron {
  color: #64748b;
  font-size: 1.25rem !important;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.ra-adv-picker.is-open .ra-adv-picker-chevron { transform: rotate(180deg); }
.ra-adv-picker-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.9rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}
.ra-adv-picker-menu[hidden] { display: none !important; }
.ra-adv-picker-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.ra-adv-picker-search-wrap .material-symbols-outlined {
  color: #94a3b8;
  font-size: 1.15rem !important;
}
.ra-adv-picker-search {
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.2rem 0 !important;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a !important;
  outline: none;
}
.ra-adv-picker-list {
  max-height: 16rem;
  overflow: auto;
  padding: 0.4rem;
}
.ra-adv-picker-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #0f172a;
}
.ra-adv-picker-option:hover {
  background: #eff6ff;
}
.ra-adv-picker-option.is-active {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  box-shadow: inset 0 0 0 1px #bfdbfe;
}
.ra-adv-picker-option-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.ra-adv-picker-option-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-size: 1.05rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, #d97706, #92400e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(146, 64, 14, 0.35);
}
.ra-adv-picker-option-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.05rem;
}
.ra-adv-picker-option-name {
  font-size: 0.875rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-adv-picker-option-meta {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
}
.ra-adv-token-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #5b21b6;
  border: 1px solid #c4b5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.ra-adv-picker-empty {
  padding: 1.1rem 0.85rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
}
html.dark body.ap-admin .ra-adv-picker-trigger {
  background: #0f172a !important;
  border-color: #4b5563 !important;
  color: #f3f4f6 !important;
}
html.dark body.ap-admin .ra-adv-picker-name { color: #f8fafc; }
html.dark body.ap-admin .ra-adv-picker-menu {
  background: #111827;
  border-color: #374151;
}
html.dark body.ap-admin .ra-adv-picker-search-wrap {
  background: #1f2937;
  border-bottom-color: #374151;
}
html.dark body.ap-admin .ra-adv-picker-search { color: #f3f4f6 !important; }
html.dark body.ap-admin .ra-adv-picker-option { color: #e5e7eb; }
html.dark body.ap-admin .ra-adv-picker-option:hover { background: #1e293b; }
html.dark body.ap-admin .ra-adv-picker-option.is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(76, 29, 149, 0.22));
  box-shadow: inset 0 0 0 1px #1e3a8a;
}
html.dark body.ap-admin .ra-adv-token-chip {
  background: linear-gradient(135deg, rgba(91, 33, 182, 0.35), rgba(76, 29, 149, 0.45));
  color: #ddd6fe;
  border-color: #6d28d9;
}
.ra-postback-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.ra-postback-btn {
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.ra-postback-btn--primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 55%, #4c1d95 100%);
  color: #fff;
}
.ra-postback-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
.ra-postback-btn:disabled {
  opacity: 0.88;
  cursor: not-allowed;
}
.ra-postback-results {
  margin-top: 1rem;
}
.ra-postback-url-block {
  margin-bottom: 0.75rem;
}
.ra-postback-url-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.ra-postback-url-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
html.dark body.ap-admin .ra-postback-url-label { color: #d1d5db; }
.ra-postback-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  background: #16a34a;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.ra-postback-copy .material-symbols-outlined {
  font-size: 0.875rem !important;
}
.ra-postback-copy:hover { background: #15803d; }
.ra-postback-copy.is-copied { background: #15803d; }
.ra-postback-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 3.75rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  resize: vertical;
  line-height: 1.4;
}
.ra-postback-textarea--green {
  background: #f9fafb;
  color: #15803d;
}
html.dark body.ap-admin .ra-postback-textarea--green {
  background: #2c2c2c;
  border-color: #444;
  color: #4ade80;
}
.ra-postback-textarea--yellow {
  background: #f9fafb;
  color: #a16207;
}
html.dark body.ap-admin .ra-postback-textarea--yellow {
  background: #2c2c2c;
  border-color: #444;
  color: #facc15;
}
.ra-postback-security {
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  background: #fefce8;
  border: 1px solid #fde047;
}
html.dark body.ap-admin .ra-postback-security {
  background: rgba(113, 63, 18, 0.3);
  border-color: #a16207;
}
.ra-postback-security-title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #854d0e;
}
html.dark body.ap-admin .ra-postback-security-title { color: #fde047; }
.ra-postback-security-title .material-symbols-outlined {
  font-size: 0.875rem !important;
  color: #eab308;
}
.ra-postback-security-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #6b7280;
  line-height: 1.6;
}
html.dark body.ap-admin .ra-postback-security-list { color: #9ca3af; }
.ra-postback-security-list code {
  font-size: 0.6875rem;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1rem 0.25rem;
  border-radius: 0.2rem;
}
html.dark body.ap-admin .ra-postback-security-list code {
  background: rgba(255, 255, 255, 0.08);
}
.ra-postback-test-result {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
}
.ra-postback-test-result.is-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
html.dark body.ap-admin .ra-postback-test-result.is-success {
  background: rgba(6, 78, 59, 0.3);
  border-color: #15803d;
}
.ra-postback-test-result.is-error {
  background: #fef2f2;
  border-color: #fecaca;
}
html.dark body.ap-admin .ra-postback-test-result.is-error {
  background: rgba(127, 29, 29, 0.3);
  border-color: #b91c1c;
}
.ra-postback-test-result-title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.ra-postback-test-result.is-success .ra-postback-test-result-title { color: #15803d; }
.ra-postback-test-result.is-error .ra-postback-test-result-title { color: #b91c1c; }
html.dark body.ap-admin .ra-postback-test-result.is-success .ra-postback-test-result-title { color: #4ade80; }
html.dark body.ap-admin .ra-postback-test-result.is-error .ra-postback-test-result-title { color: #f87171; }
.ra-postback-test-result-title .material-symbols-outlined { font-size: 0.875rem !important; }
.ra-postback-test-pre {
  margin: 0;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  color: #374151;
}
html.dark body.ap-admin .ra-postback-test-pre { color: #d1d5db; }

/* Advertisers page — React Advertisers.js parity */
.ra-advertisers-page {
  padding: 0;
}
.ra-advertisers-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .ra-advertisers-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.ra-advertisers-title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}
html.dark body.ap-admin .ra-advertisers-title { color: #f3f4f6; }
.ra-advertisers-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}
html.dark body.ap-admin .ra-advertisers-subtitle { color: #9ca3af; }
.ra-advertisers-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
@media (min-width: 640px) {
  .ra-advertisers-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: auto;
    margin-top: 0;
  }
}
.ra-advertisers-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.ra-advertisers-search-ico {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem !important;
  color: #9ca3af;
  pointer-events: none;
}
.ra-advertisers-search-ico { display: none !important; }
.ra-advertisers-search,
.ra-advertisers-search:focus {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  height: 2.5rem;
  font-size: 0.875rem;
  border: 1px solid #86efac;
  border-radius: 0.5rem;
  background: #fff;
  color: #1f2937;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
html.dark body.ap-admin .ra-advertisers-search,
html.dark body.ap-admin .ra-advertisers-search:focus {
  background: #1f2937;
  border-color: #86efac;
  color: #f3f4f6;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}
.ra-advertisers-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #22c55e;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.ra-advertisers-add-btn:hover { background: #16a34a; }
.ra-advertisers-add-btn .material-symbols-outlined { font-size: 1.25rem !important; }
html.dark body.ap-admin .ra-advertisers-add-btn { background: #16a34a; }
html.dark body.ap-admin .ra-advertisers-add-btn:hover { background: #15803d; }
.ra-advertisers-card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  padding: 1.5rem;
  overflow: hidden;
}
html.dark body.ap-admin .ra-advertisers-card {
  background: #1f2937;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.35);
}
.ra-advertisers-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
}
.ra-advertisers-loading[hidden] { display: none !important; }
.ra-advertisers-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ra-adv-spin 0.7s linear infinite;
}
@keyframes ra-adv-spin { to { transform: rotate(360deg); } }
html.dark body.ap-admin .ra-advertisers-spinner {
  border-color: #374151;
  border-top-color: #3b82f6;
}
.ra-advertisers-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ra-advertisers-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}
.ra-advertisers-table thead th {
  background: #0f172a;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.85rem 0.9rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 0;
}
html.dark body.ap-admin .ra-advertisers-table thead th {
  background: #020617;
  color: #e2e8f0;
}
.ra-advertisers-table td {
  padding: 0.8rem 0.9rem;
  font-size: 0.84rem;
  color: #0f172a;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
}
html.dark body.ap-admin .ra-advertisers-table td {
  color: #e5e7eb;
  border-bottom-color: #1f2937;
  background: #111827;
}
.ra-advertisers-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}
html.dark body.ap-admin .ra-advertisers-table tbody tr:nth-child(even) td {
  background: #0f172a;
}
.ra-advertisers-table tbody tr:hover td {
  background: #eff6ff !important;
}
html.dark body.ap-admin .ra-advertisers-table tbody tr:hover td {
  background: #172554 !important;
}
.ra-advertisers-table tbody tr:last-child td {
  border-bottom: 0;
}
.ra-advertisers-td-id {
  font-weight: 500;
  color: #111827;
}
html.dark body.ap-admin .ra-advertisers-td-id { color: #f9fafb; }
.ra-advertisers-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ra-gw-actions-cell {
  white-space: nowrap;
  width: 1%;
  vertical-align: middle;
}
.ra-gw-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.ra-gw-actions .ra-pub-offer-btn-sm {
  flex: 0 0 auto;
  white-space: nowrap;
}
.ra-adv-act {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
  border-radius: 0.375rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.ra-adv-act--reset { background: #3b82f6; }
.ra-adv-act--reset:hover { background: #2563eb; }
.ra-adv-act--edit { background: #eab308; }
.ra-adv-act--edit:hover { background: #ca8a04; }
.ra-adv-act--delete { background: #ef4444; }
.ra-adv-act--delete:hover { background: #dc2626; }
html.dark body.ap-admin .ra-adv-act--reset { background: #2563eb; }
html.dark body.ap-admin .ra-adv-act--reset:hover { background: #1d4ed8; }
html.dark body.ap-admin .ra-adv-act--edit { background: #ca8a04; }
html.dark body.ap-admin .ra-adv-act--edit:hover { background: #a16207; }
html.dark body.ap-admin .ra-adv-act--delete { background: #dc2626; }
html.dark body.ap-admin .ra-adv-act--delete:hover { background: #b91c1c; }
.ra-advertisers-empty {
  text-align: center;
  color: #6b7280;
  padding: 2rem 1rem !important;
}
html.dark body.ap-admin .ra-advertisers-empty { color: #9ca3af; }
.ra-advertisers-count {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}
html.dark body.ap-admin .ra-advertisers-count { color: #9ca3af; }
.ra-advertisers-overlay.ap-modal-overlay {
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
}
html.dark body.ap-admin .ra-advertisers-overlay.ap-modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}
.ra-advertisers-modal.ap-modal {
  max-width: 36rem;
  width: 100%;
  padding: 1.5rem;
}
.ra-advertisers-modal.ra-advertisers-modal--lg.ap-modal {
  max-width: min(56rem, 96vw);
  width: 96vw;
  max-height: 92vh;
  padding: 1.75rem 2rem;
}
.ra-advertisers-modal--lg .ra-advertisers-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
  align-items: start;
}
.ra-advertisers-modal--lg .ra-advertisers-field {
  margin-bottom: 0.9rem;
}
.ra-advertisers-modal--lg #gw-ifsc-wrap,
.ra-advertisers-modal--lg .ra-advertisers-form-actions {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  .ra-advertisers-modal--lg .ra-advertisers-form {
    grid-template-columns: 1fr;
  }
}
.ra-advertisers-modal.ra-advertisers-modal--lg.ap-modal {
  max-width: min(56rem, 96vw);
  width: 96vw;
  max-height: 92vh;
  padding: 1.75rem 2rem;
}
.ra-advertisers-modal--lg .ra-advertisers-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
  align-items: start;
}
.ra-advertisers-modal--lg .ra-advertisers-field {
  margin-bottom: 0.9rem;
}
.ra-advertisers-modal--lg #gw-ifsc-wrap,
.ra-advertisers-modal--lg .ra-advertisers-form-actions {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  .ra-advertisers-modal--lg .ra-advertisers-form {
    grid-template-columns: 1fr;
  }
}
.ra-advertisers-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.ra-advertisers-form { margin-top: 0.25rem; }
.ra-advertisers-field { margin-bottom: 1rem; }
.ra-advertisers-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
html.dark body.ap-admin .ra-advertisers-label { color: #e5e7eb; }

/* Pay / Bulk Pay form fields (avoid inline #334155 which breaks dark mode) */
.ra-pay-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
html.dark body.ap-admin .ra-pay-field { color: #e5e7eb; }
.ra-pay-control {
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font: inherit;
  background: #fff;
  color: #0f172a;
  box-sizing: border-box;
  width: 100%;
}
.ra-pay-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
html.dark body.ap-admin .ra-pay-control {
  background: #111827;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-pay-control--upper { text-transform: uppercase; }
.ra-pay-btn-secondary {
  background: #e2e8f0 !important;
  color: #334155 !important;
}
html.dark body.ap-admin .ra-pay-btn-secondary {
  background: #374151 !important;
  color: #f3f4f6 !important;
}
html.dark body.ap-admin .ra-pay-btn-secondary:hover {
  background: #4b5563 !important;
}
.ra-pay-submit {
  min-width: 11.5rem;
  transition: opacity 0.15s ease, filter 0.15s ease;
}
.ra-pay-submit.is-processing,
.ra-pay-submit:disabled {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
  filter: saturate(0.85);
}
.ra-pay-submit.is-processing .ra-pay-submit-ico {
  animation: ra-pay-spin 0.85s linear infinite;
}
@keyframes ra-pay-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.ra-advertisers-req { color: #ef4444; }
.ra-advertisers-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  color: #1f2937;
  outline: none;
}
.ra-advertisers-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
html.dark body.ap-admin .ra-advertisers-input {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-advertisers-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}
html.dark body.ap-admin .ra-advertisers-hint { color: #9ca3af; }
.ra-advertisers-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.ra-advertisers-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}
.ra-advertisers-btn--cancel {
  background: #d1d5db;
  color: #1f2937;
}
.ra-advertisers-btn--cancel:hover { background: #9ca3af; }
html.dark body.ap-admin .ra-advertisers-btn--cancel {
  background: #4b5563;
  color: #e5e7eb;
}
html.dark body.ap-admin .ra-advertisers-btn--cancel:hover { background: #374151; }
.ra-advertisers-btn--save {
  background: #22c55e;
  color: #fff;
}
.ra-advertisers-btn--save:hover { background: #16a34a; }
html.dark body.ap-admin .ra-advertisers-btn--save { background: #16a34a; }
.ra-advertisers-modal--token,
.ra-advertisers-modal--delete {
  max-width: 32rem;
  text-align: center;
}
.ra-advertisers-token-icon-wrap,
.ra-advertisers-delete-ico-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  border-radius: 9999px;
  background: #fef9c3;
}
html.dark body.ap-admin .ra-advertisers-token-icon-wrap {
  background: rgba(113, 63, 18, 0.45);
}
.ra-advertisers-delete-ico-wrap {
  background: transparent;
}
.ra-advertisers-token-ico {
  color: #ca8a04;
  font-size: 1.5rem !important;
}
.ra-advertisers-delete-ico {
  color: #ef4444;
  font-size: 3rem !important;
}
.ra-advertisers-token-title,
.ra-advertisers-delete-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
}
html.dark body.ap-admin .ra-advertisers-token-title,
html.dark body.ap-admin .ra-advertisers-delete-title { color: #f3f4f6; }
.ra-advertisers-token-sub,
.ra-advertisers-delete-sub {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.45;
}
html.dark body.ap-admin .ra-advertisers-token-sub,
html.dark body.ap-admin .ra-advertisers-delete-sub { color: #9ca3af; }
.ra-advertisers-token-box {
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  word-break: break-all;
  text-align: left;
  background: #f3f4f6;
  color: #15803d;
  border: 1px solid #d1d5db;
}
html.dark body.ap-admin .ra-advertisers-token-box {
  background: #111827;
  border-color: #4b5563;
  color: #4ade80;
}
.ra-advertisers-token-actions,
.ra-advertisers-delete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}
.ra-advertisers-btn--copy {
  flex: 1 1 auto;
  min-width: 8rem;
  background: #2563eb;
  color: #fff;
}
.ra-advertisers-btn--copy:hover { background: #1d4ed8; }
.ra-advertisers-btn--copy.is-copied { background: #16a34a; }
.ra-advertisers-btn--danger {
  background: #dc2626;
  color: #fff;
}
.ra-advertisers-btn--danger:hover { background: #b91c1c; }
.ra-advertisers-delete-actions {
  flex-direction: column-reverse;
}
@media (min-width: 640px) {
  .ra-advertisers-delete-actions {
    flex-direction: row-reverse;
    justify-content: center;
  }
  .ra-advertisers-token-actions { flex-wrap: nowrap; }
}

/* Requests page — React Requests.js parity */
.ra-requests-page {
  padding: 0;
}
.ra-requests-title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}
html.dark body.ap-admin .ra-requests-title { color: #f3f4f6; }
.ra-requests-toast {
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.ra-requests-toast[hidden] { display: none !important; }
.ra-requests-toast.is-success {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.ra-requests-toast.is-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
html.dark body.ap-admin .ra-requests-toast.is-success {
  background: rgba(6, 78, 59, 0.4);
  color: #86efac;
  border-color: #15803d;
}
html.dark body.ap-admin .ra-requests-toast.is-error {
  background: rgba(127, 29, 29, 0.4);
  color: #fca5a5;
  border-color: #b91c1c;
}
.ra-requests-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ra-requests-tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  background: #e5e7eb;
  color: #374151;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.ra-requests-tab:hover { background: #d1d5db; }
.ra-requests-tab.is-active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
html.dark body.ap-admin .ra-requests-tab {
  background: #374151;
  color: #d1d5db;
}
html.dark body.ap-admin .ra-requests-tab:hover { background: #4b5563; }
html.dark body.ap-admin .ra-requests-tab.is-active {
  background: #1d4ed8;
  color: #fff;
}
.ra-requests-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.ra-tab-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}
.ra-requests-tab.is-active .ra-tab-unread {
  background: #fff;
  color: #dc2626;
}
.ra-stat-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ra-stat-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.ra-stat-card {
  position: relative;
}
.ra-stat-unread {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.ra-requests-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.ra-tab-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}
.ra-requests-tab.is-active .ra-tab-unread {
  background: #fff;
  color: #dc2626;
}
.ra-stat-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ra-stat-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.ra-stat-card {
  position: relative;
}
.ra-stat-unread {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.ra-requests-card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  padding: 1.5rem;
  color: #1f2937;
}
html.dark body.ap-admin .ra-requests-card {
  background: #1f2937;
  color: #e5e7eb;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.35);
}
.ra-requests-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
}
.ra-requests-loading[hidden] { display: none !important; }
.ra-requests-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ra-adv-spin 0.7s linear infinite;
}
html.dark body.ap-admin .ra-requests-spinner {
  border-color: #374151;
  border-top-color: #3b82f6;
}
.ra-requests-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ra-requests-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}
.ra-requests-table thead th {
  background: #0f172a;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.85rem 0.9rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 0;
}
html.dark body.ap-admin .ra-requests-table thead th {
  background: #020617;
  color: #e2e8f0;
}
.ra-requests-table td {
  padding: 0.8rem 0.9rem;
  font-size: 0.84rem;
  color: #0f172a;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}
#rq-panel-payment .ra-requests-table {
  min-width: 980px;
}
#rq-panel-payment .ra-requests-table td.ra-req-payout {
  white-space: normal;
  word-break: break-word;
  max-width: 18rem;
  min-width: 12rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #334155;
}
#rq-panel-payment .ra-requests-table td.ra-req-utr-cell {
  white-space: nowrap;
  max-width: none;
  overflow: visible;
}
#rq-panel-payment .ra-requests-table td.ra-req-amt,
#rq-panel-payment .ra-requests-table td.ra-req-time,
#rq-panel-payment .ra-requests-table td.ra-requests-td-id {
  max-width: none;
  overflow: visible;
}
.ra-req-utr {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: 0.45rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ra-req-utr-empty,
.ra-req-actions-empty {
  color: #94a3b8;
  font-weight: 600;
}
.ra-req-status-pill.ra-req-status-pill--ok {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.ra-req-status-pill.ra-req-status-pill--bad {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}
.ra-req-status-pill.ra-req-status-pill--wait {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
html.dark body.ap-admin .ra-req-status-pill.ra-req-status-pill--ok {
  background: rgba(6, 78, 59, 0.45);
  color: #86efac;
  border-color: #15803d;
}
html.dark body.ap-admin .ra-req-status-pill.ra-req-status-pill--bad {
  background: rgba(127, 29, 29, 0.45);
  color: #fca5a5;
  border-color: #b91c1c;
}
html.dark body.ap-admin .ra-req-status-pill.ra-req-status-pill--wait {
  background: rgba(120, 53, 15, 0.45);
  color: #fcd34d;
  border-color: #b45309;
}
html.dark body.ap-admin .ra-req-utr {
  background: #052e2b;
  border-color: #115e59;
  color: #5eead4;
}
html.dark body.ap-admin #rq-panel-payment .ra-requests-table td.ra-req-payout {
  color: #cbd5e1;
}
html.dark body.ap-admin .ra-requests-table td {
  color: #e5e7eb;
  border-bottom-color: #1f2937;
  background: #111827;
}
.ra-requests-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}
html.dark body.ap-admin .ra-requests-table tbody tr:nth-child(even) td {
  background: #0f172a;
}
.ra-requests-table tbody tr:hover td {
  background: #eff6ff !important;
}
html.dark body.ap-admin .ra-requests-table tbody tr:hover td {
  background: #172554 !important;
}
.ra-requests-table tbody tr.is-deleting {
  opacity: 0.4;
  transform: scale(0.99);
  transition: opacity 0.3s, transform 0.3s;
}
.ra-requests-td-id {
  font-weight: 500;
  color: #111827;
}
html.dark body.ap-admin .ra-requests-td-id { color: #f9fafb; }
.ra-requests-empty {
  text-align: center;
  color: #9ca3af;
  padding: 2rem 1rem !important;
  opacity: 0.85;
}
.ra-req-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.ra-req-act {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
  border-radius: 0.375rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.ra-req-act:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ra-req-act--accept { background: #22c55e; }
.ra-req-act--accept:hover:not(:disabled) { background: #16a34a; }
.ra-req-act--reject { background: #ef4444; }
.ra-req-act--reject:hover:not(:disabled) { background: #dc2626; }
.ra-req-act--delete { background: #dc2626; }
.ra-req-act--delete:hover:not(:disabled) { background: #b91c1c; }
html.dark body.ap-admin .ra-req-act--accept { background: #16a34a; }
html.dark body.ap-admin .ra-req-act--reject,
html.dark body.ap-admin .ra-req-act--delete { background: #dc2626; }
.ra-req-act-spin {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ra-adv-spin 0.6s linear infinite;
}
.ra-req-status-pill {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  background: #d1d5db;
  color: #6b7280;
}
html.dark body.ap-admin .ra-req-status-pill {
  background: #4b5563;
  color: #9ca3af;
}
.ra-requests-overlay.ap-modal-overlay {
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
}
.ra-requests-delete-modal.ap-modal {
  max-width: 28rem;
  width: 100%;
  padding: 1.25rem;
}
.ra-requests-delete-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}
html.dark body.ap-admin .ra-requests-delete-title { color: #f3f4f6; }
.ra-requests-delete-sub {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.45;
}
html.dark body.ap-admin .ra-requests-delete-sub { color: #9ca3af; }
.ra-requests-delete-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap-reverse;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.ra-requests-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.ra-requests-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ra-requests-btn--cancel {
  background: #e5e7eb;
  color: #1f2937;
}
.ra-requests-btn--cancel:hover:not(:disabled) { background: #d1d5db; }
html.dark body.ap-admin .ra-requests-btn--cancel {
  background: #374151;
  color: #f3f4f6;
}
html.dark body.ap-admin .ra-requests-btn--cancel:hover:not(:disabled) { background: #4b5563; }
.ra-requests-btn--danger {
  background: #dc2626;
  color: #fff;
}
.ra-requests-btn--danger:hover:not(:disabled) { background: #b91c1c; }
.ra-requests-btn-spin {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ra-adv-spin 0.6s linear infinite;
}
.ra-requests-btn-spin[hidden] { display: none !important; }

/* Notifications page — React Notify.js parity */
.ra-notify-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ra-notify-hero,
.ra-notify-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  padding: 1.5rem;
}
html.dark body.ap-admin .ra-notify-hero,
html.dark body.ap-admin .ra-notify-card {
  background: #111827;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.35);
}
.ra-notify-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}
html.dark body.ap-admin .ra-notify-title { color: #f3f4f6; }
.ra-notify-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #4b5563;
}
html.dark body.ap-admin .ra-notify-subtitle { color: #9ca3af; }
.ra-notify-card-title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}
.ra-notify-list-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
html.dark body.ap-admin .ra-notify-card-title { color: #f3f4f6; }
.ra-notify-alert {
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.ra-notify-alert[hidden] { display: none !important; }
.ra-notify-alert.is-success {
  background: #dcfce7;
  color: #15803d;
}
.ra-notify-alert.is-error {
  background: #fee2e2;
  color: #b91c1c;
}
html.dark body.ap-admin .ra-notify-alert.is-success {
  background: rgba(6, 78, 59, 0.35);
  color: #86efac;
}
html.dark body.ap-admin .ra-notify-alert.is-error {
  background: rgba(127, 29, 29, 0.35);
  color: #fca5a5;
}
.ra-notify-field { margin-bottom: 1rem; }
.ra-notify-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
html.dark body.ap-admin .ra-notify-label { color: #e5e7eb; }
.ra-notify-input,
.ra-notify-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #f9fafb;
  color: #111827;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.ra-notify-textarea {
  resize: vertical;
  min-height: 6rem;
}
.ra-notify-input:focus,
.ra-notify-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}
html.dark body.ap-admin .ra-notify-input,
html.dark body.ap-admin .ra-notify-textarea {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}
.ra-notify-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.ra-notify-submit:hover:not(:disabled) { background: #1d4ed8; }
.ra-notify-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ra-notify-loading {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}
.ra-notify-loading[hidden] { display: none !important; }
.ra-notify-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ra-adv-spin 0.7s linear infinite;
}
html.dark body.ap-admin .ra-notify-spinner {
  border-color: #374151;
  border-top-color: #3b82f6;
}
.ra-notify-empty {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
}
html.dark body.ap-admin .ra-notify-empty { color: #9ca3af; }
.ra-notify-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}
html.dark body.ap-admin .ra-notify-table-wrap {
  border-color: #374151;
}
.ra-notify-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ra-notify-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}
.ra-notify-table thead th {
  background: #0f172a;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.85rem 0.9rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 0;
}
html.dark body.ap-admin .ra-notify-table thead th {
  background: #020617;
  color: #e2e8f0;
}
.ra-notify-table td {
  padding: 0.8rem 0.9rem;
  color: #0f172a;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
}
html.dark body.ap-admin .ra-notify-table td {
  color: #e5e7eb;
  border-bottom-color: #1f2937;
  background: #111827;
}
.ra-notify-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}
html.dark body.ap-admin .ra-notify-table tbody tr:nth-child(even) td {
  background: #0f172a;
}
.ra-notify-table tbody tr:hover td {
  background: #eff6ff !important;
}
html.dark body.ap-admin .ra-notify-table tbody tr:hover td {
  background: #172554 !important;
}
.ra-notify-td-title {
  font-weight: 500;
  color: #1f2937;
}
html.dark body.ap-admin .ra-notify-td-title { color: #e5e7eb; }
.ra-notify-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.15s, background 0.15s;
}
.ra-notify-delete:hover:not(:disabled) {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
}
.ra-notify-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ra-notify-delete .material-symbols-outlined {
  font-size: 1rem !important;
}

/* Telegram page — React TelegramSettings.js parity */
.ra-telegram-page {
  padding: 0;
}
.ra-telegram-inner {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.ra-telegram-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  padding: 1.5rem;
  transition: background 0.2s, box-shadow 0.2s;
}
html.dark body.ap-admin .ra-telegram-card {
  background: #111827;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.35);
}
.ra-telegram-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}
html.dark body.ap-admin .ra-telegram-head {
  border-bottom-color: #374151;
}
.ra-telegram-head-ico {
  color: #2563eb;
  font-size: 1.5rem !important;
}
.ra-telegram-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}
html.dark body.ap-admin .ra-telegram-title { color: #e5e7eb; }
.ra-telegram-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.ra-telegram-alert[hidden] { display: none !important; }
.ra-telegram-alert.is-success {
  background: #dcfce7;
  color: #15803d;
}
.ra-telegram-alert.is-error {
  background: #fee2e2;
  color: #b91c1c;
}
html.dark body.ap-admin .ra-telegram-alert.is-success {
  background: rgba(6, 78, 59, 0.45);
  color: #86efac;
}
html.dark body.ap-admin .ra-telegram-alert.is-error {
  background: rgba(127, 29, 29, 0.45);
  color: #fca5a5;
}
.ra-telegram-alert-ico { font-size: 1.125rem !important; }
.ra-telegram-fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.ra-telegram-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
html.dark body.ap-admin .ra-telegram-label { color: #d1d5db; }
.ra-telegram-label-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: #9ca3af;
}
.ra-telegram-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ra-telegram-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
html.dark body.ap-admin .ra-telegram-input {
  background: #1f2937;
  border-color: #4b5563;
  color: #e5e7eb;
}
.ra-telegram-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding-top: 0.25rem;
}
@media (min-width: 640px) {
  .ra-telegram-checks { grid-template-columns: repeat(3, 1fr); }
}
.ra-telegram-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
html.dark body.ap-admin .ra-telegram-check { color: #d1d5db; }
.ra-telegram-check input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #2563eb;
  cursor: pointer;
}
.ra-telegram-check--success input[type="checkbox"] { accent-color: #16a34a; }
.ra-telegram-check--reject input[type="checkbox"] { accent-color: #dc2626; }
.ra-telegram-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .ra-telegram-actions { flex-direction: row; }
}
.ra-telegram-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transition: background 0.15s, opacity 0.15s;
}
.ra-telegram-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ra-telegram-btn .material-symbols-outlined { font-size: 1.25rem !important; }
.ra-telegram-btn--save { background: #2563eb; }
.ra-telegram-btn--save:hover:not(:disabled) { background: #1d4ed8; }
.ra-telegram-btn--test { background: #16a34a; }
.ra-telegram-btn--test:hover:not(:disabled) { background: #15803d; }
.ra-telegram-btn--webhook { background: #9333ea; }
.ra-telegram-btn--webhook:hover:not(:disabled) { background: #7e22ce; }
.ra-telegram-help-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
}
html.dark body.ap-admin .ra-telegram-help-title { color: #e5e7eb; }
.ra-telegram-help-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.6;
}
html.dark body.ap-admin .ra-telegram-help-list { color: #9ca3af; }
.ra-telegram-help-list li { margin-bottom: 0.5rem; }
.ra-telegram-help-list code {
  font-size: 0.8125rem;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}
html.dark body.ap-admin .ra-telegram-help-list code {
  background: rgba(255, 255, 255, 0.08);
}

/* Profile page — React Profile.js parity */
.ra-profile-page {
  padding: 0;
  width: 100%;
}
.ra-profile-loading,
.ra-profile-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  padding: 2rem 1rem;
}
.ra-profile-loading[hidden],
.ra-profile-error[hidden] { display: none !important; }
.ra-profile-error p {
  margin: 0;
  font-size: 1.125rem;
  color: #ef4444;
}
.ra-profile-spinner {
  width: 3rem;
  height: 3rem;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ra-adv-spin 0.7s linear infinite;
}
html.dark body.ap-admin .ra-profile-spinner {
  border-color: #374151;
  border-top-color: #3b82f6;
}
.ra-profile-alert {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.ra-profile-alert[hidden] { display: none !important; }
.ra-profile-alert.is-success {
  background: #dcfce7;
  color: #15803d;
}
.ra-profile-alert.is-error {
  background: #fee2e2;
  color: #b91c1c;
}
html.dark body.ap-admin .ra-profile-alert.is-success {
  background: rgba(6, 78, 59, 0.35);
  color: #86efac;
}
html.dark body.ap-admin .ra-profile-alert.is-error {
  background: rgba(127, 29, 29, 0.35);
  color: #fca5a5;
}
.ra-profile-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  overflow: hidden;
  color: #1f2937;
}
html.dark body.ap-admin .ra-profile-card {
  background: #1c1c1c;
  color: #f3f4f6;
}
.ra-profile-banner {
  position: relative;
  height: 10rem;
  background: linear-gradient(to right, #2563eb, #1d4ed8, #1e40af);
}
.ra-profile-edit-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  background: #fff;
  border: none;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  cursor: pointer;
  transition: background 0.15s;
}
.ra-profile-edit-btn:hover:not(:disabled) { background: #e5e7eb; }
.ra-profile-edit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ra-profile-avatar-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.ra-profile-avatar {
  position: relative;
  width: 9rem;
  height: 9rem;
  border-radius: 9999px;
  border: 4px solid #fff;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2);
  background: #d1d5db;
}
html.dark body.ap-admin .ra-profile-avatar {
  border-color: #1f2937;
  background: #4b5563;
}
.ra-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ra-profile-avatar-img[hidden] { display: none !important; }
.ra-profile-avatar-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 3.75rem;
  font-weight: 700;
  color: #374151;
}
html.dark body.ap-admin .ra-profile-avatar-letter { color: #e5e7eb; }
.ra-profile-avatar-letter[hidden] { display: none !important; }
.ra-profile-upload {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.ra-profile-avatar:hover .ra-profile-upload { opacity: 1; }
.ra-profile-body {
  padding: 1rem 1.5rem 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .ra-profile-body { padding: 1rem 1.5rem 2rem; }
}
.ra-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.5rem;
}
@media (min-width: 768px) {
  .ra-profile-grid { grid-template-columns: repeat(2, 1fr); }
}
.ra-profile-field { margin-bottom: 1rem; }
.ra-profile-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
}
html.dark body.ap-admin .ra-profile-label { color: #9ca3af; }
.ra-profile-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
}
html.dark body.ap-admin .ra-profile-hint { color: #9ca3af; }
.ra-profile-input-wrap {
  position: relative;
}
.ra-profile-input-ico {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem !important;
  color: #6b7280;
  pointer-events: none;
}
html.dark body.ap-admin .ra-profile-input-ico { color: #9ca3af; }
.ra-profile-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 2.75rem 0.5rem 2.5rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  color: #1f2937;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.ra-profile-input--plain {
  padding: 0.5rem 0.75rem;
}
.ra-profile-input:focus:not(.is-readonly):not([readonly]) {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
.ra-profile-input.is-readonly,
.ra-profile-input[readonly] {
  background: #f3f4f6;
  cursor: not-allowed;
}
html.dark body.ap-admin .ra-profile-input {
  background: #2c2c2c;
  border-color: #444;
  color: #f3f4f6;
}
html.dark body.ap-admin .ra-profile-input.is-readonly,
html.dark body.ap-admin .ra-profile-input[readonly] {
  background: #374151;
}
.ra-profile-copy {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.15s;
}
.ra-profile-copy:hover { color: #16a34a; }
.ra-profile-copy .material-symbols-outlined { font-size: 1rem !important; }
.ra-profile-copied {
  position: absolute;
  top: -1.5rem;
  right: -0.25rem;
  font-size: 0.75rem;
  color: #16a34a;
  background: #fff;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
  white-space: nowrap;
}
html.dark body.ap-admin .ra-profile-copied {
  background: #374151;
  color: #4ade80;
}
.ra-profile-copied[hidden] { display: none !important; }
.ra-profile-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}
html.dark body.ap-admin .ra-profile-section {
  border-top-color: #374151;
}
.ra-profile-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}
html.dark body.ap-admin .ra-profile-section-title { color: #f3f4f6; }
.ra-profile-bank-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .ra-profile-bank-grid { grid-template-columns: repeat(2, 1fr); }
}
.ra-profile-bank-full {
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .ra-profile-bank-full { grid-column: span 1; }
}

/* Aff Reports — React AffReports.js parity */
.ra-aff-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ra-aff-filter-card { padding: 1rem 1.25rem; }
.ra-aff-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .ra-aff-filter-grid { grid-template-columns: repeat(5, 1fr); }
}
.ra-aff-field { min-width: 0; }
.ra-aff-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
html.dark body.ap-admin .ra-aff-label { color: #d1d5db; }
.ra-aff-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  color: #1f2937;
}
html.dark body.ap-admin .ra-aff-select {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-aff-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: flex-end;
}
@media (min-width: 768px) {
  .ra-aff-actions {
    grid-column: span 2;
    flex-direction: row;
  }
}
.ra-aff-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.ra-aff-btn--apply { background: #2563eb; }
.ra-aff-btn--apply:hover { background: #1d4ed8; }
.ra-aff-btn--reset { background: #4b5563; }
.ra-aff-btn--reset:hover { background: #374151; }
.ra-aff-export-card { padding: 1rem 1.25rem; }
.ra-aff-export-title { margin-bottom: 0.75rem; }
.ra-aff-table-card { padding: 1rem 1.25rem; }
.ra-aff-table-head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}
@media (min-width: 640px) {
  .ra-aff-table-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
html.dark body.ap-admin .ra-aff-table-head { border-bottom-color: #374151; }
.ra-aff-report-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  min-width: 0;
  flex: 1;
}
.ra-aff-report-title-text {
  flex-shrink: 0;
}
.ra-aff-report-q-wrap {
  position: relative;
  min-width: 11rem;
  max-width: 18rem;
  flex: 1 1 11rem;
}
.ra-aff-report-q {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  outline: none;
}
.ra-aff-report-q:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}
.ra-aff-report-q::placeholder {
  color: #94a3b8;
  font-weight: 600;
}
html.dark body.ap-admin .ra-aff-report-q {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}
html.dark body.ap-admin .ra-aff-report-q:focus {
  background: #111827;
  border-color: #60a5fa;
}
html.dark body.ap-admin .ra-aff-report-q::placeholder {
  color: #64748b;
}
.ra-aff-table-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ra-aff-count {
  font-size: 0.875rem;
  color: #6b7280;
}
html.dark body.ap-admin .ra-aff-count { color: #9ca3af; }
.ra-aff-refresh {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.ra-aff-refresh:hover { background: #1d4ed8; }
.ra-aff-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}
.ra-aff-table thead th {
  background: #0f172a;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.85rem 0.9rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 0;
}
html.dark body.ap-admin .ra-aff-table thead th {
  background: #020617;
  color: #e2e8f0;
}
.ra-aff-table td {
  padding: 0.8rem 0.9rem;
  color: #0f172a;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
}
html.dark body.ap-admin .ra-aff-table td {
  color: #e5e7eb;
  border-bottom-color: #1f2937;
  background: #111827;
}
.ra-aff-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}
html.dark body.ap-admin .ra-aff-table tbody tr:nth-child(even) td {
  background: #0f172a;
}
.ra-aff-table tbody tr:hover td {
  background: #eff6ff !important;
}
html.dark body.ap-admin .ra-aff-table tbody tr:hover td {
  background: #172554 !important;
}
.ra-aff-th-center, .ra-aff-td-center { text-align: center; }
.ra-aff-th-right, .ra-aff-td-right { text-align: right; }
.ra-aff-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ra-aff-status--ok {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}
.ra-aff-status--bad {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
html.dark body.ap-admin .ra-aff-status--ok {
  background: rgba(6, 78, 59, 0.45);
  color: #86efac;
}
html.dark body.ap-admin .ra-aff-status--bad {
  background: rgba(127, 29, 29, 0.4);
  color: #fca5a5;
}
/* iOS-style ON/OFF toggle (Aff Reports publisher status) */
.ra-ios-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3.125rem;
  height: 1.875rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  background: #e5e7eb;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: background 0.22s ease, opacity 0.15s ease;
  vertical-align: middle;
}
.ra-ios-toggle--on {
  background: #34c759;
}
.ra-ios-toggle--off {
  background: #e5e7eb;
}
.ra-ios-toggle:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ra-ios-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.ra-ios-toggle--on .ra-ios-toggle-knob {
  transform: translateX(1.25rem);
}
html.dark body.ap-admin .ra-ios-toggle--off {
  background: #4b5563;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
html.dark body.ap-admin .ra-ios-toggle--on {
  background: #30d158;
}
html.dark body.ap-admin .ra-ios-toggle-knob {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.ra-aff-pay-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 7.5rem;
}
.ra-aff-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}
.ra-aff-pay-row span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #475569;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-aff-pay-row span { color: #94a3b8; }
.ra-aff-pay-row .ra-ios-toggle {
  width: 2.55rem;
  height: 1.5rem;
  flex: 0 0 auto;
}
.ra-aff-pay-row .ra-ios-toggle-knob {
  width: 1.2rem;
  height: 1.2rem;
}
.ra-aff-pay-row .ra-ios-toggle--on .ra-ios-toggle-knob {
  transform: translateX(1.05rem);
}

/* Campaigns — affiliate panel theme (Offers / Advertisers parity) */
.ra-camp-page { display: flex; flex-direction: column; gap: 0; margin-bottom: 1rem; }
.ra-camp-page .ra-camp-card.ra-offers-react-strip {
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
}
.ra-camp-strip {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}
html.dark body.ap-admin .ra-camp-strip {
  background: #111827;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.4);
}
.ra-camp-strip-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ra-camp-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
html.dark body.ap-admin .ra-camp-title { color: #e5e7eb; }
.ra-camp-title-ico { font-size: 28px; color: var(--ap-accent, #2563eb); }
.ra-camp-sub {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ap-muted, #64748b);
}
.ra-camp-fab {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: none;
  background: #16a34a;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.12);
  transition: transform .15s, background .15s;
}
.ra-camp-fab:hover { background: #15803d; color: #fff; transform: scale(1.05); }
.ra-camp-fab .material-symbols-outlined { font-size: 1.5rem; }
.ra-camp-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #22c55e;
  border: none;
  border-radius: 0.375rem;
  text-decoration: none;
  cursor: pointer;
}
.ra-camp-add-btn:hover { background: #16a34a; color: #fff; }
.ra-camp-flash {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.ra-camp-flash[hidden] { display: none !important; }
.ra-camp-flash.is-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.ra-camp-flash.is-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ra-camp-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.08);
  overflow: hidden;
}
html.dark body.ap-admin .ra-camp-card { background: #111827; }
.ra-camp-card-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  min-height: 3rem;
}
html.dark body.ap-admin .ra-camp-card-head { border-bottom-color: #374151; }
.ra-camp-card-head .ra-offers-react-title {
  margin: 0;
  flex: 0 0 auto;
  font-size: 1.15rem;
}
.ra-camp-card-head .ra-offers-react-title-ico {
  width: 2rem;
  height: 2rem;
  font-size: 1.1rem !important;
}
.ra-camp-card-head h3 {
  margin: 0;
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}
html.dark body.ap-admin .ra-camp-card-head h3 { color: #e5e7eb; }
.ra-camp-search {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}
.ra-camp-card-head .ra-camp-fab {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
}
.ra-camp-head-stats {
  margin: 0;
  font-size: 0.85rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.ra-camp-search .material-symbols-outlined { display: none !important; }
.ra-camp-search input,
.ra-camp-search input:focus {
  width: 100%;
  max-width: 22rem;
  height: 2.5rem;
  margin: 0 auto;
  box-sizing: border-box;
  border: 1px solid #86efac;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  color: #111827;
  outline: none;
  min-width: 0;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
html.dark body.ap-admin .ra-camp-search input,
html.dark body.ap-admin .ra-camp-search input:focus {
  background: #1f2937;
  border-color: #86efac;
  color: #e5e7eb;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}
.ra-camp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
}
@media (max-width: 768px) {
  .ra-camp-card-head {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.65rem;
    padding: 0.7rem 0.75rem;
  }
  .ra-camp-card-head > .ra-offers-react-title,
  .ra-camp-card-head > h2,
  .ra-camp-card-head > h3 {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.05rem;
  }
  .ra-camp-card-head > .ra-camp-fab {
    order: 2;
    margin-left: auto;
  }
  .ra-camp-card-head > .ra-camp-head-stats {
    flex: 1 1 100%;
    order: 5;
    white-space: normal;
    line-height: 1.35;
  }
  .ra-camp-card-head > .ra-camp-search {
    flex: 1 1 100%;
    order: 10;
    justify-content: stretch;
    max-width: none;
  }
  .ra-camp-card-head > .ra-camp-search input,
  .ra-camp-card-head > .ra-camp-search input:focus {
    max-width: none;
    width: 100%;
    margin: 0;
  }
}
@media (max-width: 768px) {
  .ra-offers-react-strip-inner {
    flex-wrap: wrap;
    gap: 0.55rem 0.65rem;
  }
  .ra-offers-react-strip-inner > .ra-offers-react-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.15rem;
  }
  .ra-offers-react-strip-inner > .ra-offers-react-fab {
    order: 2;
    margin-left: auto;
  }
  .ra-offers-react-strip-inner > .ra-offers-search {
    flex: 1 1 100%;
    order: 10;
    justify-content: stretch;
    max-width: none;
  }
  .ra-offers-react-strip-inner > .ra-offers-search input,
  .ra-offers-react-strip-inner > .ra-offers-search input:focus {
    max-width: none;
    width: 100%;
    margin: 0;
  }
}
.ra-camp-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
}
.ra-camp-table thead th {
  padding: 0.85rem 0.9rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #f8fafc;
  background: #0f172a;
  border-bottom: 0;
}
html.dark body.ap-admin .ra-camp-table thead th {
  background: #020617;
  color: #e2e8f0;
}
.ra-camp-table tbody td {
  padding: 0.8rem 0.9rem;
  font-size: 0.84rem;
  color: #0f172a;
  white-space: nowrap;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  background: #fff;
}
html.dark body.ap-admin .ra-camp-table tbody td {
  color: #e5e7eb;
  border-color: #1f2937;
  background: #111827;
}
.ra-camp-table tbody tr:nth-child(even) td { background: #f8fafc; }
html.dark body.ap-admin .ra-camp-table tbody tr:nth-child(even) td { background: #0f172a; }
.ra-camp-table tbody tr:hover td { background: #eff6ff !important; }
html.dark body.ap-admin .ra-camp-table tbody tr:hover td { background: #172554 !important; }
.ra-camp-id { font-weight: 700; color: #6b7280 !important; }
.ra-camp-publisher { white-space: nowrap; vertical-align: top; }
.ra-camp-pubid { font-weight: 700; color: #1d4ed8 !important; }
.ra-camp-pubname { font-size: 0.75rem; color: #6b7280; margin-top: 2px; font-weight: 500; }
html.dark body.ap-admin .ra-camp-pubid { color: #93c5fd !important; }
html.dark body.ap-admin .ra-camp-pubname { color: #94a3b8; }
.ra-camp-name { font-weight: 600; color: #111827 !important; }
html.dark body.ap-admin .ra-camp-name { color: #f3f4f6 !important; }
.ra-camp-empty {
  text-align: center !important;
  padding: 2rem 1rem !important;
  color: #6b7280;
}
.ra-camp-empty a { color: var(--ap-accent, #2563eb); font-weight: 600; }
.ra-camp-disabled { font-size: 0.75rem; color: #9ca3af; }
.ra-camp-link-cell { display: flex; align-items: center; gap: 0.5rem; }
.ra-camp-link {
  color: var(--ap-accent, #2563eb);
  font-weight: 600;
  text-decoration: none;
}
.ra-camp-link:hover { color: var(--ap-accent-hover, #1d4ed8); }
.ra-camp-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}
.ra-camp-copy:hover { color: var(--ap-accent, #2563eb); transform: scale(1.1); }
.ra-camp-copy.is-copied { color: #16a34a; }
.ra-camp-copy .material-symbols-outlined { font-size: 1.05rem; }
.ra-camp-status {
  appearance: none;
  -webkit-appearance: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 24px 6px 12px;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  outline: none;
  min-width: 90px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1em 1em;
}
.ra-camp-status.is-active { background-color: #16a34a; }
.ra-camp-status.is-active:hover { background-color: #15803d; }
.ra-camp-status.is-over { background-color: #dc2626; }
.ra-camp-status.is-over:hover { background-color: #b91c1c; }
.ra-camp-status option { background: #fff; color: #1f2937; }
.ra-camp-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.375rem;
}
.ra-camp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: 0.375rem;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.ra-camp-action .material-symbols-outlined { font-size: 0.95rem; }
.ra-camp-action--edit { background: var(--ap-accent, #2563eb); }
.ra-camp-action--edit:hover { background: var(--ap-accent-hover, #1d4ed8); color: #fff; }
.ra-camp-action--clone { background: #16a34a; }
.ra-camp-action--clone:hover { background: #15803d; }
.ra-camp-action--del { background: #dc2626; }
.ra-camp-action--del:hover { background: #b91c1c; }
.ra-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  transition: background .15s, border-color .15s, color .15s;
}
.ra-btn-ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
html.dark body.ap-admin .ra-btn-ghost {
  background: #1f2937;
  border-color: #334155;
  color: #e2e8f0;
}
html.dark body.ap-admin .ra-btn-ghost:hover {
  background: #0f172a;
  border-color: #475569;
}
.ra-camp-modal { max-width: 28rem; width: 100%; padding: 1.5rem; }
.ra-camp-modal-title { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 700; }
.ra-camp-modal-sub { margin: 0 0 1.25rem; font-size: 0.875rem; color: #6b7280; }
.ra-camp-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.ra-camp-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.ra-camp-btn--ghost { background: #f3f4f6; color: #374151; }
.ra-camp-btn--danger { background: #dc2626; color: #fff; }

/* Campaign tool pages — keep advertisers shell, no sky override */
.ra-camp-tool-page .ra-advertisers-add-btn { background: #22c55e; }
.ra-camp-tool-page .ra-advertisers-add-btn:hover { background: #16a34a; }

.ra-campaigns-page { display: flex; flex-direction: column; gap: 1rem; }

/* Shared status banner used by Fluxi admin pages (push, withdrawals, tickets, proofs). */
.ra-campaigns-alert {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}
.ra-campaigns-alert[hidden] { display: none !important; }
.ra-campaigns-alert.is-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.ra-campaigns-alert.is-err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.ra-campaigns-alert.is-warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
html.dark body.ap-admin .ra-campaigns-alert.is-ok {
  background: rgba(6, 78, 59, 0.35);
  color: #6ee7b7;
  border-color: #065f46;
}
html.dark body.ap-admin .ra-campaigns-alert.is-err {
  background: rgba(127, 29, 29, 0.35);
  color: #fca5a5;
  border-color: #7f1d1d;
}
html.dark body.ap-admin .ra-campaigns-alert.is-warn {
  background: rgba(120, 53, 15, 0.35);
  color: #fcd34d;
  border-color: #92400e;
}
.fn-last-result {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.fn-last-result[hidden] { display: none !important; }
.fn-last-result-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
}
html.dark body.ap-admin .fn-last-result-item {
  background: #0f172a;
  border-color: #334155;
}
.fn-last-result-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.2rem;
}
.fn-last-result-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}
html.dark body.ap-admin .fn-last-result-value { color: #f8fafc; }
@media (max-width: 520px) {
  .fn-last-result { grid-template-columns: 1fr; }
}

/* —— Publisher offers list (React Offers.js publisher mode) —— */
.ra-pub-offers-page { display: flex; flex-direction: column; gap: 1rem; }
.ra-pub-offers-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.ra-pub-offers-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ra-pub-offers-title-ico { font-size: 1.5rem; color: #2563eb; }
.ra-pub-offers-msg {
  margin: 0;
  font-size: 0.875rem;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}
.ra-pub-offers-filters {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  padding: 1rem 1.25rem;
}
.ra-pub-offers-filters-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
}
.ra-pub-offers-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .ra-pub-offers-filters-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ra-pub-offers-select,
.ra-pub-offers-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: #fff;
  color: #1f2937;
}
.ra-pub-offers-table-card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  overflow: hidden;
  position: relative;
  min-height: 8rem;
}
.ra-pub-offers-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}
.ra-pub-offers-loading[hidden] { display: none !important; }
.ra-pub-offers-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}
/* thead/td polish comes from shared .ra-offers-react-table + publisher parity rules */
.ra-pub-offers-th-logo { width: 4.5rem; min-width: 4.5rem; }
.ra-pub-offers-td-logo { text-align: center; }
.ra-pub-offers-td-name { font-weight: 800; color: #0f172a; }
.ra-pub-offers-td-name strong { font-weight: 800; color: inherit; }
.ra-pub-offers-muted { font-size: 0.75rem; color: #94a3b8; font-weight: 600; }
.ra-pub-offers-select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.ra-pub-offers-select-btn:hover { filter: brightness(1.05); color: #fff; }
.ra-pub-offers-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
  display: inline-block;
}
.ra-pub-offers-logo-fallback {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}
.ra-offer-logo-cell {
  width: 3.25rem !important;
  max-width: 3.5rem !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  vertical-align: middle !important;
}
.ra-offer-table-logo {
  display: block !important;
  width: 2.25rem !important;
  height: 2.25rem !important;
  max-width: 2.25rem !important;
  max-height: 2.25rem !important;
  border-radius: 0.5rem !important;
  object-fit: cover !important;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}
.ra-offer-table-logo-fallback {
  /* no display:!important — inline style="display:none" must hide when image loads */
  display: flex;
  width: 2.25rem !important;
  height: 2.25rem !important;
  max-width: 2.25rem !important;
  max-height: 2.25rem !important;
  border-radius: 0.5rem !important;
  object-fit: cover !important;
  border: 1px solid #2563eb;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
}
html.dark body.ap-admin .ra-offer-table-logo,
html.dark body.ap-publisher .ra-offer-table-logo {
  border-color: #374151;
  background: #1f2937;
}
.ra-offer-logo-cell {
  width: 3.25rem !important;
  max-width: 3.5rem !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  vertical-align: middle !important;
}
.ra-offer-table-logo {
  display: block !important;
  width: 2.25rem !important;
  height: 2.25rem !important;
  max-width: 2.25rem !important;
  max-height: 2.25rem !important;
  border-radius: 0.5rem !important;
  object-fit: cover !important;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}
.ra-offer-table-logo-fallback {
  /* no display:!important — inline style="display:none" must hide when image loads */
  display: flex;
  width: 2.25rem !important;
  height: 2.25rem !important;
  max-width: 2.25rem !important;
  max-height: 2.25rem !important;
  border-radius: 0.5rem !important;
  object-fit: cover !important;
  border: 1px solid #2563eb;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
}
html.dark body.ap-admin .ra-offer-table-logo,
html.dark body.ap-publisher .ra-offer-table-logo {
  border-color: #374151;
  background: #1f2937;
}
.ra-pub-offers-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}
.ra-pub-offers-status--ok { background: #dcfce7; color: #166534; }
.ra-pub-offers-status--pending { background: #fef9c3; color: #854d0e; }
.ra-pub-offers-status--inactive { background: #fee2e2; color: #991b1b; }
.ra-pub-offers-request {
  padding: 0.25rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.ra-pub-offers-request:disabled { opacity: 0.6; cursor: not-allowed; }
.ra-action-btn--view {
  display: inline-flex;
  color: #2563eb;
  background: transparent;
  border: none;
  padding: 0.35rem;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
}
.ra-action-btn--view:hover { background: #eff6ff; }
html.dark body.ap-publisher .ra-pub-offers-title { color: #f3f4f6; }
html.dark body.ap-publisher .ra-pub-offers-filters,
html.dark body.ap-publisher .ra-pub-offers-table-card { background: #111827; border-color: #374151; }
html.dark body.ap-publisher .ra-pub-offers-filters-title { color: #f3f4f6; }
html.dark body.ap-publisher .ra-pub-offers-select,
html.dark body.ap-publisher .ra-pub-offers-input { background: #1f2937; border-color: #4b5563; color: #f3f4f6; }
html.dark body.ap-publisher .ra-pub-offers-table thead { background: #1f2937; }
html.dark body.ap-publisher .ra-pub-offers-table th { color: #d1d5db; }
html.dark body.ap-publisher .ra-pub-offers-table td { color: #e5e7eb; border-color: #374151; }
html.dark body.ap-publisher .ra-pub-offers-table tbody tr:hover td { background: #1f2937; }

/* —— Publisher offer view —— */
.ra-pub-offer-view {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: none;
}
.ra-pov-topbar {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}
.ra-pov-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}
.ra-pov-details-card .ra-pub-offer-card-body {
  padding-bottom: 0;
}
.ra-pov-hero-in-card {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.ra-pov-inset-head {
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
  margin: 0;
}
.ra-pov-inset-block {
  border-top: 1px solid #f3f4f6;
}
.ra-pov-track-block {
  padding: 1.25rem;
}
.ra-pov-goals-block {
  padding: 0;
}
.ra-pov-goals-block .ra-pov-inset-head {
  border-top: none;
}
.ra-pov-goals-block .ra-reports-table-scroll {
  overflow-x: auto;
}
.ra-pov-goals-table th,
.ra-pov-goals-table td {
  padding: 0.65rem 1rem;
}
.ra-pub-offer-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: background 0.15s, color 0.15s;
}
.ra-pub-offer-back:hover {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.ra-pov-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}
.ra-pov-hero-logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.ra-pov-hero-fallback {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ra-pov-hero-text { min-width: 0; }
.ra-pov-hero-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
}
.ra-pov-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.ra-pov-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f3f4f6;
  color: #4b5563;
}
.ra-pov-chip--model { background: #ede9fe; color: #5b21b6; }
.ra-pov-chip--cat { background: #e0f2fe; color: #0369a1; }
.ra-pub-offer-card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  overflow: hidden;
}
.ra-pub-offer-card-head {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #111827;
  text-align: left;
  background: #fafafa;
}
.ra-pub-offer-card-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ra-pub-offer-card-body { padding: 0; }
.ra-pov-details {
  margin: 0;
  padding: 0;
}
.ra-pov-detail {
  display: grid;
  grid-template-columns: minmax(9rem, 38%) 1fr;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  align-items: center;
}
.ra-pov-detail:last-child { border-bottom: none; }
.ra-pov-detail dt {
  margin: 0;
  color: #6b7280;
  font-weight: 500;
}
.ra-pov-detail dd {
  margin: 0;
  color: #111827;
  font-weight: 500;
  text-align: left;
  word-break: break-word;
}
.ra-pov-detail dd a {
  color: #2563eb;
  text-decoration: none;
}
.ra-pov-detail dd a:hover { text-decoration: underline; }
.ra-pov-desc {
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
}
.ra-pov-desc--empty { color: #9ca3af; font-style: italic; }
.ra-pov-pb-body { padding: 1.1rem 1.25rem 1.3rem; }
.ra-pov-pb-card {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.08);
}
.ra-pov-pb-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 1.05rem 1.25rem;
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 48%, #f5f3ff 100%);
  border-bottom: 1px solid #dbeafe;
}
.ra-pov-pb-card-head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
}
.ra-pov-pb-card-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  color: #fff !important;
  font-size: 1.25rem !important;
  box-shadow: 0 8px 16px rgba(30, 58, 138, 0.32);
  flex-shrink: 0;
}
.ra-pov-pb-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.ra-pov-pb-card-head p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}
.ra-pov-pb-help {
  margin: 0 0 0.875rem;
  font-size: 0.8125rem;
  color: #6b7280;
}
.ra-pov-pb-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.05rem;
}
@media (max-width: 640px) {
  .ra-pov-pb-modes { grid-template-columns: 1fr; }
}
.ra-pov-pb-mode {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.35rem 1.15rem 1.15rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.12s;
}
.ra-pov-pb-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ra-pov-pb-mode:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}
.ra-pov-pb-mode.is-active {
  border-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 72%);
  box-shadow: 0 0 0 1px #2563eb, 0 12px 28px rgba(37, 99, 235, 0.16);
}
.ra-pov-pb-mode--event.is-active {
  border-color: #7c3aed;
  background: linear-gradient(180deg, #f5f3ff 0%, #fff 72%);
  box-shadow: 0 0 0 1px #7c3aed, 0 12px 28px rgba(124, 58, 237, 0.16);
}
.ra-pov-pb-mode-ico {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.45rem;
  font-size: 1.55rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, #38bdf8, #0284c7);
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.32);
}
.ra-pov-pb-mode--event .ra-pov-pb-mode-ico {
  background: linear-gradient(165deg, #a78bfa, #7c3aed);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.32);
}
.ra-pov-pb-mode-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.ra-pov-pb-mode-desc {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
  max-width: 16.5rem;
}
.ra-pov-pb-mode-cta {
  margin-top: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.ra-pov-pb-mode.is-active .ra-pov-pb-mode-cta {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: #93c5fd;
}
.ra-pov-pb-mode--event.is-active .ra-pov-pb-mode-cta {
  color: #6d28d9;
  background: #ede9fe;
  border-color: #c4b5fd;
}
.ra-pov-pb-event-hint {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.45;
}
.ra-pov-pb-event-hint strong { color: #1d4ed8; }
.ra-pov-pb-saved {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.2rem;
}
.ra-pov-pb-saved-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.15rem;
}
.ra-pov-pb-saved-head-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}
.ra-pov-pb-saved-count {
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.42rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ra-pov-pb-saved-row {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.9rem 1rem 0.95rem 1.05rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 18px rgba(15, 23, 42, 0.05);
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.ra-pov-pb-saved-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #2563eb;
}
.ra-pov-pb-saved-row--green::before { background: #059669; }
.ra-pov-pb-saved-row--violet::before { background: #7c3aed; }
.ra-pov-pb-saved-row--amber::before { background: #d97706; }
.ra-pov-pb-saved-row--cyan::before { background: #0891b2; }
.ra-pov-pb-saved-row--rose::before { background: #e11d48; }
.ra-pov-pb-saved-row--orange::before { background: #ea580c; }
.ra-pov-pb-saved-row--teal::before { background: #0f766e; }
.ra-pov-pb-saved-row--indigo::before { background: #4f46e5; }
.ra-pov-pb-saved-row--pink::before { background: #db2777; }
.ra-pov-pb-saved-row--blue::before { background: #2563eb; }
.ra-pov-pb-saved-row.is-empty { background: #f8fafc; }
.ra-pov-pb-saved-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}
.ra-pov-pb-saved-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}
.ra-pov-pb-saved-ico {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem !important;
  margin-top: 0;
  flex-shrink: 0;
  color: #fff !important;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.16);
}
.ra-pov-pb-saved-copy {
  min-width: 0;
  flex: 1;
}
.ra-pov-pb-saved-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.ra-pov-pb-saved-copy strong {
  display: inline;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.ra-pov-pb-saved-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}
.ra-pov-pb-saved-kind {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}
.ra-pov-pb-saved-urlwrap {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.8rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  min-width: 0;
}
.ra-pov-pb-saved-urlwrap > .material-symbols-outlined {
  color: #0284c7;
  font-size: 1.05rem !important;
  margin-top: 0.08rem;
  flex-shrink: 0;
}
.ra-pov-pb-saved-url {
  display: -webkit-box;
  margin: 0;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #0369a1;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  word-break: break-all;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
}
.ra-pov-pb-saved-none {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #94a3b8;
}
.ra-pov-pb-saved-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.ra-pov-pb-icon-btn {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ra-pov-pb-icon-btn .material-symbols-outlined { font-size: 1.1rem; }
.ra-pov-pb-icon-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.ra-pov-pb-icon-btn--danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
@media (max-width: 640px) {
  .ra-pov-pb-saved-top {
    align-items: flex-start;
  }
}
.ra-pov-pb-global .ra-pov-pb-field { margin-bottom: 0.75rem; }
.ra-pov-pb-account-hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}
.ra-pov-pb-account-hint a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}
.ra-pov-pb-account-hint a:hover { text-decoration: underline; }
.ra-pov-pb-global-actions {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ra-pov-pb-mode-chips,
.ra-pov-ev-chip,
.ra-pov-pb-event-panel,
.ra-pov-pb-event-list,
.ra-pov-pb-event-row,
.ra-pov-pb-event-meta,
.ra-pov-pb-event-empty,
.ra-pov-pb-event-none { display: none !important; }
html.dark .ra-pov-pb-mode {
  background: #111827;
  border-color: #374151;
}
html.dark .ra-pov-pb-mode.is-active {
  background: #1e3a5f;
  border-color: #3b82f6;
}
html.dark .ra-pov-pb-mode-title { color: #f3f4f6; }
html.dark .ra-pov-pb-mode-desc,
html.dark .ra-pov-pb-help { color: #9ca3af; }
.ra-pub-offer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.ra-pub-offer-table thead { background: #f8fafc; }
.ra-pub-offer-table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
.ra-pub-offer-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  color: #1f2937;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.ra-pub-offer-table tbody tr:hover td { background: #f9fafb; }
.ra-pub-offer-table tbody tr:last-child td { border-bottom: none; }
.ra-pov-track-card { padding: 1.25rem; }
.ra-pov-track-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
}
.ra-pov-track-label .material-symbols-outlined {
  font-size: 1.125rem;
  color: #2563eb;
}
.ra-pub-offer-track-input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.65rem 0.875rem;
  font-size: 0.8125rem;
  background: #f9fafb;
  color: #374151;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ra-pub-offer-track-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.ra-pov-btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.ra-pov-btn-copy:hover { background: #1d4ed8; }
.ra-pov-btn-copy .material-symbols-outlined { font-size: 1rem; }
.ra-pov-btn-save-global {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border: none;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
  transition: filter 0.15s, transform 0.12s;
}
.ra-pov-btn-save-global:hover { filter: brightness(1.06); }
.ra-pov-btn-save-global:disabled { opacity: 0.65; cursor: wait; }
.ra-pov-btn-save-global .material-symbols-outlined { font-size: 1.1rem; }
.ra-pub-offer-btn-sm {
  padding: 0.35rem 0.65rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.ra-pub-offer-btn-sm--edit { background: #dbeafe; color: #1d4ed8; }
.ra-pub-offer-btn-sm--del { background: #fee2e2; color: #b91c1c; }
.ra-pub-offer-add-pb {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.95rem;
  border: none;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 55%, #4c1d95 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(30, 58, 138, 0.3);
  transition: filter 0.15s;
}
.ra-pub-offer-add-pb .material-symbols-outlined { font-size: 1rem; }
.ra-pub-offer-add-pb:hover { filter: brightness(1.06); color: #fff; }
.ra-pub-offer-msg {
  padding: 0.75rem 1rem;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid #bfdbfe;
}
.ra-pub-offer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.ra-pub-offer-modal-overlay.is-open { display: flex; }
.ra-pub-offer-modal {
  width: 100%;
  max-width: 42rem;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}
.ra-pov-pb-modal {
  max-width: 46rem;
  max-height: min(92vh, 52rem);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(15, 23, 42, 0.06), 0 28px 60px rgba(15, 23, 42, 0.28);
}
.ra-pov-pb-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 48%, #f5f3ff 100%);
  border-bottom: 1px solid #dbeafe;
  flex-shrink: 0;
}
.ra-pov-pb-modal-head-main {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.ra-pov-pb-modal-ico {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  color: #fff;
  font-size: 1.35rem !important;
  box-shadow: 0 8px 18px rgba(30, 58, 138, 0.35);
  flex-shrink: 0;
}
.ra-pov-pb-modal-head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.ra-pov-pb-modal-head p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}
.ra-pov-pb-close {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ra-pov-pb-close .material-symbols-outlined { font-size: 1.15rem; }
.ra-pov-pb-close:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.ra-pov-pb-modal-body {
  padding: 1.2rem 1.35rem 0.85rem;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}
.ra-pov-pb-field {
  margin-bottom: 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  box-sizing: border-box;
}
.ra-pov-pb-field label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}
.ra-pov-pb-field .ra-ev-ico {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.8rem !important;
}
.ra-pov-ev-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.ra-pov-ev-picker {
  position: relative;
}
.ra-pov-ev-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 0.85rem;
  border: 1.5px solid #94a3b8;
  border-radius: 0.7rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ra-pov-ev-trigger:hover:not(:disabled) {
  border-color: #2563eb;
}
.ra-pov-ev-picker.is-open .ra-pov-ev-trigger {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.ra-pov-ev-trigger:disabled,
.ra-pov-ev-picker.is-locked .ra-pov-ev-trigger {
  cursor: not-allowed;
  opacity: 0.85;
  background: #f8fafc;
}
.ra-pov-ev-trigger-body {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.ra-pov-ev-trigger-ico,
.ra-pov-ev-option-ico {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.48rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem !important;
  flex-shrink: 0;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}
.ra-pov-ev-tone--blue { background: linear-gradient(165deg, #60a5fa, #2563eb); }
.ra-pov-ev-tone--green { background: linear-gradient(165deg, #34d399, #059669); }
.ra-pov-ev-tone--violet { background: linear-gradient(165deg, #a78bfa, #7c3aed); }
.ra-pov-ev-tone--amber { background: linear-gradient(165deg, #fbbf24, #d97706); }
.ra-pov-ev-tone--cyan { background: linear-gradient(165deg, #22d3ee, #0891b2); }
.ra-pov-ev-tone--rose { background: linear-gradient(165deg, #fb7185, #e11d48); }
.ra-pov-ev-tone--orange { background: linear-gradient(165deg, #fb923c, #ea580c); }
.ra-pov-ev-tone--teal { background: linear-gradient(165deg, #2dd4bf, #0f766e); }
.ra-pov-ev-tone--indigo { background: linear-gradient(165deg, #818cf8, #4f46e5); }
.ra-pov-ev-tone--pink { background: linear-gradient(165deg, #f472b6, #db2777); }
.ra-pov-ev-tone--slate { background: linear-gradient(165deg, #94a3b8, #475569); }
.ra-pov-ev-option.is-active .ra-pov-ev-option-ico {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(37, 99, 235, 0.45), 0 4px 10px rgba(15, 23, 42, 0.18);
}
.ra-pov-ev-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-pov-ev-trigger-text.is-placeholder {
  color: #64748b;
  font-weight: 600;
}
.ra-pov-ev-chevron {
  color: #64748b;
  font-size: 1.25rem !important;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.ra-pov-ev-picker.is-open .ra-pov-ev-chevron { transform: rotate(180deg); }
.ra-pov-ev-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 14rem;
  overflow: auto;
  padding: 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}
.ra-pov-ev-menu[hidden] { display: none !important; }
.ra-pov-ev-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem;
  border: none;
  border-radius: 0.6rem;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.ra-pov-ev-option:hover { background: #eff6ff; }
.ra-pov-ev-option.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}
.ra-pov-ev-option-ico {
  width: 1.7rem;
  height: 1.7rem;
}
.ra-pov-ev-option-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-pov-pb-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 8rem;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid #94a3b8;
  border-radius: 0.7rem;
  font: inherit;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.5;
  color: #0f172a;
  background: #fff;
  resize: vertical;
}
.ra-pov-pb-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.ra-pov-pb-example {
  margin: 0 0 0.9rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #86efac;
}
.ra-pov-pb-example-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.ra-pov-pb-example-head .material-symbols-outlined {
  font-size: 1.05rem;
  color: #059669;
}
.ra-pov-pb-example-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #047857;
}
.ra-pov-pb-example code {
  display: block;
  font-size: 0.78rem;
  color: #0f766e;
  word-break: break-all;
  line-height: 1.5;
}
.ra-pov-pb-tokens-panel {
  margin-bottom: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
.ra-pov-pb-tokens-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.ra-pov-pb-tokens-head .material-symbols-outlined {
  font-size: 1.05rem;
  color: #4f46e5;
}
.ra-pov-pb-tokens-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4338ca;
}
.ra-pov-pb-modal-foot {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 1rem 1.35rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}
.ra-pov-pb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.7rem;
  padding: 0.72rem 1.15rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.ra-pov-pb-btn .material-symbols-outlined { font-size: 1.05rem; }
.ra-pov-pb-btn--ghost {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.ra-pov-pb-btn--ghost:hover { background: #f1f5f9; }
.ra-pov-pb-btn--primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 55%, #4c1d95 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.4);
}
.ra-pov-pb-btn--primary:hover { filter: brightness(1.06); }
.ra-pub-offer-tokens { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.ra-pub-offer-token {
  padding: 0.3rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background: #f9fafb;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ra-pub-offer-token:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}
.ra-pov-payout {
  font-weight: 700;
  color: #059669;
}
.ra-pov-code-cell {
  max-width: 14rem;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: #4b5563;
}
.ra-pov-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
@media (max-width: 640px) {
  .ra-pov-detail {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.65rem 1rem;
  }
}
html.dark body.ap-publisher .ra-pub-offer-back {
  background: #111827;
  border-color: #374151;
  color: #d1d5db;
}
html.dark body.ap-publisher .ra-pub-offer-back:hover {
  background: #1e3a5f;
  border-color: #1d4ed8;
  color: #93c5fd;
}
html.dark body.ap-publisher .ra-pov-hero-in-card {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  border-color: #374151;
}
html.dark body.ap-publisher .ra-pov-hero-title { color: #f3f4f6; }
html.dark body.ap-publisher .ra-pov-inset-head { background: #1f2937; border-color: #374151; }
html.dark body.ap-publisher .ra-pov-inset-block { border-color: #374151; }
html.dark body.ap-publisher .ra-pub-offer-card { background: #111827; border-color: #374151; }
html.dark body.ap-publisher .ra-pub-offer-card-head { color: #f3f4f6; border-color: #374151; background: #1f2937; }
html.dark body.ap-publisher .ra-pov-pb-card-head {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #312e81 100%);
  border-color: #334155;
}
html.dark body.ap-publisher .ra-pov-pb-card-head h3 { color: #f8fafc; }
html.dark body.ap-publisher .ra-pov-pb-card-head p { color: #94a3b8; }
html.dark body.ap-publisher .ra-pov-pb-mode--event.is-active {
  background: #1e1b4b;
  border-color: #7c3aed;
}
html.dark body.ap-publisher .ra-pov-pb-mode-cta {
  background: #1f2937;
  border-color: #374151;
  color: #94a3b8;
}
html.dark body.ap-publisher .ra-pov-pb-mode.is-active .ra-pov-pb-mode-cta {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #93c5fd;
}
html.dark body.ap-publisher .ra-pov-pb-mode--event.is-active .ra-pov-pb-mode-cta {
  background: #4c1d95;
  border-color: #a78bfa;
  color: #ddd6fe;
}
html.dark body.ap-publisher .ra-pov-pb-event-hint {
  background: #0f172a;
  border-color: #374151;
  color: #94a3b8;
}
html.dark body.ap-publisher .ra-pov-pb-event-hint strong { color: #93c5fd; }
html.dark body.ap-publisher .ra-pov-pb-saved-head-label { color: #94a3b8; }
html.dark body.ap-publisher .ra-pov-pb-saved-count {
  background: #312e81;
  color: #c7d2fe;
}
html.dark body.ap-publisher .ra-pov-pb-saved-row {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border-color: #374151;
  box-shadow: none;
}
html.dark body.ap-publisher .ra-pov-pb-saved-row.is-empty { background: #0f172a; }
html.dark body.ap-publisher .ra-pov-pb-saved-copy strong { color: #f8fafc; }
html.dark body.ap-publisher .ra-pov-pb-saved-kind { color: #94a3b8; }
html.dark body.ap-publisher .ra-pov-pb-saved-badge {
  color: #86efac;
  background: #14532d;
  border-color: #166534;
}
html.dark body.ap-publisher .ra-pov-pb-saved-urlwrap {
  background: #0c4a6e;
  border-color: #075985;
}
html.dark body.ap-publisher .ra-pov-pb-saved-urlwrap > .material-symbols-outlined { color: #7dd3fc; }
html.dark body.ap-publisher .ra-pov-pb-saved-url {
  color: #7dd3fc;
  background: transparent;
}
html.dark body.ap-publisher .ra-pov-pb-saved-none { color: #64748b; }
html.dark body.ap-publisher .ra-pov-pb-icon-btn {
  background: #1f2937;
  border-color: #374151;
  color: #cbd5e1;
}
html.dark body.ap-publisher .ra-pov-pb-icon-btn:hover {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #93c5fd;
}
html.dark body.ap-publisher .ra-pov-pb-icon-btn--danger:hover {
  background: #7f1d1d;
  border-color: #f87171;
  color: #fecaca;
}
html.dark body.ap-publisher .ra-pov-pb-account-hint { color: #94a3b8; }
html.dark body.ap-publisher .ra-pov-pb-account-hint a { color: #93c5fd; }
html.dark body.ap-publisher .ra-pov-detail { border-color: #374151; }
html.dark body.ap-publisher .ra-pov-detail dd { color: #e5e7eb; }
html.dark body.ap-publisher .ra-pov-desc { color: #d1d5db; }
html.dark body.ap-publisher .ra-pub-offer-table thead { background: #1f2937; }
html.dark body.ap-publisher .ra-pub-offer-table th { color: #94a3b8; border-color: #374151; }
html.dark body.ap-publisher .ra-pub-offer-table td { color: #e5e7eb; border-color: #374151; }
html.dark body.ap-publisher .ra-pub-offer-table tbody tr:hover td { background: #1f2937; }
html.dark body.ap-publisher .ra-pub-offer-track-input { background: #1f2937; border-color: #4b5563; color: #e5e7eb; }
html.dark body.ap-publisher .ra-pub-offer-modal { background: #111827; color: #f3f4f6; border-color: #374151; }
html.dark body.ap-publisher .ra-pov-pb-modal { border-color: #1e3a8a; }
html.dark body.ap-publisher .ra-pov-pb-modal-head {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #312e81 100%);
  border-color: #334155;
}
html.dark body.ap-publisher .ra-pov-pb-modal-head h3 { color: #f8fafc; }
html.dark body.ap-publisher .ra-pov-pb-modal-head p,
html.dark body.ap-publisher .ra-pov-pb-field label { color: #94a3b8; }
html.dark body.ap-publisher .ra-pov-pb-modal-body { background: #111827; }
html.dark body.ap-publisher .ra-pov-pb-field {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-publisher .ra-pov-pb-close {
  background: #1f2937;
  border-color: #374151;
  color: #94a3b8;
}
html.dark body.ap-publisher .ra-pov-pb-close:hover {
  background: #450a0a;
  border-color: #7f1d1d;
  color: #fca5a5;
}
html.dark body.ap-publisher .ra-pov-ev-trigger {
  background: #0b1220;
  border-color: #4b5563;
  color: #f3f4f6;
}
html.dark body.ap-publisher .ra-pov-ev-trigger:disabled,
html.dark body.ap-publisher .ra-pov-ev-picker.is-locked .ra-pov-ev-trigger {
  background: #1f2937;
}
html.dark body.ap-publisher .ra-pov-ev-trigger-text.is-placeholder { color: #94a3b8; }
html.dark body.ap-publisher .ra-pov-ev-menu {
  background: #111827;
  border-color: #374151;
}
html.dark body.ap-publisher .ra-pov-ev-option { color: #e5e7eb; }
html.dark body.ap-publisher .ra-pov-ev-option:hover { background: #1e293b; }
html.dark body.ap-publisher .ra-pov-ev-option.is-active {
  background: #1e3a8a;
  color: #93c5fd;
}
html.dark body.ap-publisher .ra-pov-ev-option.is-active .ra-pov-ev-option-ico {
  box-shadow: 0 0 0 2px #1e3a8a, 0 0 0 4px rgba(147, 197, 253, 0.45), 0 4px 10px rgba(15, 23, 42, 0.35);
}
html.dark body.ap-publisher .ra-pov-pb-textarea {
  background: #0b1220;
  border-color: #4b5563;
  color: #e5e7eb;
}
html.dark body.ap-publisher .ra-pov-pb-example {
  background: #052e2b;
  border-color: #115e59;
}
html.dark body.ap-publisher .ra-pov-pb-example-head .material-symbols-outlined,
html.dark body.ap-publisher .ra-pov-pb-example-label,
html.dark body.ap-publisher .ra-pov-pb-example code { color: #5eead4; }
html.dark body.ap-publisher .ra-pov-pb-tokens-panel {
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
  border-color: #4338ca;
}
html.dark body.ap-publisher .ra-pov-pb-tokens-head .material-symbols-outlined,
html.dark body.ap-publisher .ra-pov-pb-tokens-label { color: #a5b4fc; }
html.dark body.ap-publisher .ra-pov-pb-modal-foot {
  background: #0f172a;
  border-color: #1e293b;
}
html.dark body.ap-publisher .ra-pov-pb-btn--ghost {
  background: #111827;
  border-color: #374151;
  color: #e2e8f0;
}
html.dark body.ap-publisher .ra-pub-offer-token { background: #1f2937; border-color: #4b5563; color: #e5e7eb; }

/* Publisher profile */
.ra-pub-profile-page { display: flex; flex-direction: column; gap: 1rem; }
.ra-pub-profile-page .ra-offers-react-title-ico {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  font-size: 1.25rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, #059669, #064e3b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(6, 78, 59, 0.4);
}
.ra-pub-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}
.ra-pub-profile-grid[hidden],
.ra-pub-profile-save-main[hidden],
.ra-pub-profile-save[hidden] {
  display: none !important;
}
@media (min-width: 1100px) {
  .ra-pub-profile-grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr); }
}
@media (min-width: 1400px) {
  .ra-pub-profile-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
.ra-pub-profile-main {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.06);
}
.ra-pub-profile-banner {
  position: relative;
  height: 5.25rem;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #7c3aed 100%);
}
.ra-pub-profile-pw-btn {
  position: absolute;
  right: 0.9rem;
  top: 0.7rem;
  padding: 0.4rem 1.15rem;
  border-radius: 9999px;
  border: 0;
  background: #fff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgb(15 23 42 / 0.12);
}
.ra-pub-profile-pw-btn:hover { background: #eff6ff; }
.ra-pub-profile-avatar {
  position: absolute;
  left: 1.15rem;
  top: 2.85rem;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: linear-gradient(165deg, #60a5fa, #2563eb);
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgb(37 99 235 / 0.28);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ra-pub-profile-identity {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.55rem 1.15rem 1rem 6rem;
  min-height: 3.35rem;
  border-bottom: 1px solid #eef2f7;
}
.ra-pub-profile-identity-text { min-width: 0; }
.ra-pub-profile-identity-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-pub-profile-identity-email {
  font-size: 0.8rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-pub-profile-rows {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.15rem 1.2rem;
}
.ra-pub-profile-row {
  --row-from: #94a3b8;
  --row-to: #64748b;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 0.72rem 0.9rem;
  border-radius: 0.9rem;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 0.875rem;
}
.ra-pub-profile-row:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.ra-pub-profile-row-lab {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 46%;
  color: #475569;
  font-weight: 600;
}
.ra-pub-profile-row-name {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: #64748b;
  white-space: nowrap;
}
.ra-pub-profile-row-val {
  text-align: right;
  color: #0f172a;
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-word;
}
.ra-pub-profile-field-input {
  width: min(100%, 16rem);
  padding: 0.45rem 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  text-align: right;
}
.ra-pub-profile-field-input.is-editing {
  background: #fff;
  border-color: #93c5fd;
}
.ra-pub-profile-save-main {
  margin: 0 1rem 1rem;
  width: calc(100% - 2rem);
}
.ra-pub-profile-row-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-size: 1.05rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, var(--row-from), var(--row-to));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--row-to) 32%, transparent);
}
.ra-pub-profile-row--id { --row-from: #4f46e5; --row-to: #312e81; }
.ra-pub-profile-row--name { --row-from: #1d4ed8; --row-to: #1e3a8a; }
.ra-pub-profile-row--email { --row-from: #0284c7; --row-to: #0c4a6e; }
.ra-pub-profile-row--mobile { --row-from: #ea580c; --row-to: #9a3412; }
.ra-pub-profile-row--company { --row-from: #7c3aed; --row-to: #4c1d95; }
.ra-pub-profile-row--telegram { --row-from: #0ea5e9; --row-to: #0369a1; }
.ra-pub-profile-row--balance {
  --row-from: #059669;
  --row-to: #064e3b;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}
.ra-pub-profile-row--balance .ra-pub-profile-row-val {
  color: #047857;
  font-size: 1.05rem;
  font-weight: 800;
}
.ra-pub-profile-row--balance:hover {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}
.ra-pub-profile-side {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.ra-pub-profile-pay-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.05rem 1.05rem 1.1rem;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.06);
  position: relative;
  overflow: hidden;
}
.ra-pub-profile-pay-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--pay-from, #38bdf8), var(--pay-to, #2563eb));
}
.ra-pub-profile-pay-card--upi { --pay-from: #38bdf8; --pay-to: #2563eb; }
.ra-pub-profile-pay-card--bank { --pay-from: #34d399; --pay-to: #059669; }
.ra-pub-profile-pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding-left: 0.15rem;
}
.ra-pub-profile-pay-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
}
.ra-pub-profile-pay-head .ra-pub-profile-edit-toggle {
  flex-shrink: 0;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
}
.ra-pub-profile-pay-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-size: 1.05rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, var(--pay-from), var(--pay-to));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--pay-to) 35%, transparent);
}
.ra-pub-profile-pay-rows {
  display: grid;
  gap: 0.5rem;
}
.ra-pub-profile-pay-row {
  --row-from: #94a3b8;
  --row-to: #64748b;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.68rem 0.8rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 0.875rem;
  margin: 0;
}
.ra-pub-profile-pay-row:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.ra-pub-profile-pay-row .ra-pub-profile-row-lab {
  flex: 0 0 auto;
  max-width: none;
  gap: 0.5rem;
}
.ra-pub-profile-pay-row .ra-pub-profile-row-name {
  white-space: nowrap;
}
.ra-pub-profile-pay-row--uname { --row-from: #1d4ed8; --row-to: #1e3a8a; }
.ra-pub-profile-pay-row--uid { --row-from: #0284c7; --row-to: #0c4a6e; }
.ra-pub-profile-pay-row--holder { --row-from: #059669; --row-to: #064e3b; }
.ra-pub-profile-pay-row--acct { --row-from: #0d9488; --row-to: #115e59; }
.ra-pub-profile-pay-row--ifsc { --row-from: #d97706; --row-to: #92400e; }
.ra-pub-profile-pay-row--bname { --row-from: #16a34a; --row-to: #14532d; }
.ra-pub-profile-pay-row--branch { --row-from: #64748b; --row-to: #334155; }
.ra-pub-profile-pay-row .ra-pub-profile-row-ico {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 1rem !important;
}
.ra-pub-profile-pay-input {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  border: 1px solid transparent;
  background: transparent;
  text-align: right;
  font-size: 0.84rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.5rem;
  color: #0f172a;
  font-weight: 600;
}
.ra-pub-profile-pay-input::placeholder { color: #94a3b8; font-weight: 500; }
.ra-pub-profile-pay-input.is-editing {
  border-color: #93c5fd;
  background: #fff;
}
.ra-pub-profile-edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ra-pub-profile-edit-toggle .material-symbols-outlined {
  font-size: 1rem !important;
}
.ra-pub-profile-edit-toggle:hover { background: #dbeafe; }
.ra-pub-profile-edit-toggle--main {
  background: linear-gradient(165deg, #1d4ed8, #1e3a8a);
  border: 0;
  color: #fff;
  box-shadow: 0 8px 16px rgba(30, 58, 138, 0.4);
}
.ra-pub-profile-edit-toggle--main:hover {
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  filter: brightness(1.06);
}
.ra-pub-profile-save { width: 100%; margin-top: 0.5rem; }
.ra-pub-api-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .ra-pub-api-grid { grid-template-columns: 1fr 1fr; }
}
.ra-pub-api-box {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background: #f3f4f6;
  font-size: 0.875rem;
  color: #374151;
}

/* Publisher API — panel tile look */
.ra-pub-api-page { display: flex; flex-direction: column; gap: 1rem; }
.ra-pub-api-page .ra-offers-react-title-ico {
  background: linear-gradient(165deg, #0284c7, #0c4a6e);
  box-shadow: 0 6px 14px rgba(12, 74, 110, 0.4);
}
.ra-pub-api-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ra-pub-api-chips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .ra-pub-api-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ra-pub-api-chip {
  --chip-from: #64748b;
  --chip-to: #334155;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.05);
  min-width: 0;
}
.ra-pub-api-chip--id { --chip-from: #4f46e5; --chip-to: #312e81; }
.ra-pub-api-chip--email { --chip-from: #0284c7; --chip-to: #0c4a6e; }
.ra-pub-api-chip--company { --chip-from: #7c3aed; --chip-to: #4c1d95; }
.ra-pub-api-chip-ico {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  font-size: 1.2rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, var(--chip-from), var(--chip-to));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--chip-to) 35%, transparent);
}
.ra-pub-api-chip-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ra-pub-api-chip-lab {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.ra-pub-api-chip-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-pub-api-card {
  --pay-from: #38bdf8;
  --pay-to: #2563eb;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.06);
  position: relative;
  overflow: hidden;
}
.ra-pub-api-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--pay-from), var(--pay-to));
}
.ra-pub-api-card--token { --pay-from: #f59e0b; --pay-to: #b45309; }
.ra-pub-api-card--endpoints { --pay-from: #34d399; --pay-to: #059669; }
.ra-pub-api-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  padding-left: 0.2rem;
}
.ra-pub-api-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.ra-pub-api-card-head p {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}
.ra-pub-api-card-ico {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  font-size: 1.2rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, #d97706, #92400e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(146, 64, 14, 0.35);
}
.ra-pub-api-card-ico--ep {
  background: linear-gradient(165deg, #059669, #064e3b);
  box-shadow: 0 4px 10px rgba(6, 78, 59, 0.35);
}
.ra-pub-api-token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.ra-pub-api-token {
  flex: 1 1 14rem;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
}
.ra-pub-api-empty {
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
}
.ra-pub-api-endpoint-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
}
.ra-pub-api-endpoint {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  min-width: 0;
}
.ra-pub-api-endpoint:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.ra-pub-api-method {
  flex-shrink: 0;
  min-width: 3.1rem;
  text-align: center;
  padding: 0.28rem 0.45rem;
  border-radius: 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}
.ra-pub-api-method--get { background: linear-gradient(165deg, #2563eb, #1e3a8a); }
.ra-pub-api-method--put { background: linear-gradient(165deg, #d97706, #92400e); }
.ra-pub-api-method--post { background: linear-gradient(165deg, #059669, #064e3b); }
.ra-pub-api-path {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-pub-api-copy-mini {
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.2rem;
  display: inline-flex;
  border-radius: 0.4rem;
}
.ra-pub-api-copy-mini:hover { color: #2563eb; background: #eff6ff; }
.ra-pub-api-copy-mini .material-symbols-outlined { font-size: 1.05rem !important; }
.ra-pub-api-sample-btn { margin-top: 0.15rem; }

html.dark body.ap-publisher .ra-pub-api-chip,
html.dark body.ap-publisher .ra-pub-api-card {
  background: #111827;
  border-color: #374151;
}
html.dark body.ap-publisher .ra-pub-api-chip-val,
html.dark body.ap-publisher .ra-pub-api-card-head h3,
html.dark body.ap-publisher .ra-pub-api-token { color: #f8fafc; }
html.dark body.ap-publisher .ra-pub-api-chip-lab,
html.dark body.ap-publisher .ra-pub-api-card-head p { color: #94a3b8; }
html.dark body.ap-publisher .ra-pub-api-token-row,
html.dark body.ap-publisher .ra-pub-api-endpoint {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-publisher .ra-pub-api-path { color: #cbd5e1; }
html.dark body.ap-publisher .ra-pub-api-endpoint:hover { background: #273549; }
.ra-pub-withdraw-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .ra-pub-withdraw-form { grid-template-columns: 1fr 1fr; }
}
.ra-pub-withdraw-full { grid-column: 1 / -1; }
html.dark body.ap-publisher .ra-pub-profile-main,
html.dark body.ap-publisher .ra-pub-profile-pay-card { background: #111827; border-color: #374151; }
html.dark body.ap-publisher .ra-pub-profile-identity { border-color: #374151; }
html.dark body.ap-publisher .ra-pub-profile-identity-name { color: #f8fafc; }
html.dark body.ap-publisher .ra-pub-profile-identity-email { color: #94a3b8; }
html.dark body.ap-publisher .ra-pub-profile-row {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-publisher .ra-pub-profile-row:hover { background: #273549; }
html.dark body.ap-publisher .ra-pub-profile-row-name { color: #94a3b8; }
html.dark body.ap-publisher .ra-pub-profile-row-val { color: #e5e7eb; }
html.dark body.ap-publisher .ra-pub-profile-row--balance {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.45), rgba(5, 150, 105, 0.28));
  border-color: #065f46;
}
html.dark body.ap-publisher .ra-pub-profile-row--balance .ra-pub-profile-row-val { color: #6ee7b7; }
html.dark body.ap-publisher .ra-pub-profile-field-input.is-editing {
  background: #111827;
  border-color: #4b5563;
  color: #f3f4f6;
}
html.dark body.ap-publisher .ra-pub-profile-avatar { border-color: #111827; }
html.dark body.ap-publisher .ra-pub-profile-edit-toggle {
  background: rgba(37, 99, 235, 0.18);
  border-color: #1e3a8a;
  color: #93c5fd;
}
html.dark body.ap-publisher .ra-pub-profile-edit-toggle--main {
  background: linear-gradient(165deg, #3b82f6, #1d4ed8);
  color: #fff;
  border: 0;
}
html.dark body.ap-publisher .ra-pub-profile-pay-row {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-publisher .ra-pub-profile-pay-row:hover { background: #273549; }
html.dark body.ap-publisher .ra-pub-profile-pay-input { color: #e5e7eb; }
html.dark body.ap-publisher .ra-pub-profile-pay-input::placeholder { color: #64748b; }
html.dark body.ap-publisher .ra-pub-api-box { background: #1f2937; color: #e5e7eb; }
html.dark body.ap-publisher .ra-pub-profile-pay-input.is-editing { background: #1f2937; border-color: #4b5563; color: #f3f4f6; }

/* ========== Mobile responsive (entire panel) ========== */
.ap-mobile-menu-btn {
  display: none;
}
.ap-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(15, 23, 42, 0.45);
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
body.ap-nav-open .ap-nav-backdrop {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.ap-mobile-sidebar-head {
  display: none;
}
.ra-topbar-left,
.pub-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}
.pub-topbar-left {
  gap: 0.35rem;
}

@media (max-width: 1023px) {
  .ap-mobile-menu-btn {
    display: inline-flex;
    flex-shrink: 0;
    width: 2.025rem;
    height: 2.025rem;
  }
  .ap-mobile-menu-btn .material-symbols-outlined {
    font-size: 1.425rem;
    width: 1em;
    height: 1em;
  }

  /* —— Admin + Publisher shell (same ra-* layout) —— */
  body.ap-admin .ra-sidebar,
  body.ap-publisher .ra-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(18rem, 88vw);
    z-index: 60;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.25s ease;
    border-right: 1px solid #e5e7eb;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    pointer-events: none;
  }
  body.ap-admin.ap-nav-open .ra-sidebar,
  body.ap-publisher.ap-nav-open .ra-sidebar {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }
  body.ap-admin .ra-main,
  body.ap-admin .ra-shell.ra-collapsed .ra-main,
  body.ap-publisher .ra-main,
  body.ap-publisher .ra-shell.ra-collapsed .ra-main {
    margin-left: 0 !important;
  }
  body.ap-admin #ra-sidebar-toggle,
  body.ap-publisher #ra-sidebar-toggle {
    display: none;
  }
  body.ap-admin .ra-topbar,
  body.ap-publisher .ra-topbar {
    height: auto;
    min-height: 3.5rem;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  body.ap-admin .ra-welcome,
  body.ap-publisher .ra-welcome {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.ap-admin .ra-profile-name,
  body.ap-publisher .ra-profile-name {
    display: none;
  }
  body.ap-admin .ra-content,
  body.ap-publisher .ra-content {
    padding: 1rem;
  }
  body.ap-admin .ra-shell.ra-collapsed .ra-sidebar,
  body.ap-publisher .ra-shell.ra-collapsed .ra-sidebar {
    width: min(18rem, 88vw);
  }
  body.ap-admin .ra-shell.ra-collapsed .ra-brand,
  body.ap-publisher .ra-shell.ra-collapsed .ra-brand {
    display: block;
  }

  /* —— Older publisher shell (if any leftover pages) —— */
  body.ap-publisher .pub-sidebar {
    position: fixed;
    top: 3.5rem;
    left: 0;
    bottom: 0;
    width: min(18rem, 88vw);
    z-index: 60;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.25s ease;
    border-right: 1px solid #e5e7eb;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    pointer-events: none;
  }
  body.ap-publisher.ap-nav-open .pub-sidebar {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }
  .ap-mobile-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.25rem 0.65rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
  }
  .ap-mobile-sidebar-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
  }
  body.ap-publisher .pub-main {
    margin-left: 0;
  }
  body.ap-publisher .pub-content {
    padding: 1rem;
  }
  body.ap-publisher .panel-page-head {
    padding: 0.75rem 1rem 0.5rem;
  }

  /* —— Dashboard (mobile/tablet only; desktop uses base styles above) —— */
  body.ap-admin {
    --ra-chart-mobile-h: 425px;
  }
  body.ap-publisher {
    --ra-chart-mobile-h: 380px;
  }
  body.ap-publisher .ra-dash,
  body.ap-admin .ra-dash {
    min-height: 0;
    gap: 0.75rem;
  }
  .ra-dash-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.ap-publisher .ra-chart-card,
  body.ap-admin .ra-chart-card {
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    max-height: none;
  }
  body.ap-publisher .ra-chart-canvas,
  body.ap-admin .ra-chart-canvas {
    flex: none;
    height: var(--ra-chart-mobile-h);
    min-height: var(--ra-chart-mobile-h);
    max-height: var(--ra-chart-mobile-h);
    padding: 0.25rem 0.5rem 0.15rem;
    position: relative;
  }
  body.ap-publisher .ra-chart-canvas canvas,
  body.ap-admin .ra-chart-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
  }
  body.ap-publisher .ra-bottom-stat,
  body.ap-admin .ra-bottom-stat {
    padding: 0.95rem 0.85rem;
    min-height: 7.5rem;
  }
  .ra-dash-bottom {
    grid-template-columns: 1fr;
  }

  /* —— Page headers & toolbars —— */
  .ra-page-strip {
    padding: 1rem;
    margin-bottom: 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .ra-page-strip-actions,
  .ra-offers-toolbar,
  .ra-reports-toolbar,
  .ra-postback-grid {
    width: 100%;
  }
  .ra-page-strip-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .ra-page-strip-actions .ap-btn,
  .ra-page-strip-actions button {
    width: 100%;
    justify-content: center;
  }

  /* —— Tables (horizontal scroll) —— */
  .ap-table-wrap,
  .ra-table-wrap,
  .ra-offer-events-table-wrap,
  .ra-offers-table-wrap,
  .ra-reports-table-wrap,
  .ra-advertisers-table-wrap,
  .ra-requests-table-wrap,
  .ra-pub-offer-table-wrap,
  body.ap-admin .ra-content,
  body.ap-publisher .pub-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ap-table,
  .ra-offers-table,
  .ra-offer-events-table,
  .ra-reports-table,
  .ra-advertisers-table {
    min-width: 36rem;
  }

  /* —— Forms & modals —— */
  .ap-form-row input,
  .ap-form-row select,
  .ap-form-row textarea,
  body.ap-admin .ra-content .ap-form-row input,
  body.ap-admin .ra-content .ap-form-row select,
  body.ap-admin .ra-content .ap-form-row textarea,
  body.ap-publisher .pub-content .ap-form-row input,
  body.ap-publisher .pub-content .ap-form-row select,
  body.ap-publisher .pub-content .ap-form-row textarea {
    max-width: 100%;
  }
  .ap-form-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .ap-form-inline > * {
    width: 100%;
    max-width: 100%;
  }
  .ap-modal,
  body.ap-admin .ra-content .ap-modal,
  body.ap-publisher .pub-content .ap-modal,
  .ra-advertisers-modal,
  .ra-offer-modal,
  .ra-pub-offer-modal {
    width: min(100%, 28rem);
    max-width: calc(100vw - 1.5rem);
    margin: 0.75rem;
    padding: 1rem;
  }
  .ra-pov-pb-modal {
    width: min(100%, 46rem);
    max-width: calc(100vw - 1rem);
    padding: 0;
  }
  .ra-pov-pb-modal {
    width: min(100%, 46rem);
    max-width: calc(100vw - 1rem);
    padding: 0;
  }
  .ap-modal-overlay,
  body.ap-admin .ra-content .ap-modal-overlay,
  body.ap-publisher .pub-content .ap-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  /* —— Grids —— */
  .ap-grid-6,
  .ap-grid-3,
  .ap-substats,
  .ra-postback-grid,
  .ra-pub-profile-grid,
  .ra-pub-api-grid,
  .ra-pub-withdraw-form,
  .ra-offer-form-grid,
  .ra-offer-view-grid,
  #modal-offer .ra-offer-form-grid {
    grid-template-columns: 1fr !important;
  }
  .ra-postback-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .ra-pub-profile-identity {
    padding-left: 1.15rem;
    padding-top: 3.35rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ra-pub-profile-row,
  .ra-pub-profile-pay-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .ra-pub-profile-row-val,
  .ra-pub-profile-pay-input {
    text-align: left;
    padding-left: 2.7rem;
    width: 100%;
  }
  .ra-pub-profile-field-input {
    width: 100%;
    text-align: left;
  }
  .ra-pub-profile-pay-head { flex-wrap: wrap; }

  /* —— Postback / misc —— */
  .ra-postback-textarea {
    font-size: 0.75rem;
  }
  .ra-offer-view-cell--wide {
    overflow-x: auto;
  }
  .ra-pov-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .ra-pov-actions .ap-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body.ap-admin .ra-content,
  body.ap-publisher .pub-content {
    padding: 0.75rem;
  }
  .ra-dash-cards {
    grid-template-columns: 1fr;
  }
  .ra-bottom-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.15rem;
  }
  .ra-bottom-num {
    font-size: 1rem;
  }
  .pub-logo {
    font-size: 1.25rem;
  }
  .auth-card {
    padding: 1.5rem 1.25rem;
  }
  .ra-page-strip-title {
    font-size: 1.125rem;
  }
}

html.dark body.ap-nav-open .ap-nav-backdrop {
  background: rgba(0, 0, 0, 0.6);
}
html.dark body.ap-admin.ap-nav-open .ra-sidebar,
html.dark body.ap-publisher.ap-nav-open .ra-sidebar,
html.dark body.ap-publisher.ap-nav-open .pub-sidebar {
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
}
html.dark .ap-mobile-sidebar-head {
  border-bottom-color: #374151;
}
html.dark .ap-mobile-sidebar-title {
  color: #f3f4f6;
}

/* —— Create Campaign wizard (publisher) —— */
.cc-wizard-page {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cc-wizard-head {
  padding: 1.25rem 1.5rem;
}
.cc-wizard-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}
.cc-panel {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
}
.cc-panel.is-active {
  display: flex;
}
.cc-step-card {
  padding: 1.25rem 1.35rem;
}
.cc-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1rem 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.cc-stepper-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.cc-stepper-item:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin: 0 0.75rem;
}
.cc-stepper-item.is-done:not(:last-child)::after,
.cc-stepper-item.is-active:not(:last-child)::after {
  background: #3b82f6;
}
.cc-stepper-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  background: #f3f4f6;
  color: #9ca3af;
  border: 2px solid #e5e7eb;
  flex-shrink: 0;
}
.cc-stepper-item.is-active .cc-stepper-dot {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.cc-stepper-item.is-done .cc-stepper-dot {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
}
.cc-stepper-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #9ca3af;
  white-space: nowrap;
}
.cc-stepper-item.is-active .cc-stepper-label,
.cc-stepper-item.is-done .cc-stepper-label {
  color: #1f2937;
}
.cc-panel {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
}
.cc-panel.is-active {
  display: flex;
}
.cc-step-card {
  padding: 1.25rem 1.35rem;
}
.cc-section-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.35rem 1.5rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.cc-section-card .cc-section-title {
  margin-bottom: 1.15rem;
  font-size: 1.05rem;
}
.cc-form-input {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
}
.cc-form-input:focus {
  outline: 2px solid #93c5fd;
  border-color: #3b82f6;
}
.cc-form-input:disabled,
.cc-form-input[readonly] {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}
textarea.cc-form-input {
  min-height: 6.5rem;
  resize: vertical;
}
select.cc-form-input {
  appearance: auto;
}
.cc-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
}
.cc-section-title::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #3b82f6;
  flex-shrink: 0;
}
.cc-field {
  margin-bottom: 1.1rem;
}
.cc-field:last-child {
  margin-bottom: 0;
}
.cc-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
.cc-field input,
.cc-field select,
.cc-field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: #fff;
  color: #111827;
}
.cc-field .cc-form-input {
  padding: 0.7rem 0.85rem;
}
.cc-field textarea {
  min-height: 5.5rem;
  resize: vertical;
}
.cc-field input:focus,
.cc-field select:focus,
.cc-field textarea:focus {
  outline: 2px solid #93c5fd;
  border-color: #3b82f6;
}
.cc-field input[readonly],
.cc-field select:disabled {
  background: #f9fafb;
  color: #6b7280;
}
.cc-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
}
.cc-theme-card {
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.85rem;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cc-theme-card:hover {
  border-color: #93c5fd;
}
.cc-theme-card.is-selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.cc-theme-preview {
  height: 4.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.cc-theme-preview--glass {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.cc-theme-preview--classic {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}
.cc-theme-preview--gradient {
  background: linear-gradient(135deg, #312e81 0%, #7c3aed 100%);
}
.cc-theme-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f2937;
}
.cc-theme-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.15rem;
}
.cc-payout-block {
  padding: 0;
  margin-bottom: 1.35rem;
  background: transparent;
  border: none;
  border-radius: 0;
}
.cc-payout-block:last-child {
  margin-bottom: 0;
}
.cc-payout-block + .cc-payout-block {
  padding-top: 1.35rem;
  border-top: 1px solid #e5e7eb;
}
.cc-payout-goal {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.85rem;
}
.cc-payout-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0 auto 1.25rem;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.65;
  text-align: center;
}
.cc-payout-summary strong {
  color: #111827;
  font-weight: 600;
}
.cc-payout-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.cc-payout-field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
.cc-payout-input {
  border-radius: 9999px;
  padding: 0.78rem 1.15rem;
}
.cc-wizard-actions--tail {
  border-top: 0;
  padding-top: 0.35rem;
  margin-top: 0.25rem;
}
.cc-wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}
.cc-wizard-actions .ap-btn {
  min-width: 7rem;
}
.cc-btn-create {
  width: 100%;
  margin-top: 1.35rem;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.5rem;
}
.cc-result-box {
  margin: 0;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}
.cc-success-overlay.ap-modal-overlay {
  z-index: 1200;
}
.cc-success-modal.ap-modal {
  max-width: 32rem;
  width: 92%;
  padding: 1.5rem;
}
.cc-success-head {
  text-align: center;
  margin-bottom: 1.25rem;
}
.cc-success-icon {
  font-size: 3rem;
  color: #16a34a;
  display: block;
  margin-bottom: 0.5rem;
}
.cc-success-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
}
.cc-success-sub {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}
.cc-success-link-block {
  margin-bottom: 1rem;
}
.cc-success-link-block:last-of-type {
  margin-bottom: 1.25rem;
}
.cc-success-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}
.cc-success-link-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.cc-success-link-input {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
}
.cc-success-copy {
  flex-shrink: 0;
  min-width: 4.5rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}
.cc-success-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}
.cc-success-actions .ap-btn {
  text-decoration: none;
  text-align: center;
}
@media (max-width: 480px) {
  .cc-success-link-row {
    flex-direction: column;
  }
  .cc-success-copy {
    width: 100%;
  }
  .cc-success-actions {
    flex-direction: column;
  }
  .cc-success-actions .ap-btn {
    width: 100%;
  }
}
.cc-msg {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.cc-msg.is-error { color: #dc2626; }
.cc-msg.is-ok { color: #15803d; }
.cc-offer-hint {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: #6b7280;
}
html.dark body.ap-publisher .cc-wizard-title,
html.dark body.ap-publisher .cc-section-title,
html.dark body.ap-publisher .cc-stepper-item.is-active .cc-stepper-label,
html.dark body.ap-publisher .cc-stepper-item.is-done .cc-stepper-label,
html.dark body.ap-publisher .cc-theme-name,
html.dark body.ap-publisher .cc-payout-goal {
  color: #f3f4f6;
}
html.dark body.ap-publisher .cc-section-card {
  background: #111827;
  border-color: #374151;
}
html.dark body.ap-publisher .cc-payout-block {
  background: transparent;
  border-color: transparent;
}
html.dark body.ap-publisher .cc-form-input {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
html.dark body.ap-publisher .cc-form-input:disabled,
html.dark body.ap-publisher .cc-form-input[readonly] {
  background: #0f172a;
  color: #9ca3af;
}
html.dark body.ap-publisher .cc-payout-summary {
  background: transparent;
  border-color: transparent;
}
html.dark body.ap-publisher .cc-stepper,
html.dark body.ap-publisher .cc-theme-card {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-publisher .cc-field input,
html.dark body.ap-publisher .cc-field select,
html.dark body.ap-publisher .cc-field textarea {
  background: #111827;
  border-color: #374151;
  color: #f3f4f6;
}
html.dark body.ap-publisher .cc-success-title {
  color: #f3f4f6;
}
html.dark body.ap-publisher .cc-success-sub {
  color: #9ca3af;
}
html.dark body.ap-publisher .cc-success-label {
  color: #d1d5db;
}
html.dark body.ap-publisher .cc-success-actions {
  border-top-color: #374151;
}
html.dark body.ap-publisher .cc-field label {
  color: #d1d5db;
}
@media (max-width: 640px) {
  .cc-stepper-label { display: none; }
  .cc-payout-fields { grid-template-columns: 1fr; }
}

.cc-offers-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* My Campaign — URL copy cells */
.mc-url-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 11rem;
  max-width: 18rem;
}
.mc-url-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: #374151;
}
.mc-url-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  padding: 0.3rem 0.55rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.mc-url-copy:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}
.mc-url-copy .material-symbols-outlined {
  font-size: 0.95rem;
}
html.dark body.ap-publisher .mc-url-text {
  color: #d1d5db;
}
html.dark body.ap-publisher .mc-url-copy {
  background: #1f2937;
  border-color: #4b5563;
  color: #93c5fd;
}
html.dark body.ap-publisher .mc-url-copy:hover {
  background: #374151;
}
@media (min-width: 768px) {
  .cc-offers-filters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cc-offers-search-btn {
  min-width: 6rem;
  padding: 0.55rem 1.25rem;
}
.cc-offers-table-card {
  margin-top: 1rem;
}
.cc-offers-table thead {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}
.cc-offers-table thead th {
  color: #fff;
  border: none;
}
.cc-offers-table tbody tr.cc-offers-row-selected td {
  background: #eff6ff;
}
.cc-offers-select-btn {
  padding: 0.3rem 0.85rem;
  border: 1.5px solid #2563eb;
  border-radius: 0.375rem;
  background: #fff;
  color: #2563eb;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-transform: uppercase;
}
.cc-offers-select-btn:hover:not(:disabled) {
  background: #eff6ff;
}
.cc-offers-select-btn.is-selected {
  background: #2563eb;
  color: #fff;
}
.cc-offers-select-btn:disabled {
  opacity: 0.85;
  cursor: default;
}
.cc-offers-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8125rem;
  color: #4b5563;
}
.cc-pager-btn {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
}
.cc-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cc-pager-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}
.cc-pager-of {
  margin-left: 0.35rem;
  color: #6b7280;
}
.cc-selected-offer {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.875rem;
}
html.dark body.ap-publisher .cc-offers-table thead {
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%);
}
html.dark body.ap-publisher .cc-offers-table tbody tr.cc-offers-row-selected td {
  background: #1e3a5f;
}
html.dark body.ap-publisher .cc-offers-select-btn {
  background: #111827;
  border-color: #3b82f6;
  color: #93c5fd;
}
html.dark body.ap-publisher .cc-offers-select-btn.is-selected {
  background: #2563eb;
  color: #fff;
}
html.dark body.ap-publisher .cc-selected-offer {
  background: #1e3a5f;
  border-color: #1d4ed8;
  color: #bfdbfe;
}
html.dark body.ap-publisher .cc-offers-pager {
  border-top-color: #374151;
}
html.dark body.ap-publisher .cc-pager-btn {
  background: #1f2937;
  border-color: #4b5563;
  color: #e5e7eb;
}

/* Bulk Conversion Upload */
.bk-page { padding: 0; }
.bk-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 1100px) {
  .bk-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}
.bk-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
html.dark body.ap-admin .bk-card {
  background: #111827;
  border-color: #374151;
}
.bk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
}
html.dark body.ap-admin .bk-card-head { border-bottom-color: #374151; }
.bk-card-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}
html.dark body.ap-admin .bk-card-head h2 { color: #f9fafb; }
.bk-card-head p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}
.bk-card-body { padding: 1.25rem; display: grid; gap: 1.15rem; }
.bk-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.bk-stat {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
}
html.dark body.ap-admin .bk-stat {
  background: #0f172a;
  border-color: #374151;
}
.bk-stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.bk-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
html.dark body.ap-admin .bk-stat-value { color: #f8fafc; }
.bk-stat--ok .bk-stat-value { color: #15803d; }
.bk-stat--fail .bk-stat-value { color: #b91c1c; }
.bk-stat--ready .bk-stat-value { color: #1d4ed8; }
.bk-drop {
  position: relative;
  border: 1.5px dashed #cbd5e1;
  border-radius: 0.85rem;
  background: #f8fafc;
  padding: 1.35rem 1rem;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
html.dark body.ap-admin .bk-drop {
  background: #0f172a;
  border-color: #475569;
}
.bk-drop:hover,
.bk-drop.is-drag {
  border-color: #2563eb;
  background: #eff6ff;
}
html.dark body.ap-admin .bk-drop:hover,
html.dark body.ap-admin .bk-drop.is-drag {
  background: #172554;
  border-color: #3b82f6;
}
.bk-drop-ico {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  margin-bottom: 0.65rem;
}
html.dark body.ap-admin .bk-drop-ico {
  background: #1e293b;
  color: #cbd5e1;
}
.bk-drop-ico .material-symbols-outlined { font-size: 1.35rem; }
.bk-drop-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: #0f172a;
}
html.dark body.ap-admin .bk-drop-title { color: #f8fafc; }
.bk-drop-sub {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}
.bk-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.bk-file-meta {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.8125rem;
  font-weight: 600;
}
html.dark body.ap-admin .bk-file-meta {
  background: #172554;
  border-color: #1d4ed8;
  color: #bfdbfe;
}
.bk-file-meta.is-on { display: flex; }
.bk-file-meta .material-symbols-outlined { font-size: 1.1rem; }
.bk-field {
  display: grid;
  gap: 0.4rem;
}
.bk-field > span {
  font-size: 0.8125rem;
  font-weight: 650;
  color: #334155;
}
html.dark body.ap-admin .bk-field > span { color: #e2e8f0; }
.bk-field small {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.4;
}
.bk-input,
.bk-textarea,
.bk-select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  font: inherit;
  background: #fff;
  color: #0f172a;
}
html.dark body.ap-admin .bk-input,
html.dark body.ap-admin .bk-textarea,
html.dark body.ap-admin .bk-select {
  background: #0f172a;
  border-color: #374151;
  color: #f8fafc;
}
.bk-textarea {
  min-height: 14rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}
.bk-format {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
html.dark body.ap-admin .bk-format {
  background: #0f172a;
  border-color: #374151;
}
.bk-format-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.bk-format code {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.75rem;
  overflow-x: auto;
}
.bk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.bk-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 0.65rem;
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
}
.bk-btn .material-symbols-outlined { font-size: 1.15rem; }
.bk-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.bk-btn-primary {
  background: #2563eb;
  color: #fff;
}
.bk-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.bk-btn-danger {
  background: #fee2e2;
  color: #991b1b;
}
.bk-btn-danger:hover:not(:disabled) { background: #fecaca; }
.bk-btn-ghost {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
}
html.dark body.ap-admin .bk-btn-ghost {
  background: #111827;
  color: #e2e8f0;
  border-color: #374151;
}
.bk-btn-ghost:hover:not(:disabled) { background: #f8fafc; }
html.dark body.ap-admin .bk-btn-ghost:hover:not(:disabled) { background: #1f2937; }
.bk-progress-wrap { display: grid; gap: 0.45rem; }
.bk-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.bk-progress-track {
  height: 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
html.dark body.ap-admin .bk-progress-track { background: #334155; }
.bk-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.18s ease;
}
.bk-progress-bar.is-done { background: #16a34a; }
.bk-progress-bar.is-fail { background: #dc2626; }
.bk-log-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0b1220;
}
html.dark body.ap-admin .bk-log-wrap { border-color: #374151; }
.bk-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 650;
}
.bk-log {
  margin: 0;
  max-height: 26rem;
  overflow: auto;
  padding: 0.85rem;
  color: #e2e8f0;
  font-size: 0.75rem;
  line-height: 1.55;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-height: 12rem;
}
.bk-msg {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 550;
}
.bk-msg--ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.bk-msg--err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Bulk conversion data grid */
.bk-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: end;
}
.bk-grid-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: auto;
  max-height: min(28rem, 62vh);
  background: #fff;
  outline: none;
}
html.dark body.ap-admin .bk-grid-wrap {
  border-color: #374151;
  background: #0f172a;
}
.bk-grid-wrap:focus {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}
.bk-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 52rem;
}
.bk-grid thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
html.dark body.ap-admin .bk-grid thead th {
  background: #111827;
  color: #cbd5e1;
  border-bottom-color: #374151;
}
.bk-th-opt {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: #94a3b8;
}
.bk-grid tbody td {
  padding: 0;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
html.dark body.ap-admin .bk-grid tbody td {
  border-bottom-color: #1f2937;
}
.bk-grid tbody tr:hover td {
  background: #f8fafc;
}
html.dark body.ap-admin .bk-grid tbody tr:hover td {
  background: #111827;
}
.bk-col-num {
  width: 3rem;
  text-align: center !important;
  color: #94a3b8;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  padding: 0.55rem 0.4rem !important;
}
.bk-col-act {
  width: 2.75rem;
  text-align: center !important;
}
.bk-cell {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.8125rem;
  color: #0f172a;
  outline: none;
}
html.dark body.ap-admin .bk-cell {
  color: #f8fafc;
}
.bk-cell:focus {
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}
html.dark body.ap-admin .bk-cell:focus {
  background: #172554;
}
.bk-row-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}
.bk-row-del:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.bk-row-del .material-symbols-outlined { font-size: 1.05rem; }
.bk-grid-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #64748b;
}
.bk-grid-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Bulk Conversion Upload */
.bk-page { padding: 0; }
.bk-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 1100px) {
  .bk-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}
.bk-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
html.dark body.ap-admin .bk-card {
  background: #111827;
  border-color: #374151;
}
.bk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
}
html.dark body.ap-admin .bk-card-head { border-bottom-color: #374151; }
.bk-card-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}
html.dark body.ap-admin .bk-card-head h2 { color: #f9fafb; }
.bk-card-head p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}
.bk-card-body { padding: 1.25rem; display: grid; gap: 1.15rem; }
.bk-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.bk-stat {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
}
html.dark body.ap-admin .bk-stat {
  background: #0f172a;
  border-color: #374151;
}
.bk-stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.bk-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
html.dark body.ap-admin .bk-stat-value { color: #f8fafc; }
.bk-stat--ok .bk-stat-value { color: #15803d; }
.bk-stat--fail .bk-stat-value { color: #b91c1c; }
.bk-stat--ready .bk-stat-value { color: #1d4ed8; }
.bk-drop {
  position: relative;
  border: 1.5px dashed #cbd5e1;
  border-radius: 0.85rem;
  background: #f8fafc;
  padding: 1.35rem 1rem;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
html.dark body.ap-admin .bk-drop {
  background: #0f172a;
  border-color: #475569;
}
.bk-drop:hover,
.bk-drop.is-drag {
  border-color: #2563eb;
  background: #eff6ff;
}
html.dark body.ap-admin .bk-drop:hover,
html.dark body.ap-admin .bk-drop.is-drag {
  background: #172554;
  border-color: #3b82f6;
}
.bk-drop-ico {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  margin-bottom: 0.65rem;
}
html.dark body.ap-admin .bk-drop-ico {
  background: #1e293b;
  color: #cbd5e1;
}
.bk-drop-ico .material-symbols-outlined { font-size: 1.35rem; }
.bk-drop-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: #0f172a;
}
html.dark body.ap-admin .bk-drop-title { color: #f8fafc; }
.bk-drop-sub {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}
.bk-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.bk-file-meta {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.8125rem;
  font-weight: 600;
}
html.dark body.ap-admin .bk-file-meta {
  background: #172554;
  border-color: #1d4ed8;
  color: #bfdbfe;
}
.bk-file-meta.is-on { display: flex; }
.bk-file-meta .material-symbols-outlined { font-size: 1.1rem; }
.bk-field {
  display: grid;
  gap: 0.4rem;
}
.bk-field > span {
  font-size: 0.8125rem;
  font-weight: 650;
  color: #334155;
}
html.dark body.ap-admin .bk-field > span { color: #e2e8f0; }
.bk-field small {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.4;
}
.bk-input,
.bk-textarea,
.bk-select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  font: inherit;
  background: #fff;
  color: #0f172a;
}
html.dark body.ap-admin .bk-input,
html.dark body.ap-admin .bk-textarea,
html.dark body.ap-admin .bk-select {
  background: #0f172a;
  border-color: #374151;
  color: #f8fafc;
}
.bk-textarea {
  min-height: 14rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}
.bk-format {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
html.dark body.ap-admin .bk-format {
  background: #0f172a;
  border-color: #374151;
}
.bk-format-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.bk-format code {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.75rem;
  overflow-x: auto;
}
.bk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.bk-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 0.65rem;
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
}
.bk-btn .material-symbols-outlined { font-size: 1.15rem; }
.bk-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.bk-btn-primary {
  background: #2563eb;
  color: #fff;
}
.bk-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.bk-btn-danger {
  background: #fee2e2;
  color: #991b1b;
}
.bk-btn-danger:hover:not(:disabled) { background: #fecaca; }
.bk-btn-ghost {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
}
html.dark body.ap-admin .bk-btn-ghost {
  background: #111827;
  color: #e2e8f0;
  border-color: #374151;
}
.bk-btn-ghost:hover:not(:disabled) { background: #f8fafc; }
html.dark body.ap-admin .bk-btn-ghost:hover:not(:disabled) { background: #1f2937; }
.bk-progress-wrap { display: grid; gap: 0.45rem; }
.bk-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.bk-progress-track {
  height: 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
html.dark body.ap-admin .bk-progress-track { background: #334155; }
.bk-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.18s ease;
}
.bk-progress-bar.is-done { background: #16a34a; }
.bk-progress-bar.is-fail { background: #dc2626; }
.bk-log-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0b1220;
}
html.dark body.ap-admin .bk-log-wrap { border-color: #374151; }
.bk-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 650;
}
.bk-log {
  margin: 0;
  max-height: 26rem;
  overflow: auto;
  padding: 0.85rem;
  color: #e2e8f0;
  font-size: 0.75rem;
  line-height: 1.55;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-height: 12rem;
}
.bk-msg {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 550;
}
.bk-msg--ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.bk-msg--err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Bulk conversion data grid */
.bk-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: end;
}
.bk-grid-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: auto;
  max-height: min(28rem, 62vh);
  background: #fff;
  outline: none;
}
html.dark body.ap-admin .bk-grid-wrap {
  border-color: #374151;
  background: #0f172a;
}
.bk-grid-wrap:focus {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}
.bk-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 52rem;
}
.bk-grid thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
html.dark body.ap-admin .bk-grid thead th {
  background: #111827;
  color: #cbd5e1;
  border-bottom-color: #374151;
}
.bk-th-opt {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: #94a3b8;
}
.bk-grid tbody td {
  padding: 0;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
html.dark body.ap-admin .bk-grid tbody td {
  border-bottom-color: #1f2937;
}
.bk-grid tbody tr:hover td {
  background: #f8fafc;
}
html.dark body.ap-admin .bk-grid tbody tr:hover td {
  background: #111827;
}
.bk-col-num {
  width: 3rem;
  text-align: center !important;
  color: #94a3b8;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  padding: 0.55rem 0.4rem !important;
}
.bk-col-act {
  width: 2.75rem;
  text-align: center !important;
}
.bk-cell {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.8125rem;
  color: #0f172a;
  outline: none;
}
html.dark body.ap-admin .bk-cell {
  color: #f8fafc;
}
.bk-cell:focus {
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb;
}
html.dark body.ap-admin .bk-cell:focus {
  background: #172554;
}
.bk-row-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}
.bk-row-del:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.bk-row-del .material-symbols-outlined { font-size: 1.05rem; }
.bk-grid-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #64748b;
}
.bk-grid-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ===== Shared Offers-style data table (used by Offers + Reports + Click + Aff) ===== */
.ra-offers-table-shell {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
html.dark body.ap-admin .ra-offers-table-shell {
  background: #111827;
  border-color: #374151;
}
.ra-offers-table-inner {
  overflow-x: auto;
}
body.ap-admin .ra-content .ra-offers-react-table,
body.ap-admin .ra-content .ra-reports-table.ra-offers-react-table,
body.ap-admin .ra-content .ra-aff-table.ra-offers-react-table,
body.ap-publisher .ra-content .ra-offers-react-table,
body.ap-publisher .ra-content .ra-reports-table.ra-offers-react-table,
body.ap-publisher .ra-content .ra-aff-table.ra-offers-react-table,
body.ap-publisher .ra-content .ra-pub-offers-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 68rem;
}
body.ap-admin .ra-content .ra-offers-react-table thead th,
body.ap-admin .ra-content table.ra-offers-react-table thead th,
body.ap-publisher .ra-content .ra-offers-react-table thead th,
body.ap-publisher .ra-content table.ra-offers-react-table thead th,
body.ap-publisher .ra-content .ra-pub-offers-table thead th {
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%) !important;
  color: #f8fafc !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 0.85rem 0.9rem !important;
  text-align: center !important;
  white-space: nowrap !important;
  border-bottom: 0 !important;
  min-width: 0;
}
html.dark body.ap-admin .ra-content .ra-offers-react-table thead th,
html.dark body.ap-publisher .ra-content .ra-offers-react-table thead th,
html.dark body.ap-publisher .ra-content .ra-pub-offers-table thead th {
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%) !important;
  color: #e2e8f0 !important;
}
body.ap-admin .ra-content .ra-offers-react-table tbody td,
body.ap-admin .ra-content table.ra-offers-react-table tbody td,
body.ap-publisher .ra-content .ra-offers-react-table tbody td,
body.ap-publisher .ra-content table.ra-offers-react-table tbody td,
body.ap-publisher .ra-content .ra-pub-offers-table tbody td {
  padding: 0.8rem 0.9rem !important;
  text-align: center !important;
  font-size: 0.84rem !important;
  color: #0f172a !important;
  border-bottom: 1px solid #eef2f7 !important;
  vertical-align: middle !important;
  background: #fff !important;
  white-space: nowrap !important;
  min-width: 0;
  box-shadow: none !important;
}
html.dark body.ap-admin .ra-content .ra-offers-react-table tbody td,
html.dark body.ap-publisher .ra-content .ra-offers-react-table tbody td,
html.dark body.ap-publisher .ra-content .ra-pub-offers-table tbody td {
  color: #e5e7eb !important;
  border-color: #1f2937 !important;
  background: #111827 !important;
}
body.ap-admin .ra-content .ra-offers-react-table tbody tr:nth-child(even) td,
body.ap-publisher .ra-content .ra-offers-react-table tbody tr:nth-child(even) td,
body.ap-publisher .ra-content .ra-pub-offers-table tbody tr:nth-child(even) td {
  background: #f8fafc !important;
}
html.dark body.ap-admin .ra-content .ra-offers-react-table tbody tr:nth-child(even) td,
html.dark body.ap-publisher .ra-content .ra-offers-react-table tbody tr:nth-child(even) td,
html.dark body.ap-publisher .ra-content .ra-pub-offers-table tbody tr:nth-child(even) td {
  background: #0f172a !important;
}
body.ap-admin .ra-content .ra-offers-react-table tbody tr:hover td,
body.ap-publisher .ra-content .ra-offers-react-table tbody tr:hover td,
body.ap-publisher .ra-content .ra-pub-offers-table tbody tr:hover td {
  background: #eff6ff !important;
}
html.dark body.ap-admin .ra-content .ra-offers-react-table tbody tr:hover td,
html.dark body.ap-publisher .ra-content .ra-offers-react-table tbody tr:hover td,
html.dark body.ap-publisher .ra-content .ra-pub-offers-table tbody tr:hover td {
  background: #172554 !important;
}
body.ap-admin .ra-content .ra-offers-react-table tbody tr:last-child td,
body.ap-publisher .ra-content .ra-offers-react-table tbody tr:last-child td,
body.ap-publisher .ra-content .ra-pub-offers-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.ra-offer-id {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #64748b !important;
  font-size: 0.8rem;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-offer-id,
html.dark body.ap-publisher .ra-offer-id { color: #94a3b8 !important; }
.ra-offer-name-cell { min-width: 10rem; white-space: nowrap; }
.ra-offer-name {
  display: inline-block;
  font-weight: 700;
  color: #0f172a !important;
  line-height: 1.25;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-offer-name,
html.dark body.ap-publisher .ra-offer-name { color: #f8fafc !important; }
.ra-offer-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ra-offer-chip--cat {
  background: #eef2ff;
  color: #3730a3 !important;
  border-color: #c7d2fe;
}
.ra-offer-chip--model {
  background: #ecfeff;
  color: #0e7490 !important;
  border-color: #a5f3fc;
}
.ra-offer-chip--vis {
  background: #f0fdf4;
  color: #166534 !important;
  border-color: #bbf7d0;
}
.ra-offer-chip--vis-private {
  background: #fff7ed;
  color: #9a3412 !important;
  border-color: #fed7aa;
}
.ra-offer-chip--fixed {
  background: #f8fafc;
  color: #475569 !important;
  border-color: #e2e8f0;
}
html.dark body.ap-admin .ra-offer-chip--cat,
html.dark body.ap-publisher .ra-offer-chip--cat {
  background: #1e1b4b;
  color: #c7d2fe !important;
  border-color: #4338ca;
}
html.dark body.ap-admin .ra-offer-chip--model,
html.dark body.ap-publisher .ra-offer-chip--model {
  background: #164e63;
  color: #a5f3fc !important;
  border-color: #0891b2;
}
html.dark body.ap-admin .ra-offer-chip--vis,
html.dark body.ap-publisher .ra-offer-chip--vis {
  background: #14532d;
  color: #bbf7d0 !important;
  border-color: #16a34a;
}
html.dark body.ap-admin .ra-offer-chip--vis-private,
html.dark body.ap-publisher .ra-offer-chip--vis-private {
  background: #7c2d12;
  color: #fed7aa !important;
  border-color: #ea580c;
}
html.dark body.ap-admin .ra-offer-chip--fixed,
html.dark body.ap-publisher .ra-offer-chip--fixed {
  background: #1e293b;
  color: #cbd5e1 !important;
  border-color: #334155;
}
.ra-metric-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}
.ra-metric-link:hover {
  background: linear-gradient(165deg, #3b82f6, #2563eb);
  border-color: #2563eb;
  color: #fff;
}
html.dark body.ap-admin .ra-metric-link,
html.dark body.ap-publisher .ra-metric-link {
  background: rgba(37, 99, 235, 0.18);
  border-color: #1e3a8a;
  color: #93c5fd;
}
.ra-offer-money {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-weight: 800;
  color: #047857 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.8rem;
}
html.dark body.ap-admin .ra-offer-money,
html.dark body.ap-publisher .ra-offer-money { color: #6ee7b7 !important; background: rgba(6, 78, 59, 0.35); border-color: #065f46; }
.ra-offer-adv {
  color: #334155 !important;
  font-weight: 550;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-offer-adv { color: #cbd5e1 !important; }
.ra-offer-status-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.ra-offer-status-text.is-on { color: #15803d; }
.ra-offer-status-text.is-off { color: #94a3b8; }

/* Dashboard fast skeleton */
.ra-dash-skel .ra-stat-value {
  opacity: 0.35;
  animation: ra-dash-pulse 1s ease-in-out infinite;
}
@keyframes ra-dash-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.55; }
}

/* ===== Instant page open: never blank the UI behind loaders ===== */
.ra-reports-loading,
.ra-reports-loading.is-active,
.ra-advertisers-loading,
.ra-advertisers-loading[aria-busy="true"],
.ra-requests-loading,
.ra-notify-loading,
.ra-pub-offers-loading,
.ra-dash-loading,
.ra-profile-loading {
  display: none !important;
}
.ra-reports-table-scroll.is-loading-hidden {
  display: block !important;
}
/* Keep list shells visible even if JS left [hidden] during fetch */
.ra-advertisers-table-wrap[hidden],
#a-table-wrap[hidden],
#po-table-wrap[hidden],
#mc-table-wrap[hidden],
#ph-table-wrap[hidden],
#pn-table-wrap[hidden],
#rf-table-wrap[hidden],
#adv-table-wrap[hidden],
#dom-table-wrap[hidden],
#gw-table-wrap[hidden],
#ipw-table-wrap[hidden],
#mod-table-wrap[hidden],
#cm-wrap[hidden],
#vm-wrap[hidden],
#rl-wrap[hidden],
#mh-wrap[hidden],
#wr-wrap[hidden],
#n-table-wrap[hidden] {
  display: block !important;
}

/* Shared offer detail look (admin + publisher) */
.ra-offer-view-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 768px) {
  .ra-offer-view-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .ra-offer-view-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ra-offer-view-cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.55rem;
  background: #f3f4f6;
  font-size: 0.9rem;
}
html.dark body.ap-admin .ra-offer-view-cell,
html.dark body.ap-publisher .ra-offer-view-cell { background: #1f2937; }
.ra-offer-view-cell--wide { grid-column: 1 / -1; }
.ra-offer-view-cell--link {
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}
.ra-offer-view-cell--link > strong {
  flex: 0 0 auto;
  min-width: 6.5rem;
}
.ra-offer-view-cell--link > span {
  flex: 1 1 auto;
  text-align: left !important;
  max-width: none !important;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
}
.ra-offer-view-cell--kpis {
  align-items: flex-start;
  flex-direction: column;
}
@media (min-width: 768px) {
  .ra-offer-view-cell--kpis { grid-column: span 1; }
}
@media (min-width: 1100px) {
  .ra-offer-view-cell--kpis { grid-column: span 2; }
}
.ra-offer-view-cell--kpis span {
  white-space: pre-wrap;
  text-align: left;
  width: 100%;
  line-height: 1.45;
  color: #334155;
}
html.dark body.ap-admin .ra-offer-view-cell--kpis span,
html.dark body.ap-publisher .ra-offer-view-cell--kpis span { color: #e5e7eb; }
.ra-offer-view-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.ra-offer-view-logo img,
.ra-offer-view-logo .ra-offer-view-avatar {
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #3b82f6;
}
.ra-offer-view-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
}
.ra-offer-events-card {
  margin-top: 1.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
html.dark body.ap-admin .ra-offer-events-card,
html.dark body.ap-publisher .ra-offer-events-card {
  background: #111827;
  border-color: #374151;
  box-shadow: none;
}
.ra-offer-events-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #f8fafc;
}
html.dark body.ap-admin .ra-offer-events-card-head,
html.dark body.ap-publisher .ra-offer-events-card-head {
  background: linear-gradient(135deg, #020617 0%, #1e293b 100%);
}
.ra-offer-events-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ra-offer-events-card-title .material-symbols-outlined {
  font-size: 1.2rem;
  color: #93c5fd;
}
.ra-offer-events-count {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}
.ra-offer-events-table-wrap {
  overflow-x: auto;
  margin: 0;
  border: none;
  border-radius: 0;
}
.ra-offer-events-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 36rem;
}
.ra-offer-events-table thead {
  background: #f1f5f9;
  color: #475569;
}
html.dark body.ap-admin .ra-offer-events-table thead,
html.dark body.ap-publisher .ra-offer-events-table thead {
  background: #1f2937;
  color: #cbd5e1;
}
.ra-offer-events-table th {
  padding: 0.7rem 1rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-offer-events-table th,
html.dark body.ap-publisher .ra-offer-events-table th { border-bottom-color: #374151; }
.ra-offer-events-table td {
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
html.dark body.ap-admin .ra-offer-events-table td,
html.dark body.ap-publisher .ra-offer-events-table td {
  color: #e5e7eb;
  border-bottom-color: #1f2937;
}
.ra-offer-events-table tbody tr:last-child td { border-bottom: none; }
.ra-offer-events-table tbody tr { transition: background 0.15s ease; }
.ra-offer-events-table tbody tr:nth-child(even) { background: #f8fafc; }
html.dark body.ap-admin .ra-offer-events-table tbody tr:nth-child(even),
html.dark body.ap-publisher .ra-offer-events-table tbody tr:nth-child(even) { background: #0f172a; }
.ra-offer-events-table tbody tr:hover { background: #eff6ff; }
html.dark body.ap-admin .ra-offer-events-table tbody tr:hover,
html.dark body.ap-publisher .ra-offer-events-table tbody tr:hover { background: #1e293b; }
.ra-ev-name {
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}
html.dark body.ap-admin .ra-ev-name,
html.dark body.ap-publisher .ra-ev-name { color: #f8fafc; }
.ra-ev-alias {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.22rem 0.65rem;
  border-radius: 0.4rem;
  background: #f1f5f9;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  text-align: center;
  border: 1px solid #e2e8f0;
}
html.dark body.ap-admin .ra-ev-alias,
html.dark body.ap-publisher .ra-ev-alias {
  background: #1f2937;
  color: #94a3b8;
  border-color: #374151;
}
.ra-offer-events-table th:nth-child(2),
.ra-offer-events-table td:nth-child(2) {
  text-align: center;
  white-space: nowrap;
}
.ra-ev-payout {
  text-align: center;
  white-space: nowrap;
}
.ra-ev-payout-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1px solid #a7f3d0;
}
html.dark body.ap-admin .ra-ev-payout-badge,
html.dark body.ap-publisher .ra-ev-payout-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}
.ra-ev-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-ev-num,
html.dark body.ap-publisher .ra-ev-num { color: #cbd5e1; }
.ra-ev-cap {
  display: inline-flex;
  min-width: 2.5rem;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 700;
}
html.dark body.ap-admin .ra-ev-cap,
html.dark body.ap-publisher .ra-ev-cap {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
}
.ra-ev-cap.is-low {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
html.dark body.ap-admin .ra-ev-cap.is-low,
html.dark body.ap-publisher .ra-ev-cap.is-low {
  background: rgba(249, 115, 22, 0.15);
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.35);
}
.ra-ev-cap.is-infinite {
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0;
}

.ra-pov-details-body { padding: 1.25rem; }
.ra-pov-details-title {
  font-size: 1.1rem;
  font-weight: 700;
}
.ra-pov-section-label {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
html.dark body.ap-publisher .ra-pov-section-label { color: #f3f4f6; }
.ra-pov-desc-block .ra-pov-desc {
  padding: 0.85rem 1rem;
  border-radius: 0.55rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  line-height: 1.5;
  white-space: pre-wrap;
}
html.dark body.ap-publisher .ra-pov-desc-block .ra-pov-desc {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}
.ra-pov-empty-events {
  padding: 1.25rem 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}
html.dark body.ap-publisher .ra-pov-empty-events { color: #94a3b8; }

/* Shared page title strip (admin + publisher) */
.ra-offers-react-strip {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.25rem;
  padding: 1.15rem 1.35rem;
}
html.dark body.ap-admin .ra-offers-react-strip,
html.dark body.ap-publisher .ra-offers-react-strip {
  background: #111827;
  border-color: #374151;
}
.ra-offers-react-strip-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ra-offers-react-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
html.dark body.ap-admin .ra-offers-react-title,
html.dark body.ap-publisher .ra-offers-react-title { color: #e5e7eb; }
.ra-offers-react-title-ico {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  font-size: 1.25rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(30, 58, 138, 0.45);
}
.ra-offers-react-fab {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: none;
  background: #16a34a;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.12);
  transition: transform .15s, background .15s;
}
.ra-offers-react-fab:hover { background: #15803d; transform: scale(1.05); color: #fff; }
.ra-offers-react-fab:active { transform: scale(0.95); }
.ra-page-strip-sub {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}
html.dark body.ap-publisher .ra-page-strip-sub { color: #94a3b8; }

/* Publisher offers table — denser admin-like zebra */
.ra-pub-offers-table tbody tr:nth-child(even) td { background: #f8fafc; }
html.dark body.ap-publisher .ra-pub-offers-table tbody tr:nth-child(even) td { background: #0f172a; }
.ra-pub-offers-table tbody tr:hover td { background: #eff6ff !important; }
html.dark body.ap-publisher .ra-pub-offers-table tbody tr:hover td { background: #1e293b !important; }

.ra-pub-domain-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 32rem;
}
.ra-pub-domain-form .ra-campaigns-form-label { margin-bottom: 0.35rem; display: block; }
.ra-pub-domain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.ra-pub-domain-msg {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #334155;
}
html.dark body.ap-publisher .ra-pub-domain-msg { color: #cbd5e1; }


/* Publisher content now lives in .ra-content (same as admin) */
body.ap-publisher .ra-content .ap-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; }
html.dark body.ap-publisher .ra-content .ap-card { background: #1f2937; border-color: #374151; }
body.ap-publisher .ra-offers-react-strip {
  background: #fff;
}
html.dark body.ap-publisher .ra-offers-react-strip {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-publisher .ra-offers-react-title { color: #e5e7eb; }
html.dark body.ap-publisher .ra-reports-card {
  background: #1f2937;
  border-color: #374151;
}


/* Publisher list/table polish parity with admin */
body.ap-publisher .ra-content .ra-pub-offer-table,
body.ap-publisher .ra-content .ra-mc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
body.ap-publisher .ra-content .ra-pub-offer-table thead th,
body.ap-publisher .ra-content .ra-mc-table thead th {
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%) !important;
  color: #f8fafc !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 0.85rem 0.9rem !important;
  border-bottom: 0 !important;
  white-space: nowrap !important;
}
html.dark body.ap-publisher .ra-content .ra-pub-offer-table thead th,
html.dark body.ap-publisher .ra-content .ra-mc-table thead th {
  background: #020617 !important;
  color: #e2e8f0 !important;
}
body.ap-publisher .ra-content .ra-pub-offer-table tbody td,
body.ap-publisher .ra-content .ra-mc-table tbody td {
  padding: 0.8rem 0.9rem !important;
  border-bottom: 1px solid #eef2f7 !important;
  background: #fff !important;
  vertical-align: middle !important;
}
html.dark body.ap-publisher .ra-content .ra-pub-offer-table tbody td,
html.dark body.ap-publisher .ra-content .ra-mc-table tbody td {
  background: #111827 !important;
  border-color: #1f2937 !important;
  color: #e5e7eb !important;
}
body.ap-publisher .ra-content .ra-pub-offer-table tbody tr:nth-child(even) td,
body.ap-publisher .ra-content .ra-mc-table tbody tr:nth-child(even) td {
  background: #f8fafc !important;
}
html.dark body.ap-publisher .ra-content .ra-pub-offer-table tbody tr:nth-child(even) td,
html.dark body.ap-publisher .ra-content .ra-mc-table tbody tr:nth-child(even) td {
  background: #0f172a !important;
}
body.ap-publisher .ra-content .ra-pub-offer-table tbody tr:hover td,
body.ap-publisher .ra-content .ra-mc-table tbody tr:hover td {
  background: #eff6ff !important;
}
body.ap-publisher .ra-pub-offers-filters {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}
html.dark body.ap-publisher .ra-pub-offers-filters {
  background: #111827;
  border-color: #374151;
}
body.ap-publisher .ra-pub-offers-table-card {
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}
html.dark body.ap-publisher .ra-reports-table thead,
html.dark body.ap-publisher .ra-reports-table th {
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%) !important;
  color: #e2e8f0 !important;
}
html.dark body.ap-publisher .ra-reports-table td {
  background: #111827 !important;
  border-color: #1f2937 !important;
  color: #e5e7eb !important;
}
html.dark body.ap-publisher .ra-reports-table tbody tr:nth-child(even) td {
  background: #0f172a !important;
}
html.dark body.ap-publisher .ra-reports-table tbody tr:hover td {
  background: #172554 !important;
}

/* Floating save success (campaign create/edit) */
.ap-save-float {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5.5rem 1rem 1rem;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.18);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.ap-save-float.is-in { opacity: 1; pointer-events: auto; }
.ap-save-float.is-out { opacity: 0; }
.ap-save-float-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 17.5rem;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.95rem 1.15rem;
  border-radius: 1.05rem;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 70%);
  border: 1px solid #6ee7b7;
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.22), 0 8px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(-18px) scale(0.96);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.ap-save-float.is-in .ap-save-float-card { transform: translateY(0) scale(1); }
.ap-save-float-ico {
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
}
.ap-save-float-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ap-save-float-ring {
  fill: none;
  stroke: #10b981;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
}
.ap-save-float.is-in .ap-save-float-ring {
  animation: ap-save-ring 0.55s ease forwards;
}
.ap-save-float-check {
  fill: none;
  stroke: #059669;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}
.ap-save-float.is-in .ap-save-float-check {
  animation: ap-save-check 0.4s ease 0.28s forwards;
}
.ap-save-float-copy { display: grid; gap: 0.12rem; min-width: 0; }
.ap-save-float-copy strong {
  font-size: 1.02rem;
  font-weight: 700;
  color: #047857;
  letter-spacing: -0.01em;
}
.ap-save-float-copy span {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}
html.dark .ap-save-float { background: rgba(2, 6, 23, 0.45); }
html.dark .ap-save-float-card {
  background: linear-gradient(180deg, #064e3b 0%, #0f172a 78%);
  border-color: #34d399;
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.18);
}
html.dark .ap-save-float-copy strong { color: #6ee7b7; }
html.dark .ap-save-float-copy span { color: #94a3b8; }
html.dark .ap-save-float-ring { stroke: #34d399; }
html.dark .ap-save-float-check { stroke: #a7f3d0; }
.ap-save-float.is-error { background: rgba(127, 29, 29, 0.14); }
.ap-save-float.is-error .ap-save-float-card {
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 70%);
  border-color: #fca5a5;
  box-shadow: 0 18px 50px rgba(239, 68, 68, 0.2), 0 8px 20px rgba(15, 23, 42, 0.12);
}
.ap-save-float.is-error .ap-save-float-ring { stroke: #ef4444; }
.ap-save-float.is-error .ap-save-float-check { stroke: #dc2626; }
.ap-save-float.is-error .ap-save-float-copy strong { color: #b91c1c; }
html.dark .ap-save-float.is-error { background: rgba(69, 10, 10, 0.45); }
html.dark .ap-save-float.is-error .ap-save-float-card {
  background: linear-gradient(180deg, #7f1d1d 0%, #0f172a 78%);
  border-color: #f87171;
}
html.dark .ap-save-float.is-error .ap-save-float-copy strong { color: #fca5a5; }
html.dark .ap-save-float.is-error .ap-save-float-ring { stroke: #f87171; }
html.dark .ap-save-float.is-error .ap-save-float-check { stroke: #fecaca; }
@keyframes ap-save-ring {
  to { stroke-dashoffset: 0; }
}
@keyframes ap-save-check {
  to { stroke-dashoffset: 0; }
}

/* ===== Wait scene: keep admins/publishers engaged while lists load ===== */
.ap-wait-host,
.ra-profile-loading.ap-wait-host,
.ra-pub-offers-loading.ap-wait-host,
.ra-reports-loading.ap-wait-host,
.ra-advertisers-loading.ap-wait-host,
.ra-notify-loading.ap-wait-host,
.ra-requests-loading.ap-wait-host,
.ra-dash-loading.ap-wait-host {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.25rem 1rem 1.4rem !important;
  background: transparent !important;
}
.ap-wait-host[hidden],
.ra-profile-loading.ap-wait-host[hidden],
.ra-pub-offers-loading.ap-wait-host[hidden],
.ra-reports-loading.ap-wait-host[hidden],
.ra-advertisers-loading.ap-wait-host[hidden],
.ra-notify-loading.ap-wait-host[hidden],
.ra-requests-loading.ap-wait-host[hidden],
.ra-dash-loading.ap-wait-host[hidden] {
  display: none !important;
}
tr.ap-wait-row td,
td.ap-wait-cell,
#r-summary-table tbody tr.ap-wait-row td,
#r-summary-table tbody tr.ap-wait-row td:nth-child(1),
#r-summary-table tbody tr.ap-wait-row td:nth-child(2),
#r-matrix-table tbody tr.ap-wait-row td,
#r-matrix-table tbody tr.ap-wait-row td:nth-child(1),
#r-matrix-table tbody tr.ap-wait-row td:nth-child(2) {
  text-align: center !important;
  vertical-align: middle !important;
  white-space: normal !important;
  min-width: 0 !important;
  width: 100% !important;
  padding: 1.1rem 1rem 1.35rem !important;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 62%) !important;
  border-bottom: 0 !important;
}
.ra-reports-table tbody tr.ap-wait-row:hover td,
.ra-advertisers-table tbody tr.ap-wait-row:hover td,
.ra-pub-offers-table tbody tr.ap-wait-row:hover td {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 62%) !important;
}
.ap-wait-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(36rem, 100%);
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
}
.ap-wait-stage {
  position: relative;
  width: min(22rem, 100%);
  height: 4.6rem;
}
.ap-wait-funnel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.ap-wait-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.4rem;
  height: 2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  animation: ap-wait-chip 1.8s ease-in-out infinite;
}
.ap-wait-chip--click { background: linear-gradient(180deg, #1d4ed8, #1e3a8a); animation-delay: 0s; }
.ap-wait-chip--install { background: linear-gradient(180deg, #059669, #064e3b); animation-delay: 0.18s; }
.ap-wait-chip--sky { background: linear-gradient(180deg, #0284c7, #0c4a6e); animation-delay: 0.18s; }
.ap-wait-chip--purple { background: linear-gradient(180deg, #7c3aed, #4c1d95); animation-delay: 0s; }
.ap-wait-chip--pink { background: linear-gradient(180deg, #fb7185, #e11d48); animation-delay: 0s; }
.ap-wait-chip--slate { background: linear-gradient(180deg, #94a3b8, #334155); animation-delay: 0.18s; }
.ap-wait-chip--rupee {
  min-width: 2.2rem;
  background: linear-gradient(180deg, #d97706, #92400e);
  font-size: 1rem;
  animation-delay: 0.36s;
}
.ap-wait-hero-ico {
  position: absolute;
  right: 8%;
  top: 6%;
  font-size: 1.85rem !important;
  color: #2563eb;
  animation: ap-wait-hero 1.6s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(37, 99, 235, 0.25));
}
.ap-wait-scene--notify .ap-wait-hero-ico { color: #e11d48; animation-name: ap-wait-bell; }
.ap-wait-scene--payouts .ap-wait-hero-ico,
.ap-wait-scene--refer .ap-wait-hero-ico { color: #d97706; }
.ap-wait-scene--ip .ap-wait-hero-ico { color: #0f766e; }
.ap-wait-scene--profile .ap-wait-hero-ico { color: #7c3aed; }
.ap-wait-scene--monitor .ap-wait-hero-ico { color: #db2777; }
.ap-wait-pipe {
  width: 1.35rem;
  height: 3px;
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, #93c5fd 0 6px, transparent 6px 10px);
  background-size: 16px 3px;
  animation: ap-wait-pipe 0.7s linear infinite;
}
.ap-wait-cursor {
  position: absolute;
  left: 18%;
  top: 58%;
  width: 14px;
  height: 14px;
  border-radius: 2px 10px 10px 10px;
  background: #0f172a;
  transform: rotate(-18deg);
  animation: ap-wait-cursor 1.8s ease-in-out infinite;
  box-shadow: 1px 2px 0 rgba(255,255,255,0.4);
}
.ap-wait-cursor::after {
  content: '';
  position: absolute;
  left: -6px;
  top: -6px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(37, 99, 235, 0.45);
  border-radius: 50%;
  animation: ap-wait-ripple 1.8s ease-out infinite;
}
.ap-wait-coin {
  position: absolute;
  right: 12%;
  top: 8%;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b 55%, #b45309);
  color: #7c2d12;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ap-wait-coin 1.7s ease-in-out infinite;
}
.ap-wait-coin--2 { right: 22%; animation-delay: 0.25s; }
.ap-wait-coin--3 { right: 6%; animation-delay: 0.5s; }
.ap-wait-msg {
  position: relative;
  height: 1.35rem;
  margin: 0;
  width: 100%;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e3a8a !important;
  text-align: center;
}
.ap-wait-msg span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: ap-wait-msg 8.8s ease-in-out infinite;
}
.ap-wait-msg span:nth-child(1) { animation-delay: 0s; }
.ap-wait-msg span:nth-child(2) { animation-delay: 2.2s; }
.ap-wait-msg span:nth-child(3) { animation-delay: 4.4s; }
.ap-wait-msg span:nth-child(4) { animation-delay: 6.6s; }
.ap-wait-skel {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}
.ap-wait-skel i {
  display: block;
  height: 0.72rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 40%, #e2e8f0 80%);
  background-size: 200% 100%;
  animation: ap-wait-shimmer 1.15s linear infinite;
}
.ap-wait-skel i:nth-child(1) { width: 92%; }
.ap-wait-skel i:nth-child(2) { width: 76%; animation-delay: 0.1s; }
.ap-wait-skel i:nth-child(3) { width: 84%; animation-delay: 0.2s; }
.ap-wait-skel i:nth-child(4) { width: 64%; animation-delay: 0.3s; }
.ap-wait-pulse {
  position: relative;
  color: transparent !important;
  background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
  background-size: 200% 100%;
  border-radius: 0.4rem;
  animation: ap-wait-shimmer 1.15s linear infinite;
}
@keyframes ap-wait-chip {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.05); }
}
@keyframes ap-wait-pipe {
  to { background-position: 16px 0; }
}
@keyframes ap-wait-cursor {
  0%, 100% { transform: translate(0, 0) rotate(-18deg); }
  35% { transform: translate(42px, -10px) rotate(-8deg); }
  50% { transform: translate(42px, -6px) rotate(-8deg) scale(0.92); }
  70% { transform: translate(118px, -12px) rotate(-14deg); }
}
@keyframes ap-wait-ripple {
  0% { transform: scale(0.4); opacity: 0.7; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}
@keyframes ap-wait-coin {
  0%, 100% { transform: translateY(18px) scale(0.7); opacity: 0; }
  25% { opacity: 1; }
  70% { transform: translateY(-14px) scale(1); opacity: 1; }
}
@keyframes ap-wait-msg {
  0%, 22% { opacity: 1; transform: translateY(0); }
  25%, 100% { opacity: 0; transform: translateY(8px); }
}
@keyframes ap-wait-shimmer {
  to { background-position: -200% 0; }
}
@keyframes ap-wait-hero {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  50% { transform: translateY(-7px) scale(1.12) rotate(-8deg); }
}
@keyframes ap-wait-bell {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(3deg); }
}
html.dark tr.ap-wait-row td,
html.dark td.ap-wait-cell,
html.dark .ra-reports-table tbody tr.ap-wait-row:hover td {
  background: linear-gradient(180deg, #0f172a 0%, #111827 62%) !important;
}
html.dark .ap-wait-msg { color: #bfdbfe !important; }
html.dark .ap-wait-hero-ico { color: #93c5fd; }
html.dark .ap-wait-scene--notify .ap-wait-hero-ico { color: #fb7185; }
html.dark .ap-wait-scene--payouts .ap-wait-hero-ico,
html.dark .ap-wait-scene--refer .ap-wait-hero-ico { color: #fbbf24; }
html.dark .ap-wait-scene--ip .ap-wait-hero-ico { color: #5eead4; }
html.dark .ap-wait-scene--profile .ap-wait-hero-ico { color: #d8b4fe; }
html.dark .ap-wait-scene--monitor .ap-wait-hero-ico { color: #f9a8d4; }
html.dark .ap-wait-skel i,
html.dark .ap-wait-pulse {
  background: linear-gradient(90deg, #1f2937 0%, #334155 40%, #1f2937 80%);
  background-size: 200% 100%;
}

/* Embedded VIP / cutback / pending pages inside affiliate admin */
.ap-embed-page {
  min-width: 0;
  color: #0f172a;
}
.ap-embed-page .max-w-7xl { max-width: none; margin: 0; }
.ap-embed-page .grid {
  display: grid;
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}
.ap-embed-page .ap-embed-cards {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .ap-embed-page .ap-embed-cards.md\:grid-cols-2,
  .ap-embed-page .ap-embed-cards.ap-embed-cards--2 {
    grid-template-columns: 1fr 1fr;
  }
  .ap-embed-page .md\:grid-cols-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .ap-embed-page .ap-embed-cards--3,
  .ap-embed-page .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ap-embed-page > .max-w-7xl > p,
.ap-embed-page .ap-embed-hint {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1.05rem 0.9rem 1.15rem;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 55%);
  border: 1px solid #dbeafe;
  border-left: 4px solid #2563eb;
  border-radius: 0.75rem;
  color: #334155;
  font-size: 0.875rem;
  line-height: 1.55;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}
.ap-embed-page .ap-embed-hint code,
.ap-embed-page .ap-embed-hint .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: #1d4ed8;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 0.35rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.8em;
}
.ap-embed-page table .font-mono,
.ap-embed-page #programsTable .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: inherit;
}
.ap-embed-page a { color: #2563eb; font-weight: 650; text-decoration: none; }
.ap-embed-page a:hover { text-decoration: underline; }
.ap-embed-page .ap-embed-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}
.ap-embed-page a.ap-embed-action-btn,
.ap-embed-page .ap-embed-action-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 5.75rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: 0.55rem;
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  color: #fff !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  line-height: 1.1;
  text-decoration: none !important;
  box-shadow: 0 6px 14px -7px rgb(37 99 235 / 0.6);
  white-space: nowrap;
}
.ap-embed-page a.ap-embed-action-btn:hover,
.ap-embed-page .ap-embed-action-btn:hover {
  filter: brightness(1.06);
  color: #fff !important;
  text-decoration: none !important;
}
.ap-embed-page a.ap-embed-action-btn .material-symbols-outlined,
.ap-embed-page .ap-embed-action-btn .material-symbols-outlined {
  font-size: 1rem;
  line-height: 1;
  color: #fff !important;
}
/* Only top-level tool cards get chrome — not nested field grids */
.ap-embed-page .ap-embed-cards > div,
.ap-embed-page .ap-embed-panel,
.ap-embed-page .rounded-xl.ap-embed-panel,
.ap-embed-page > .max-w-7xl > .rounded-xl,
.ap-embed-page > .max-w-7xl > .bg-white.rounded-xl {
  position: relative;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 0.9rem;
  box-shadow: 0 8px 24px -12px rgb(15 23 42 / 0.18);
  overflow: hidden;
}
.ap-embed-page .ap-embed-cards > div { padding: 1.15rem 1.2rem 1.25rem; }
.ap-embed-page .ap-embed-cards > div::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.ap-embed-page .ap-embed-cards > div:nth-child(2)::before {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}
.ap-embed-page .ap-embed-cards > div:nth-child(3)::before {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

/* Program edit: fill width — settings + events */
.ap-embed-page .ap-vip-edit-panel {
  width: 100%;
  padding: 1.25rem 1.35rem 1.5rem;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 0.9rem;
  box-shadow: 0 8px 24px -12px rgb(15 23 42 / 0.18);
  margin-bottom: 1.5rem;
}
.ap-embed-page .ap-vip-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 900px) {
  .ap-embed-page .ap-vip-settings-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1200px) {
  .ap-embed-page .ap-vip-settings-grid {
    grid-template-columns: 1.1fr 1fr 1fr;
  }
}
.ap-embed-page .ap-vip-settings-grid > div {
  margin: 0;
  max-width: none !important;
  width: 100%;
  min-width: 0;
}
.ap-embed-page #vip-events-container {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
  margin-bottom: 1.25rem;
  width: 100%;
}
@media (min-width: 1100px) {
  .ap-embed-page #vip-events-container.has-multi {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
.ap-embed-page #vip-events-container .vip-event-card {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  box-shadow: none;
  overflow: visible;
}
.ap-embed-page #vip-events-container .vip-event-card::before { display: none !important; }
.ap-embed-page #vip-events-container .vip-event-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.85rem !important;
  margin: 0 0 0.85rem !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
@media (min-width: 900px) {
  .ap-embed-page #vip-events-container .vip-event-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
.ap-embed-page #vip-events-container .vip-event-fields > div {
  margin: 0 !important;
  padding: 0.65rem 0.75rem !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.65rem !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.ap-embed-page #vip-events-container .vip-event-fields > div::before { display: none !important; }
.ap-embed-page #vip-events-container .vip-event-fields input {
  margin-bottom: 0 !important;
}
.ap-embed-page #vip-events-container .vip-event-toggles {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.65rem !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.ap-embed-page #vip-events-container .vip-event-toggles > div {
  margin: 0 !important;
  padding: 0.55rem 0.65rem !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.55rem !important;
  box-shadow: none !important;
}
.ap-embed-page #vip-events-container .vip-event-toggles > div::before { display: none !important; }

.ap-embed-page h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid #eef2f7;
  font-size: 1rem;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.ap-embed-page h3 .material-symbols-outlined,
.ap-embed-page h3 .fas,
.ap-embed-page h3 i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem !important;
  height: 1.85rem !important;
  overflow: visible;
  border-radius: 0.5rem;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.15rem !important;
  line-height: 1;
}
.ap-embed-page .ap-embed-cards > div:nth-child(2) h3 { color: #14532d; }
.ap-embed-page .ap-embed-cards > div:nth-child(2) h3 .material-symbols-outlined,
.ap-embed-page .ap-embed-cards > div:nth-child(2) h3 .fas,
.ap-embed-page .ap-embed-cards > div:nth-child(2) h3 i {
  background: #ecfdf5;
  color: #16a34a;
}
.ap-embed-page label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.ap-embed-page label span { text-transform: none; letter-spacing: 0; font-weight: 500; color: #94a3b8; }
.ap-embed-page input[type="text"],
.ap-embed-page input[type="number"],
.ap-embed-page input[type="date"],
.ap-embed-page input[type="search"],
.ap-embed-page select,
.ap-embed-page textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.85rem;
  padding: 0.62rem 0.8rem;
  border: 1px solid #dbe3ee;
  border-radius: 0.55rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.9rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ap-embed-page input:focus,
.ap-embed-page select:focus,
.ap-embed-page textarea:focus {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15);
}
.ap-embed-page textarea { min-height: 4.2rem; resize: vertical; }
.ap-embed-page .select2-container { width: 100% !important; margin-bottom: 0.85rem; }
.ap-embed-page .select2-container--default .select2-selection--single {
  height: 42px;
  border: 1px solid #dbe3ee;
  border-radius: 0.55rem;
  background: #f8fafc;
  padding: 6px 10px;
}
.ap-embed-page .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 28px;
  color: #0f172a;
}
.ap-embed-page .select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
/* Select2 hides the original <select>; .ap-embed-page select must not un-hide it */
.ap-embed-page select.select2-hidden-accessible,
.ap-embed-page .select2-hidden-accessible {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  -webkit-clip-path: inset(50%) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  width: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.ap-embed-page button,
.ap-embed-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: inherit;
  box-shadow: none;
  transition: transform .12s, filter .12s, background .12s;
}
.ap-embed-page .grid form > button,
.ap-embed-page form > button.bg-blue-600,
.ap-embed-page form > button.bg-green-600,
.ap-embed-page form > button.bg-gradient-to-r {
  width: 100%;
}
.ap-embed-page button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.ap-embed-page .bg-blue-600,
.ap-embed-page .bg-gradient-to-r { background: linear-gradient(180deg, #3b82f6, #2563eb) !important; color: #fff; box-shadow: 0 8px 16px -8px rgb(37 99 235 / 0.55); }
.ap-embed-page .bg-green-600 { background: linear-gradient(180deg, #22c55e, #16a34a) !important; color: #fff; box-shadow: 0 8px 16px -8px rgb(22 163 74 / 0.55); }
.ap-embed-page .bg-red-600 { background: #dc2626 !important; box-shadow: 0 8px 16px -8px rgb(220 38 38 / 0.5); }
.ap-embed-page .btn-secondary,
.ap-embed-page .btn-primary { width: auto; padding: 0.45rem 0.9rem; }
.ap-embed-page input.sr-only,
.ap-embed-page input.peer.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.ap-embed-page label.relative,
.ap-embed-page label.inline-flex {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  font-weight: 650;
  color: #334155;
  margin: 0 0 0.85rem;
}
.ap-embed-page input.peer + div {
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.12);
  transition: background .15s;
}
.ap-embed-page input.peer + div::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 1.25rem; height: 1.25rem;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.25);
  transition: transform .15s;
}
.ap-embed-page input.peer:checked + div { background: #22c55e; }
.ap-embed-page input.peer:checked + div::after { transform: translateX(1.25rem); }
.ap-embed-page table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  display: table;
}
.ap-embed-page thead { display: table-header-group; }
.ap-embed-page tbody { display: table-row-group; }
.ap-embed-page tr { display: table-row; }
.ap-embed-page th,
.ap-embed-page td {
  display: table-cell;
  padding: 0.8rem 0.9rem;
  text-align: left;
  vertical-align: middle;
  font-size: 0.84rem;
  border: 1px solid #cbd5e1;
}
.ap-embed-page thead th {
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-color: #334155;
}
.ap-embed-page tbody td {
  color: #0f172a;
  background: #fff;
}
.ap-embed-page tbody tr:hover td { background: #f8fafc; }
.ap-embed-page .overflow-hidden.mt-6,
.ap-embed-page .rounded-xl.mt-6,
.ap-embed-page .shadow-lg.mt-6 {
  margin-top: 0.25rem;
  padding: 0;
}
.ap-embed-page .p-6.bg-gray-100,
.ap-embed-page .bg-gray-100 {
  padding: 0.85rem 1.1rem;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e2e8f0;
}
.ap-embed-page .overflow-x-auto { overflow-x: auto; padding: 0; }
.ap-embed-page .dataTables_wrapper { padding: 0.75rem 1rem 1rem; }
.ap-embed-page .dataTables_wrapper .dataTables_filter input,
.ap-embed-page .dataTables_wrapper .dataTables_length select {
  width: auto;
  min-width: 11rem;
  display: inline-block;
  margin: 0 0 0 0.4rem;
}
.ap-embed-page .dataTables_info { color: #64748b; font-size: 0.78rem; padding-top: 0.6rem; }
.ap-embed-page .dataTables_paginate { margin-top: 0.65rem; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.ap-embed-page .dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.65rem !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.5rem !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  box-shadow: none;
  width: auto;
}
.ap-embed-page .dataTables_paginate .paginate_button.current {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.ap-embed-page .mb-4 { margin-bottom: 0.15rem; }
.ap-embed-page .mb-5 { margin-bottom: 0.35rem; }
.ap-embed-page .mb-6 { margin-bottom: 1.15rem; }
.ap-embed-page .mb-8 { margin-bottom: 1.15rem; }
.ap-embed-page .mt-6 { margin-top: 1rem; }
.ap-embed-page .p-4 { padding: 1rem; }
.ap-embed-page .p-6 { padding: 1.15rem 1.2rem; }
html.dark body.ap-admin .ap-embed-page { color: #e2e8f0; }
html.dark body.ap-admin .ap-embed-page > .max-w-7xl > p,
html.dark body.ap-admin .ap-embed-page .ap-embed-hint {
  background: linear-gradient(90deg, #1e3a5f 0%, #1e293b 55%);
  border-color: #1e40af;
  color: #cbd5e1;
}
html.dark body.ap-admin .ap-embed-page .grid > div,
html.dark body.ap-admin .ap-embed-page .rounded-xl {
  background: #1f2937;
  border-color: #334155;
}
html.dark body.ap-admin .ap-embed-page h3 { color: #f8fafc; border-color: #334155; }
html.dark body.ap-admin .ap-embed-page input[type="text"],
html.dark body.ap-admin .ap-embed-page input[type="number"],
html.dark body.ap-admin .ap-embed-page select,
html.dark body.ap-admin .ap-embed-page textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
html.dark body.ap-admin .ap-embed-page tbody td {
  background: #1f2937;
  color: #e2e8f0;
  border-color: #334155;
}
html.dark body.ap-admin .ap-embed-page tbody tr:hover td { background: #0f172a; }
html.dark body.ap-admin .ap-embed-page thead th { background: #020617; }

.ra-camp-action--payout { background: #d97706; }
.ra-camp-action--payout:hover { background: #b45309; color: #fff; }
.ra-aff-payout-modal.ap-modal { max-width: 34rem; }
.ra-aff-payout-events { margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.ra-aff-payout-event {
  padding: 0.85rem 0.95rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f8fafc;
}
html.dark body.ap-admin .ra-aff-payout-event { background: #0f172a; border-color: #334155; }
.ra-aff-payout-event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.55rem;
}
.ra-aff-payout-event-meta strong { font-size: 0.95rem; color: #0f172a; }
html.dark body.ap-admin .ra-aff-payout-event-meta strong { color: #f8fafc; }
.ra-aff-payout-event-meta span { font-size: 0.8125rem; color: #64748b; }
.ra-aff-payout-overrides { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid #e5e7eb; }
html.dark body.ap-admin .ra-aff-payout-overrides { border-color: #334155; }
.ra-aff-payout-overrides-title { margin: 0 0 0.55rem; font-size: 0.92rem; font-weight: 700; }
.ra-aff-payout-overrides-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.ra-aff-payout-overrides-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #334155;
}
html.dark body.ap-admin .ra-aff-payout-overrides-list li { color: #cbd5e1; }
.ra-aff-payout-overrides-list em { font-style: normal; font-weight: 700; color: #b45309; }
.ra-pub-domain-msg.is-ok { color: #15803d; }
.ra-pub-domain-msg.is-err { color: #b91c1c; }

.ap-confirm-overlay.ap-modal-overlay {
  z-index: 11000;
  background: rgba(15, 23, 42, 0.55);
  padding: 1rem;
}
.ap-confirm-modal.ap-modal {
  max-width: 26rem;
  width: 100%;
  text-align: center;
  padding: 1.5rem 1.35rem 1.25rem;
}
.ap-confirm-ico-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.85rem;
  border-radius: 9999px;
  background: #fef2f2;
}
html.dark body.ap-admin .ap-confirm-ico-wrap,
html.dark body.ap-publisher .ap-confirm-ico-wrap { background: rgba(127, 29, 29, 0.45); }
.ap-confirm-ico { color: #dc2626; font-size: 1.85rem !important; }
.ap-confirm-title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}
html.dark body.ap-admin .ap-confirm-title,
html.dark body.ap-publisher .ap-confirm-title { color: #f8fafc; }
.ap-confirm-sub {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5563;
  white-space: pre-wrap;
}
.ap-confirm-modal--info .ap-confirm-ico-wrap { background: #eff6ff; }
.ap-confirm-modal--success .ap-confirm-ico-wrap { background: #ecfdf5; }
.ap-confirm-modal--warning .ap-confirm-ico-wrap { background: #fffbeb; }
html.dark body.ap-admin .ap-confirm-modal--info .ap-confirm-ico-wrap,
html.dark body.ap-publisher .ap-confirm-modal--info .ap-confirm-ico-wrap { background: rgba(30, 64, 175, 0.35); }
html.dark body.ap-admin .ap-confirm-modal--success .ap-confirm-ico-wrap,
html.dark body.ap-publisher .ap-confirm-modal--success .ap-confirm-ico-wrap { background: rgba(6, 78, 59, 0.4); }
html.dark body.ap-admin .ap-confirm-modal--warning .ap-confirm-ico-wrap,
html.dark body.ap-publisher .ap-confirm-modal--warning .ap-confirm-ico-wrap { background: rgba(120, 53, 15, 0.4); }
.ap-confirm-modal--info .ap-confirm-ico { color: #2563eb; }
.ap-confirm-modal--success .ap-confirm-ico { color: #059669; }
.ap-confirm-modal--warning .ap-confirm-ico { color: #d97706; }
.ap-confirm-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  text-align: left;
}
.ap-confirm-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  cursor: pointer;
  background: #f8fafc;
}
.ap-confirm-choice:hover { border-color: #93c5fd; background: #eff6ff; }
.ap-confirm-choice.is-on {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}
html.dark body.ap-admin .ap-confirm-choice,
html.dark body.ap-publisher .ap-confirm-choice {
  border-color: #334155;
  background: #0f172a;
}
html.dark body.ap-admin .ap-confirm-choice.is-on,
html.dark body.ap-publisher .ap-confirm-choice.is-on {
  border-color: #3b82f6;
  background: #1e3a5f;
}
.ap-confirm-choice-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}
html.dark body.ap-admin .ap-confirm-choice-label,
html.dark body.ap-publisher .ap-confirm-choice-label { color: #f8fafc; }
.ap-confirm-choice-hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
}
html.dark body.ap-admin .ap-confirm-sub,
html.dark body.ap-publisher .ap-confirm-sub { color: #9ca3af; }
.ap-confirm-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
@media (min-width: 480px) {
  .ap-confirm-actions {
    flex-direction: row;
    justify-content: center;
  }
}
.ap-confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.55rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}
.ap-confirm-btn--cancel {
  background: #e5e7eb;
  color: #111827;
}
.ap-confirm-btn--cancel:hover { background: #d1d5db; }
html.dark body.ap-admin .ap-confirm-btn--cancel,
html.dark body.ap-publisher .ap-confirm-btn--cancel {
  background: #374151;
  color: #f3f4f6;
}
.ap-confirm-btn--ok { background: #2563eb; color: #fff; }
.ap-confirm-btn--ok:hover { background: #1d4ed8; }
.ap-confirm-btn--danger { background: #dc2626; color: #fff; }
.ap-confirm-btn--danger:hover { background: #b91c1c; }
.ap-confirm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ap-confirm-type-label {
  display: block;
  margin: 0.9rem 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  text-align: left;
}
html.dark body.ap-admin .ap-confirm-type-label,
html.dark body.ap-publisher .ap-confirm-type-label { color: #94a3b8; }
.ap-confirm-type-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.15rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  color: #0f172a;
  background: #fff;
}
html.dark body.ap-admin .ap-confirm-type-input,
html.dark body.ap-publisher .ap-confirm-type-input {
  border-color: #475569;
  background: #0f172a;
  color: #f8fafc;
}
.ap-confirm-type-input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.ra-aff-payout-page { max-width: 72rem; }
.ra-aff-payout-page .ra-advertisers-card {
  padding: 1.25rem 1.35rem !important;
  box-sizing: border-box;
}
.ra-aff-payout-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.ra-aff-payout-back:hover { background: #cbd5e1; color: #0f172a; }
html.dark body.ap-admin .ra-aff-payout-back { background: #334155; color: #f8fafc; }
.ra-aff-payout-back .material-symbols-outlined { font-size: 1.1rem; }
.ra-aff-payout-pub {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem !important;
  margin-bottom: 1rem;
}
.ra-aff-payout-pub div { display: flex; flex-direction: column; gap: 0.15rem; }
.ra-aff-payout-pub strong { font-size: 1.05rem; color: #0f172a; }
html.dark body.ap-admin .ra-aff-payout-pub strong { color: #f8fafc; }
.ra-aff-payout-pub span { font-size: 0.8125rem; color: #64748b; }
.ra-aff-payout-card {
  padding: 1.25rem 1.35rem !important;
  margin-bottom: 1.15rem;
}
.ra-aff-payout-card-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}
html.dark body.ap-admin .ra-aff-payout-card-title { color: #f8fafc; }
.ra-aff-payout-page .ra-advertisers-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.ra-aff-payout-page .ra-advertisers-form {
  margin-top: 0;
}
.ra-aff-payout-page .ra-advertisers-form-actions {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
}
.ra-aff-payout-ev-list { display: flex; flex-direction: column; gap: 0; }
.ra-aff-payout-page .ra-aff-payout-ev-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1rem;
  margin: 0 0 0.75rem;
  padding: 0.15rem 0 0.95rem;
  border-bottom: 1px dashed #e5e7eb;
  box-sizing: border-box;
}
html.dark body.ap-admin .ra-aff-payout-page .ra-aff-payout-ev-row { border-color: #4b5563; }
@media (min-width: 768px) {
  .ra-aff-payout-page .ra-aff-payout-ev-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
    align-items: end;
  }
}
.ra-aff-payout-page .ra-ev-field {
  min-width: 0;
}
.ra-aff-payout-page .ra-ev-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
html.dark body.ap-admin .ra-aff-payout-page .ra-ev-field label { color: #9ca3af; }
.ra-aff-payout-page .ra-ev-field input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  background: #fff;
}
html.dark body.ap-admin .ra-aff-payout-page .ra-ev-field input {
  background: #111827;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-aff-payout-page .ra-ev-field input[readonly] {
  background: #f8fafc;
  color: #334155;
}
html.dark body.ap-admin .ra-aff-payout-page .ra-ev-field input[readonly] {
  background: #0f172a;
  color: #cbd5e1;
}
.ra-aff-payout-page .ra-advertisers-table-wrap {
  margin: 0 -0.15rem;
  padding: 0 0.15rem;
}
.ra-aff-payout-page .ra-advertisers-table th,
.ra-aff-payout-page .ra-advertisers-table td {
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

/* Pending Payments */
.ra-pp-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
  width: 100%;
}
.ra-pp-filter .ra-reports-date-input {
  min-width: 10rem;
  height: 2.5rem;
  box-sizing: border-box;
}
.ra-pp-filter .ra-reports-apply-btn {
  width: auto;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
}
.ra-pp-dest {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 12rem;
  white-space: normal;
}
.ra-pp-dest-mode {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
}
html.dark body.ap-admin .ra-pp-dest-mode {
  background: #312e81;
  color: #e0e7ff;
}
.ra-pp-dest strong {
  font-size: 0.84rem;
  font-weight: 650;
  color: #0f172a;
}
html.dark body.ap-admin .ra-pp-dest strong { color: #f8fafc; }
.ra-pp-dest-sub {
  font-size: 0.75rem;
  color: #64748b;
  word-break: break-all;
}
html.dark body.ap-admin .ra-pp-dest-sub { color: #94a3b8; }
.ra-pp-pay {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  background: #2563eb;
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.ra-pp-pay:hover { background: #1d4ed8; }
a.ra-reports-page-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Publisher withdrawal */
.ra-wd-balance {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.15rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, #eab308, #a16207);
  color: #fff;
  box-shadow: 0 8px 24px rgba(161, 98, 7, 0.22);
}
.ra-wd-balance-ico {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.85rem;
  background: rgba(255,255,255,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ra-wd-balance-ico .material-symbols-outlined { font-size: 1.75rem; color: #fff; }
.ra-wd-balance-copy { min-width: 0; }
.ra-wd-balance-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}
.ra-wd-balance-amt {
  margin: 0.15rem 0 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ra-wd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
@media (min-width: 960px) {
  .ra-wd-grid { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}
.ra-wd-card { padding: 1.15rem 1.25rem 1.3rem; }
.ra-wd-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.ra-wd-card-head h3 {
  margin: 0;
  flex: 1 1 auto;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
}
.ra-wd-card-head .material-symbols-outlined { color: #2563eb; font-size: 22px; }
.ra-wd-edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ra-wd-edit-toggle .material-symbols-outlined {
  font-size: 1rem !important;
  line-height: 1;
  color: inherit !important;
}
.ra-wd-edit-toggle:hover { background: #dbeafe; }
.ra-wd-edit-toggle[hidden] { display: none !important; }
.ra-wd-fields .ra-wd-input[readonly] {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  cursor: default;
  color: #0f172a;
  font-weight: 650;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}
.ra-wd-fields .ra-wd-input.is-editing {
  background: #fff !important;
  border: 1px solid #93c5fd !important;
  cursor: text;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
html.dark body.ap-publisher .ra-wd-fields .ra-wd-input[readonly] {
  color: #e2e8f0;
  background: transparent !important;
}
html.dark body.ap-publisher .ra-wd-fields .ra-wd-input.is-editing {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #f3f4f6;
}
html.dark body.ap-publisher .ra-wd-edit-toggle {
  background: #172554;
  border-color: #1e40af;
  color: #93c5fd;
}
.ra-wd-method-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.ra-wd-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.ra-wd-methods.ra-wd-methods--one { grid-template-columns: 1fr; }
.ra-wd-method[hidden] { display: none !important; }
.ra-wd-method {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, color .15s;
}
.ra-wd-method .material-symbols-outlined { font-size: 22px; color: #64748b; }
.ra-wd-method:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.ra-wd-method.is-active {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}
.ra-wd-method.is-active .material-symbols-outlined { color: #fff; }
.ra-wd-fields { display: grid; gap: 0.7rem; margin-top: 0.95rem; }
.ra-wd-fields[hidden] { display: none !important; }
.ra-wd-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.3rem;
}
.ra-wd-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  background: #fff;
  color: #0f172a;
}
.ra-wd-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.ra-wd-redeem { display: flex; flex-direction: column; gap: 0.55rem; }
.ra-wd-amt-input { font-size: 1.15rem; font-weight: 700; }
.ra-wd-limit { margin: 0; font-size: 0.78rem; color: #64748b; }
.ra-wd-submit { width: 100%; margin-top: 0.4rem; min-height: 2.75rem; }
.ra-wd-pay-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}
.ra-wd-pay-actions[hidden] { display: none !important; }
.ra-wd-pay-save {
  min-height: 2.6rem;
  min-width: 9.5rem;
  padding: 0.65rem 1.15rem;
}
html.dark body.ap-publisher .ra-wd-card-head h3 { color: #e5e7eb; }
html.dark body.ap-publisher .ra-wd-method-label,
html.dark body.ap-publisher .ra-wd-field label,
html.dark body.ap-publisher .ra-wd-limit { color: #94a3b8; }
html.dark body.ap-publisher .ra-wd-method {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}
html.dark body.ap-publisher .ra-wd-method.is-active {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
}
html.dark body.ap-publisher .ra-wd-input {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}

/* ============================================================
   Global panel skin — admin + publisher (every page)
   One look: tile fields, gradient primary buttons, blue tables.
   ============================================================ */

body.ap-admin .ra-content,
body.ap-publisher .ra-content {
  --ap-skin-tile: #f1f5f9;
  --ap-skin-tile-border: #cbd5e1;
  --ap-skin-input-border: #94a3b8;
  --ap-skin-label: #334155;
  --ap-skin-text: #0f172a;
  --ap-skin-card: #fff;
  --ap-skin-primary: linear-gradient(135deg, #1d4ed8 0%, #1e40af 55%, #4c1d95 100%);
}

html.dark body.ap-admin .ra-content,
html.dark body.ap-publisher .ra-content {
  --ap-skin-tile: #1f2937;
  --ap-skin-tile-border: #374151;
  --ap-skin-input-border: #4b5563;
  --ap-skin-label: #94a3b8;
  --ap-skin-text: #f3f4f6;
  --ap-skin-card: #111827;
}

/* Title icon badges (all pages using the strip / postback title) */
body.ap-admin .ra-content .ra-postback-title-ico,
body.ap-publisher .ra-content .ra-postback-title-ico {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  font-size: 1.25rem !important;
  color: #fff !important;
  background: linear-gradient(165deg, #16a34a, #14532d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(20, 83, 45, 0.4);
}

/* Shared colorful label icon used on tiles */
.ra-ev-ico {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.38rem;
  font-size: 0.85rem !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  box-shadow: 0 3px 8px rgba(30, 58, 138, 0.4);
}

/* Cards */
body.ap-admin .ra-content .ap-card,
body.ap-publisher .ra-content .ap-card,
body.ap-admin .ra-content .ra-postback-card,
body.ap-admin .ra-content .ra-advertisers-card,
body.ap-publisher .ra-content .ra-reports-card,
body.ap-admin .ra-content .ra-reports-card,
body.ap-publisher .ra-content .ra-pb-card {
  background: var(--ap-skin-card);
  border: 1px solid #cbd5e1;
  border-radius: 0.875rem;
  box-shadow: 0 4px 6px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.1);
}
html.dark body.ap-admin .ra-content .ap-card,
html.dark body.ap-publisher .ra-content .ap-card,
html.dark body.ap-admin .ra-content .ra-postback-card,
html.dark body.ap-admin .ra-content .ra-advertisers-card,
html.dark body.ap-publisher .ra-content .ra-reports-card,
html.dark body.ap-admin .ra-content .ra-reports-card,
html.dark body.ap-publisher .ra-content .ra-pb-card {
  border-color: #374151;
}

.ra-postback-card-title,
.ra-advertisers-title,
.ra-postback-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
html.dark body.ap-admin .ra-postback-card-title,
html.dark body.ap-admin .ra-advertisers-title,
html.dark body.ap-admin .ra-postback-title { color: #f8fafc; }

/* Field tiles — every common wrapper class */
body.ap-admin .ra-content .ap-form-row,
body.ap-publisher .ra-content .ap-form-row,
body.ap-admin .ap-modal .ap-form-row,
body.ap-publisher .ap-modal .ap-form-row,
body.ap-admin .ra-content .ra-postback-field,
body.ap-publisher .ra-content .ra-pb-field,
body.ap-admin .ra-content .ra-campaigns-form-field,
body.ap-publisher .ra-content .ra-campaigns-form-field,
body.ap-admin .ap-modal .ra-campaigns-form-field,
body.ap-publisher .ap-modal .ra-campaigns-form-field,
body.ap-admin .ra-content .ra-advertisers-field,
body.ap-admin .ap-modal .ra-advertisers-field,
body.ap-admin .ra-content .ra-pay-field,
body.ap-admin .ra-content .ra-wd-field,
body.ap-publisher .ra-content .ra-wd-field,
body.ap-admin .ra-content .ra-profile-field,
body.ap-admin .ra-content .bk-field,
body.ap-publisher .ra-content .bk-field,
body.ap-admin .ra-content .ra-telegram-field,
body.ap-admin .ra-content .cf-field,
body.ap-publisher .ra-content .cf-field,
body.ap-admin .ra-content label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
body.ap-admin .ra-content label:has(> select),
body.ap-admin .ra-content label:has(> .ap-select),
body.ap-admin .ra-content label:has(> textarea),
body.ap-publisher .ra-content label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
body.ap-publisher .ra-content label:has(> select),
body.ap-publisher .ra-content label:has(> .ap-select),
body.ap-publisher .ra-content label:has(> textarea) {
  background: var(--ap-skin-tile);
  border: 1px solid var(--ap-skin-tile-border);
  border-radius: 0.9rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-sizing: border-box;
}

body.ap-admin .ra-content .ap-form-row label,
body.ap-publisher .ra-content .ap-form-row label,
body.ap-admin .ra-content .ra-postback-label,
body.ap-publisher .ra-content .ra-pb-field label,
body.ap-admin .ra-content .ra-campaigns-form-field label,
body.ap-publisher .ra-content .ra-campaigns-form-field label,
body.ap-admin .ap-modal .ra-campaigns-form-field label,
body.ap-publisher .ap-modal .ra-campaigns-form-field label,
body.ap-admin .ra-content .ra-advertisers-label,
body.ap-admin .ap-modal .ra-advertisers-label,
body.ap-admin .ra-content .ra-wd-field label,
body.ap-publisher .ra-content .ra-wd-field label,
body.ap-admin .ra-content .ra-profile-label,
body.ap-admin .ra-content .bk-field > span,
body.ap-admin .ra-content .ra-telegram-label,
body.ap-admin .ra-content .cf-field > span,
body.ap-publisher .ra-content .cf-field > span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ap-skin-label);
}

.ra-campaigns-form-input,
body.ap-admin .ra-content .ap-form-row input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not(.ap-select-trigger-input),
body.ap-admin .ra-content .ap-form-row select,
body.ap-admin .ra-content .ap-form-row textarea,
body.ap-publisher .ra-content .ap-form-row input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not(.ap-select-trigger-input),
body.ap-publisher .ra-content .ap-form-row select,
body.ap-publisher .ra-content .ap-form-row textarea,
body.ap-admin .ra-content .ra-postback-select,
body.ap-admin .ra-content .ra-postback-input,
body.ap-admin .ra-content .ra-postback-textarea,
body.ap-publisher .ra-content .ra-pb-textarea,
body.ap-admin .ra-content .ra-advertisers-input,
body.ap-admin .ap-modal .ra-advertisers-input,
body.ap-admin .ra-content .ra-pay-control,
body.ap-admin .ra-content .ra-wd-input,
body.ap-publisher .ra-content .ra-wd-input,
body.ap-admin .ra-content .bk-input,
body.ap-admin .ra-content .bk-select,
body.ap-admin .ra-content .bk-textarea,
body.ap-admin .ra-content .ra-telegram-input,
body.ap-admin .ra-content .cf-field input,
body.ap-admin .ra-content .cf-field select,
body.ap-admin .ra-content .cf-field textarea,
body.ap-publisher .ra-content .cf-field input,
body.ap-publisher .ra-content .cf-field select,
body.ap-publisher .ra-content .cf-field textarea,
body.ap-admin .ra-content label > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not(.ap-select-trigger-input),
body.ap-admin .ra-content label > select,
body.ap-admin .ra-content label > textarea,
body.ap-publisher .ra-content label > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not(.ap-select-trigger-input),
body.ap-publisher .ra-content label > select,
body.ap-publisher .ra-content label > textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: #fff !important;
  border: 1px solid var(--ap-skin-input-border) !important;
  border-radius: 0.7rem !important;
  padding: 0.62rem 0.8rem !important;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ap-skin-text) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  outline: none;
}
html.dark body.ap-admin .ra-content .ra-postback-select,
html.dark body.ap-admin .ra-content .ra-postback-input,
html.dark body.ap-admin .ra-content .ra-postback-textarea,
html.dark body.ap-admin .ra-content .ra-advertisers-input,
html.dark body.ap-admin .ra-content .ra-pay-control,
html.dark body.ap-admin .ra-content .cf-field input,
html.dark body.ap-admin .ra-content .cf-field select,
html.dark body.ap-admin .ra-content .cf-field textarea,
html.dark body.ap-publisher .ra-content .cf-field input,
html.dark body.ap-publisher .ra-content .cf-field select,
html.dark body.ap-publisher .ra-content .cf-field textarea,
html.dark body.ap-admin .ra-content label > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
html.dark body.ap-admin .ra-content label > select,
html.dark body.ap-admin .ra-content label > textarea,
html.dark body.ap-publisher .ra-content label > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
html.dark body.ap-publisher .ra-content label > select,
html.dark body.ap-publisher .ra-content label > textarea,
html.dark .ra-campaigns-form-input {
  background: #0f172a !important;
  border-color: #4b5563 !important;
  color: #f3f4f6 !important;
}

body.ap-admin .ra-content .ra-postback-select:focus,
body.ap-admin .ra-content .ra-postback-input:focus,
body.ap-admin .ra-content .ra-postback-textarea:focus,
body.ap-admin .ra-content .ra-advertisers-input:focus,
body.ap-admin .ra-content .ra-pay-control:focus,
body.ap-admin .ra-content .cf-field input:focus,
body.ap-admin .ra-content .cf-field select:focus,
body.ap-publisher .ra-content .cf-field input:focus,
body.ap-publisher .ra-content .cf-field select:focus,
.ra-campaigns-form-input:focus,
body.ap-admin .ra-content label > input:focus,
body.ap-admin .ra-content label > select:focus,
body.ap-admin .ra-content label > textarea:focus,
body.ap-publisher .ra-content label > input:focus,
body.ap-publisher .ra-content label > select:focus,
body.ap-publisher .ra-content label > textarea:focus {
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Keep search bars as a single compact control, not a tall tile */
body.ap-admin .ra-content .ra-advertisers-search-wrap,
body.ap-publisher .ra-content .ra-advertisers-search-wrap {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}
body.ap-admin .ra-content .ra-advertisers-search {
  padding-left: 1rem !important;
}

/* Icon-in-input (postback extra params) */
body.ap-admin .ra-content .ra-postback-input-icon-wrap {
  position: relative;
}
body.ap-admin .ra-content .ra-postback-input--icon {
  padding-left: 2.35rem !important;
}

/* Primary buttons */
body.ap-admin .ra-content .ap-btn:not(.ap-btn-secondary):not(.ap-btn-danger):not(.ap-btn-sm),
body.ap-publisher .ra-content .ap-btn:not(.ap-btn-secondary):not(.ap-btn-danger):not(.ap-btn-sm),
body.ap-admin .ra-content .ra-postback-btn--primary,
body.ap-admin .ra-content .ra-campaigns-btn--save,
body.ap-publisher .ra-content .ra-campaigns-btn--save,
body.ap-publisher .ra-content .ra-pb-save,
body.ap-admin .ra-content .ra-advertisers-btn--save,
body.ap-admin .ap-modal .ra-advertisers-btn--save,
body.ap-admin .ra-content .bk-btn-primary,
body.ap-admin .ra-content .cf-btn-primary,
body.ap-publisher .ra-content .cf-btn-primary,
body.ap-admin .ra-content .ra-telegram-btn--save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--ap-skin-primary) !important;
  color: #fff !important;
  border: none;
  border-radius: 0.7rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.45);
  transition: filter 0.15s, transform 0.12s, box-shadow 0.15s;
}
body.ap-admin .ra-content .ra-postback-btn--primary {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}
body.ap-admin .ra-content .ap-btn:not(.ap-btn-secondary):not(.ap-btn-danger):hover,
body.ap-admin .ra-content .ra-postback-btn--primary:hover:not(:disabled),
body.ap-admin .ra-content .ra-campaigns-btn--save:hover,
body.ap-publisher .ra-content .ra-campaigns-btn--save:hover,
body.ap-publisher .ra-content .ra-pb-save:hover,
body.ap-admin .ra-content .ra-advertisers-btn--save:hover,
body.ap-admin .ra-content .bk-btn-primary:hover:not(:disabled),
body.ap-admin .ra-content .cf-btn-primary:hover,
body.ap-publisher .ra-content .cf-btn-primary:hover {
  filter: brightness(1.08);
}
body.ap-admin .ra-content .ra-postback-btn--primary:disabled,
body.ap-admin .ra-content .ap-btn:disabled,
body.ap-publisher .ra-content .ra-campaigns-btn--save:disabled,
body.ap-publisher .ra-content .ra-pb-save:disabled {
  opacity: 0.88 !important;
  filter: saturate(1.05);
  box-shadow: 0 6px 14px rgba(30, 58, 138, 0.28);
}
body.ap-admin .ra-content .ra-advertisers-add-btn,
body.ap-publisher .ra-content .ra-advertisers-add-btn {
  background: linear-gradient(165deg, #16a34a, #14532d) !important;
  box-shadow: 0 10px 22px rgba(20, 83, 45, 0.4);
  border-radius: 0.7rem;
  font-weight: 700;
}

/* Tables — same blue header as reports */
body.ap-admin .ra-content .ap-table th,
body.ap-publisher .ra-content .ap-table th,
body.ap-admin .ra-content .ra-advertisers-table thead th,
body.ap-admin .ra-content .ra-requests-table thead th {
  background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%) !important;
  color: #f8fafc !important;
}

/* Modals */
body.ap-admin .ap-modal,
body.ap-publisher .ap-modal {
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

/* Admin postback card headings */
.ra-offers-react-strip .ra-postback-title { margin: 0; }
.ra-postback-card-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}
.ra-postback-card-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
html.dark body.ap-admin .ra-postback-card-head h2 { color: #f8fafc; }
.ra-postback-card-head p {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.45;
}
html.dark body.ap-admin .ra-postback-card-head p { color: #94a3b8; }

.ra-postback-field label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ra-postback-field .ra-ev-ico--adv { background: linear-gradient(165deg, #d97706, #92400e); }
.ra-postback-field .ra-ev-ico--evt { background: linear-gradient(165deg, #ea580c, #9a3412); }
.ra-postback-field .ra-ev-ico--pay { background: linear-gradient(165deg, #059669, #064e3b); }
.ra-postback-field .ra-ev-ico--extra { background: linear-gradient(165deg, #7c3aed, #4c1d95); }

/* Do not tile toggle / radio rows */
body.ap-admin .ra-content label:has(> input[type="checkbox"]),
body.ap-admin .ra-content label:has(> input[type="radio"]),
body.ap-publisher .ra-content label:has(> input[type="checkbox"]),
body.ap-publisher .ra-content label:has(> input[type="radio"]),
body.ap-admin .ra-content .cf-radio-row label,
body.ap-admin .ra-content .cf-switch,
body.ap-publisher .ra-content .cf-switch {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

/* Offer form already has its own tiles — don't double-pad */
#offer-form-panel .ap-form-row {
  margin-bottom: 0;
}

.ra-ledger-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1.1rem;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 600;
  border-top: 1px solid #eef2f7;
}
html.dark body.ap-admin .ra-ledger-pager {
  color: #94a3b8;
  border-top-color: #1f2937;
}

/* Admin profile — last-good card (hero + copy tiles) */
.ra-admin-profile-page .ra-offers-react-title-ico {
  background: linear-gradient(165deg, #059669, #064e3b);
  box-shadow: 0 6px 14px rgba(6, 78, 59, 0.4);
}
.ra-admin-profile-page .ra-pub-profile-grid {
  grid-template-columns: 1fr;
  width: 100%;
  max-width: none;
}
@media (min-width: 1100px) {
  .ra-admin-profile-page .ra-pub-profile-grid { grid-template-columns: 1fr; }
}
.ra-admin-profile-page .ra-pub-profile-main { width: 100%; }
.ra-admin-profile-page .ra-pub-profile-banner { height: 7.25rem; }
.ra-admin-profile-hero {
  position: relative;
  padding-bottom: 1.15rem;
}
.ra-admin-profile-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: -3.35rem;
  padding: 0 1.35rem;
  position: relative;
  z-index: 1;
}
.ra-admin-profile-page .ra-pub-profile-avatar {
  position: relative;
  left: auto;
  top: auto;
  width: 6.5rem;
  height: 6.5rem;
  margin: 0 auto 0.85rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  padding: 0;
}
.ra-admin-profile-page .ra-pub-profile-identity-text { width: 100%; }
.ra-admin-profile-page .ra-pub-profile-identity-name,
.ra-admin-profile-page .ra-pub-profile-identity-email {
  text-align: center;
  white-space: normal;
}
.ra-admin-profile-page .ra-pub-profile-identity-name { font-size: 1.35rem; }
.ra-admin-profile-edit {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  z-index: 2;
}
.ra-admin-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
  image-rendering: auto;
}
.ra-admin-profile-avatar-img[hidden] { display: none !important; }
.ra-admin-profile-avatar-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.2rem;
  font-weight: 700;
  color: #2563eb;
}
.ra-admin-profile-avatar-letter[hidden] { display: none !important; }
.ra-admin-profile-upload {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s;
  pointer-events: none;
}
.ra-admin-profile-upload[hidden] { display: none !important; }
.ra-admin-profile-upload .material-symbols-outlined { font-size: 1.15rem !important; }
.ra-admin-profile-avatar.is-editing-avatar .ra-admin-profile-upload { pointer-events: auto; }
.ra-admin-profile-avatar.is-editing-avatar:hover .ra-admin-profile-upload { opacity: 1; }
.ra-admin-profile-val {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.ra-admin-profile-copy {
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.15rem;
  display: inline-flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}
.ra-admin-profile-copy .material-symbols-outlined { font-size: 1rem !important; }
.ra-admin-profile-copy:hover { color: #2563eb; }
.ra-admin-profile-copied {
  position: absolute;
  right: 0;
  top: -1.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #059669;
  white-space: nowrap;
}
.ra-admin-profile-hint {
  margin: 0 1.35rem 1.35rem;
  font-size: 0.75rem;
  color: #94a3b8;
}
.ra-admin-profile-page .ra-pub-profile-rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1.15rem 1.35rem 1.35rem;
}
@media (min-width: 900px) {
  .ra-admin-profile-page .ra-pub-profile-rows {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
  .ra-admin-profile-page .ra-pub-profile-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 1rem 1rem 1.05rem;
    min-height: 7.5rem;
  }
  .ra-admin-profile-page .ra-pub-profile-row-lab {
    max-width: none;
    flex: none;
  }
  .ra-admin-profile-page .ra-admin-profile-val {
    justify-content: flex-start;
    width: 100%;
  }
  .ra-admin-profile-page .ra-pub-profile-pay-input {
    width: 100%;
    text-align: left;
  }
}
.ra-admin-profile-page .ra-pub-profile-save-main {
  margin: 0 1.35rem 1.35rem;
  width: calc(100% - 2.7rem);
  max-width: 16rem;
}
.ra-pub-offer-msg.is-success {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.ra-pub-offer-msg.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
html.dark body.ap-admin .ra-pub-profile-main,
html.dark body.ap-admin .ra-pub-profile-pay-card {
  background: #111827;
  border-color: #374151;
}
html.dark body.ap-admin .ra-pub-profile-identity-name { color: #f8fafc; }
html.dark body.ap-admin .ra-pub-profile-identity-email { color: #94a3b8; }
html.dark body.ap-admin .ra-pub-profile-row,
html.dark body.ap-admin .ra-pub-profile-pay-row {
  background: #1f2937;
  border-color: #374151;
}
html.dark body.ap-admin .ra-pub-profile-row:hover,
html.dark body.ap-admin .ra-pub-profile-pay-row:hover { background: #273549; }
html.dark body.ap-admin .ra-pub-profile-row-name { color: #94a3b8; }
html.dark body.ap-admin .ra-pub-profile-pay-input { color: #e5e7eb; }
html.dark body.ap-admin .ra-pub-profile-avatar { border-color: #111827; }
html.dark body.ap-admin .ra-pub-profile-edit-toggle {
  background: rgba(37, 99, 235, 0.18);
  border-color: #1e3a8a;
  color: #93c5fd;
}
html.dark body.ap-admin .ra-pub-profile-edit-toggle--main {
  background: linear-gradient(165deg, #3b82f6, #1d4ed8);
  color: #fff;
  border: 0;
}
html.dark body.ap-admin .ra-admin-profile-hint { color: #64748b; }
html.dark body.ap-admin .ra-admin-profile-avatar-letter { color: #93c5fd; }

/* ===== last-good restore 2026-08-22 missing skins ===== */
/* ===== Advertisers page — modern queue skin (v125) ===== */
.ra-advertisers-page {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ra-offers-react-strip-inner:has(.ra-advertisers-toolbar) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}
.ra-advertisers-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}
.ra-advertisers-search-wrap {
  position: relative;
  min-width: 14rem;
  flex: 1 1 14rem;
  max-width: 22rem;
}
.ra-advertisers-search-ico {
  display: none !important;
}
.ra-advertisers-search,
.ra-advertisers-search:focus {
  width: 100%;
  box-sizing: border-box;
  padding: 0 1rem !important;
  height: 2.5rem;
  font-size: 0.875rem;
  font-weight: 550;
  border: 1px solid #86efac !important;
  border-radius: 0.5rem !important;
  background: #fff !important;
  color: #0f172a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12) !important;
}
html.dark body.ap-admin .ra-advertisers-search,
html.dark body.ap-admin .ra-advertisers-search:focus {
  background: #0f172a !important;
  border-color: #86efac !important;
  color: #f8fafc;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18) !important;
}
.ra-advertisers-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.1rem !important;
  border-radius: 0.75rem !important;
  font-weight: 750 !important;
  background: linear-gradient(165deg, #22c55e, #15803d) !important;
  box-shadow: 0 8px 18px rgba(21, 128, 61, 0.28);
}
.ra-advertisers-add-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ra-advertisers-card {
  background: #fff !important;
  border-radius: 1rem !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06) !important;
  padding: 0 !important;
  overflow: hidden;
}
html.dark body.ap-admin .ra-advertisers-card {
  background: #111827 !important;
  border-color: #1f2937;
}
.ra-advertisers-panel-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
}
html.dark body.ap-admin .ra-advertisers-panel-head { border-bottom-color: #1f2937; }
.ra-advertisers-panel-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.ra-advertisers-panel-head h2 .material-symbols-outlined {
  font-size: 1.25rem;
  color: #2563eb;
}
html.dark body.ap-admin .ra-advertisers-panel-head h2 { color: #f8fafc; }
.ra-advertisers-panel-head p {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}
html.dark body.ap-admin .ra-advertisers-panel-head p { color: #94a3b8; }
.ra-advertisers-table td {
  padding: 0.95rem 1rem !important;
}
.ra-advertisers-table td.ra-adv-cell-wrap {
  white-space: normal !important;
}
.ra-adv-id-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 0.45rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
html.dark body.ap-admin .ra-adv-id-chip {
  background: #172554;
  border-color: #1e40af;
  color: #93c5fd;
}
.ra-adv-person {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.ra-adv-avatar {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.28);
}
.ra-adv-person-name {
  font-weight: 700;
  color: #0f172a;
}
html.dark body.ap-admin .ra-adv-person-name { color: #f1f5f9; }
.ra-adv-chip {
  display: inline-flex;
  align-items: center;
  margin: 0.12rem 0.15rem 0.12rem 0;
  padding: 0.2rem 0.5rem;
  border-radius: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ra-adv-chip--click {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #6d28d9;
}
.ra-adv-chip--ip {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0e7490;
}
html.dark body.ap-admin .ra-adv-chip--click {
  background: #2e1065;
  border-color: #5b21b6;
  color: #c4b5fd;
}
html.dark body.ap-admin .ra-adv-chip--ip {
  background: #083344;
  border-color: #155e75;
  color: #67e8f9;
}
.ra-adv-token {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
html.dark body.ap-admin .ra-adv-token {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
.ra-adv-empty { color: #94a3b8; font-weight: 600; }
.ra-adv-act {
  display: inline-flex !important;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  border-radius: 0.5rem !important;
}
.ra-adv-act .material-symbols-outlined {
  font-size: 0.95rem !important;
  line-height: 1;
}
.ra-adv-act:hover { transform: translateY(-1px); }
.ra-adv-act--reset { background: linear-gradient(165deg, #3b82f6, #1d4ed8) !important; }
.ra-adv-act--edit { background: linear-gradient(165deg, #fbbf24, #d97706) !important; }
.ra-adv-act--delete { background: linear-gradient(165deg, #f87171, #dc2626) !important; }
.ra-advertisers-count {
  margin: 0 !important;
  padding: 0.85rem 1.25rem 1.1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  border-top: 1px solid #eef2f7;
}
html.dark body.ap-admin .ra-advertisers-count {
  color: #94a3b8;
  border-top-color: #1f2937;
}
.ra-advertisers-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.ra-advertisers-modal-ico {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}
.ra-advertisers-modal-head .ra-offer-modal-close { margin-left: auto; }
.ra-advertisers-modal-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
}
html.dark body.ap-admin .ra-advertisers-modal-sub { color: #94a3b8; }
.ra-advertisers-modal-title {
  margin: 0;
  font-size: 1.125rem !important;
  font-weight: 800 !important;
  color: #0f172a;
  letter-spacing: -0.02em;
}
html.dark body.ap-admin .ra-advertisers-modal-title { color: #f8fafc; }
.ra-advertisers-label {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
}
.ra-advertisers-btn {
  border-radius: 0.65rem !important;
  font-weight: 700 !important;
  padding: 0.55rem 1.05rem !important;
}
.ra-advertisers-btn--save {
  background: linear-gradient(165deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
}
@media (max-width: 720px) {
  .ra-advertisers-toolbar { width: 100%; margin-left: 0; }
  .ra-advertisers-search-wrap { max-width: none; }
}

/* Requests page — modern queue skin */
.ra-requests-page {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ra-requests-title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}
html.dark body.ap-admin .ra-requests-title { color: #f3f4f6; }
.ra-requests-toast {
  margin: 0;
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.ra-requests-toast[hidden] { display: none !important; }
.ra-requests-toast.is-success {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.ra-requests-toast.is-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
html.dark body.ap-admin .ra-requests-toast.is-success {
  background: rgba(6, 78, 59, 0.4);
  color: #86efac;
  border-color: #15803d;
}
html.dark body.ap-admin .ra-requests-toast.is-error {
  background: rgba(127, 29, 29, 0.4);
  color: #fca5a5;
  border-color: #b91c1c;
}
.ra-requests-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0.35rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}
html.dark body.ap-admin .ra-requests-tabs {
  background: #0f172a;
  border-color: #1e293b;
}
.ra-requests-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 650;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  cursor: pointer;
  background: transparent;
  color: #475569;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.ra-requests-tab-ico {
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.85;
}
.ra-requests-tab:hover {
  background: #fff;
  color: #1e3a8a;
  border-color: #cbd5e1;
}
.ra-requests-tab.is-active {
  background: linear-gradient(165deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}
.ra-requests-tab.is-active .ra-requests-tab-ico { opacity: 1; }
html.dark body.ap-admin .ra-requests-tab {
  color: #94a3b8;
}
html.dark body.ap-admin .ra-requests-tab:hover {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
html.dark body.ap-admin .ra-requests-tab.is-active {
  background: linear-gradient(165deg, #3b82f6, #1d4ed8);
  color: #fff;
}
.ra-tab-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}
.ra-requests-tab.is-active .ra-tab-unread {
  background: #fff;
  color: #dc2626;
}
.ra-stat-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ra-stat-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.ra-stat-card {
  position: relative;
}
.ra-stat-unread {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.ra-requests-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  padding: 0;
  color: #1f2937;
  overflow: hidden;
}
html.dark body.ap-admin .ra-requests-card {
  background: #111827;
  color: #e5e7eb;
  border-color: #1f2937;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.ra-requests-panel-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
}
html.dark body.ap-admin .ra-requests-panel-head {
  border-bottom-color: #1f2937;
}
.ra-requests-panel-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.ra-requests-panel-head h2 .material-symbols-outlined {
  font-size: 1.25rem;
  color: #2563eb;
}
html.dark body.ap-admin .ra-requests-panel-head h2 { color: #f8fafc; }
.ra-requests-panel-head p {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}
html.dark body.ap-admin .ra-requests-panel-head p { color: #94a3b8; }
.ra-requests-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
}
.ra-requests-loading[hidden] { display: none !important; }
.ra-requests-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ra-adv-spin 0.7s linear infinite;
}
html.dark body.ap-admin .ra-requests-spinner {
  border-color: #374151;
  border-top-color: #3b82f6;
}
.ra-requests-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 0.35rem;
}
.ra-requests-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}
.ra-requests-table thead th {
  background: #0f172a;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.85rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 0;
}
html.dark body.ap-admin .ra-requests-table thead th {
  background: #020617;
  color: #e2e8f0;
}
.ra-requests-table td {
  padding: 0.95rem 1rem;
  font-size: 0.84rem;
  color: #0f172a;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 16rem;
}
#rq-panel-payment .ra-requests-table {
  min-width: 1080px;
}
#rq-panel-payment .ra-requests-table td.ra-req-payout {
  white-space: normal;
  word-break: break-word;
  max-width: 20rem;
  min-width: 14rem;
  overflow: visible;
  text-overflow: unset;
}
#rq-panel-payment .ra-requests-table td.ra-req-utr-cell,
#rq-panel-payment .ra-requests-table td.ra-req-time,
#rq-panel-payment .ra-requests-table td.ra-requests-td-id,
.ra-requests-table td.ra-requests-td-id {
  max-width: none;
  overflow: visible;
  text-overflow: unset;
}
.ra-req-id-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 0.45rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
html.dark body.ap-admin .ra-req-id-chip {
  background: #172554;
  border-color: #1e40af;
  color: #93c5fd;
}
.ra-req-person {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
}
.ra-req-avatar {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.28);
}
.ra-req-person-name {
  font-weight: 650;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.dark body.ap-admin .ra-req-person-name { color: #f1f5f9; }
.ra-req-offer-name {
  font-weight: 650;
  color: #0f172a;
}
html.dark body.ap-admin .ra-req-offer-name { color: #e2e8f0; }
.ra-req-amt-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 0.55rem;
  background: linear-gradient(165deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  color: #047857;
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
html.dark body.ap-admin .ra-req-amt-chip {
  background: #052e2b;
  border-color: #115e59;
  color: #5eead4;
}
.ra-req-payout-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.7rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-width: 12rem;
}
html.dark body.ap-admin .ra-req-payout-card {
  background: #0f172a;
  border-color: #1e293b;
}
.ra-req-payout-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ra-req-payout-mode .material-symbols-outlined {
  font-size: 0.95rem;
  line-height: 1;
}
.ra-req-payout-mode--imps {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.ra-req-payout-mode--upi {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
html.dark body.ap-admin .ra-req-payout-mode--imps {
  background: #172554;
  color: #93c5fd;
  border-color: #1e40af;
}
html.dark body.ap-admin .ra-req-payout-mode--upi {
  background: #2e1065;
  color: #c4b5fd;
  border-color: #5b21b6;
}
.ra-req-payout-line {
  display: block;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #334155;
  white-space: normal;
  word-break: break-word;
}
.ra-req-payout-line strong {
  color: #64748b;
  font-weight: 650;
  margin-right: 0.25rem;
}
.ra-req-payout-line code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
  padding: 0;
}
html.dark body.ap-admin .ra-req-payout-line { color: #cbd5e1; }
html.dark body.ap-admin .ra-req-payout-line strong { color: #94a3b8; }
html.dark body.ap-admin .ra-req-payout-line code { color: #f8fafc; }
.ra-req-time {
  font-size: 0.78rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
html.dark body.ap-admin .ra-req-time { color: #94a3b8; }
.ra-req-utr {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  border-radius: 0.5rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.75rem;
  font-weight: 750;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
}
.ra-req-utr-empty,
.ra-req-actions-empty {
  color: #94a3b8;
  font-weight: 600;
}
.ra-req-status-pill--ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.ra-req-status-pill--bad {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.ra-req-status-pill--wait {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
html.dark body.ap-admin .ra-req-utr {
  background: #052e2b;
  border-color: #115e59;
  color: #5eead4;
}
html.dark body.ap-admin .ra-requests-table td {
  color: #e5e7eb;
  border-bottom-color: #1f2937;
  background: #111827;
}
.ra-requests-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}
html.dark body.ap-admin .ra-requests-table tbody tr:nth-child(even) td {
  background: #0f172a;
}
.ra-requests-table tbody tr:hover td {
  background: #eff6ff !important;
}
html.dark body.ap-admin .ra-requests-table tbody tr:hover td {
  background: #172554 !important;
}
.ra-requests-table tbody tr.is-deleting {
  opacity: 0.4;
  transform: scale(0.99);
  transition: opacity 0.3s, transform 0.3s;
}
.ra-requests-td-id {
  font-weight: 500;
  color: #111827;
}
html.dark body.ap-admin .ra-requests-td-id { color: #f9fafb; }
.ra-requests-empty {
  text-align: center;
  color: #9ca3af;
  padding: 2.5rem 1rem !important;
  opacity: 0.85;
  white-space: normal !important;
  max-width: none !important;
}
.ra-req-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.ra-req-act {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.12s;
}
.ra-req-act:hover:not(:disabled) { transform: translateY(-1px); }
.ra-req-act:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ra-req-act--accept { background: linear-gradient(165deg, #22c55e, #16a34a); }
.ra-req-act--accept:hover:not(:disabled) { background: #15803d; }
.ra-req-act--reject { background: linear-gradient(165deg, #f87171, #ef4444); }
.ra-req-act--reject:hover:not(:disabled) { background: #dc2626; }
.ra-req-act--delete { background: linear-gradient(165deg, #ef4444, #b91c1c); }
.ra-req-act--delete:hover:not(:disabled) { background: #991b1b; }
html.dark body.ap-admin .ra-req-act--accept { background: #16a34a; }
html.dark body.ap-admin .ra-req-act--reject,
html.dark body.ap-admin .ra-req-act--delete { background: #dc2626; }
.ra-req-act-spin {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ra-adv-spin 0.6s linear infinite;
}
.ra-req-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 750;
  border-radius: 9999px;
  text-transform: capitalize;
  background: #e2e8f0;
  color: #475569;
  border: 1px solid transparent;
}
html.dark body.ap-admin .ra-req-status-pill {
  background: #334155;
  color: #cbd5e1;
}
.ra-requests-overlay.ap-modal-overlay {
  background: rgba(15, 23, 42, 0.55);
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.ra-requests-modal.ap-modal,
.ra-requests-delete-modal.ap-modal {
  max-width: 28rem;
  width: 100%;
  padding: 1.35rem;
  border-radius: 1rem;
}
.ra-requests-modal--pay {
  max-width: 30rem;
}
.ra-requests-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.ra-requests-modal-ico {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}
.ra-requests-modal-ico--danger {
  background: linear-gradient(165deg, #f87171, #dc2626);
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.28);
}
.ra-requests-modal-body {
  margin-top: 1.1rem;
}
.ra-requests-delete-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
html.dark body.ap-admin .ra-requests-delete-title { color: #f3f4f6; }
.ra-requests-delete-sub {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}
html.dark body.ap-admin .ra-requests-delete-sub { color: #9ca3af; }
.ra-requests-delete-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap-reverse;
  gap: 0.55rem;
  margin-top: 1.35rem;
}
.ra-requests-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  border-radius: 0.65rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.12s;
}
.ra-requests-btn .material-symbols-outlined {
  font-size: 1.1rem;
  line-height: 1;
}
.ra-requests-btn:hover:not(:disabled) { transform: translateY(-1px); }
.ra-requests-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ra-requests-btn--cancel {
  background: #e2e8f0;
  color: #0f172a;
}
.ra-requests-btn--cancel:hover:not(:disabled) { background: #cbd5e1; }
html.dark body.ap-admin .ra-requests-btn--cancel {
  background: #374151;
  color: #f3f4f6;
}
html.dark body.ap-admin .ra-requests-btn--cancel:hover:not(:disabled) { background: #4b5563; }
.ra-requests-btn--danger {
  background: linear-gradient(165deg, #ef4444, #b91c1c);
  color: #fff;
}
.ra-requests-btn--danger:hover:not(:disabled) { background: #991b1b; }
.ra-requests-btn--pay {
  background: linear-gradient(165deg, #22c55e, #15803d);
  color: #fff;
  box-shadow: 0 8px 16px rgba(21, 128, 61, 0.28);
}
.ra-requests-btn--pay:hover:not(:disabled) { background: #166534; }
.ra-requests-btn-spin {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ra-adv-spin 0.6s linear infinite;
}
.ra-requests-btn-spin[hidden] { display: none !important; }
@media (max-width: 720px) {
  .ra-requests-tabs { gap: 0.4rem; }
  .ra-requests-tab {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.55rem 0.7rem;
    font-size: 0.8rem;
  }
  .ra-requests-tab-label { display: none; }
}

/* ============================================================
   Panel date picker (replaces native calendar popup)
   ============================================================ */
input[type="date"].ap-date-input {
  position: relative;
  cursor: pointer;
  color-scheme: light;
  caret-color: transparent;
}
input[type="date"].ap-date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
input[type="date"].ap-date-input::-webkit-inner-spin-button,
input[type="date"].ap-date-input::-webkit-clear-button {
  display: none;
}

.ap-datepicker {
  position: absolute;
  z-index: 12000;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 0.85rem 0.9rem 0.75rem;
  font-family: inherit;
  color: #0f172a;
  user-select: none;
}
.ap-datepicker[hidden] { display: none !important; }
.ap-datepicker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.ap-datepicker-month-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 0.5rem;
}
.ap-datepicker-month-btn:hover { background: #f1f5f9; }
.ap-datepicker-month-btn .material-symbols-outlined {
  font-size: 1.15rem !important;
  color: #64748b;
}
.ap-datepicker-nav {
  display: inline-flex;
  gap: 0.15rem;
}
.ap-datepicker-nav-btn {
  width: 1.85rem;
  height: 1.85rem;
  border: 0;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ap-datepicker-nav-btn:hover {
  background: #e2e8f0;
  color: #1d4ed8;
}
.ap-datepicker-nav-btn .material-symbols-outlined { font-size: 1.15rem !important; }
.ap-datepicker-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
  margin-bottom: 0.35rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #64748b;
  text-transform: uppercase;
}
.ap-datepicker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.2rem;
}
.ap-datepicker-day {
  aspect-ratio: 1;
  min-height: 2.1rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.ap-datepicker-day:hover:not(:disabled):not(.is-selected) {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.ap-datepicker-day.is-muted { color: #94a3b8; font-weight: 500; }
.ap-datepicker-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px #93c5fd;
}
.ap-datepicker-day.is-selected {
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(30, 58, 138, 0.35);
  font-weight: 800;
}
.ap-datepicker-day.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.ap-datepicker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
}
.ap-datepicker-link {
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.3rem 0.55rem;
  border-radius: 0.5rem;
}
.ap-datepicker-link:hover { background: #eff6ff; }
.ap-datepicker-link--accent {
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  color: #fff;
  box-shadow: 0 6px 12px rgba(30, 58, 138, 0.3);
}
.ap-datepicker-link--accent:hover {
  filter: brightness(1.06);
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  color: #fff;
}
.ap-datepicker-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.ap-datepicker-months[hidden] { display: none !important; }
.ap-datepicker-month-opt {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0.55rem;
  padding: 0.55rem 0.35rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}
.ap-datepicker-month-opt:hover { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; }
.ap-datepicker-month-opt.is-active {
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  color: #fff;
  border-color: transparent;
}
.ap-datepicker.is-months .ap-datepicker-week,
.ap-datepicker.is-months .ap-datepicker-grid { display: none; }

html.dark .ap-datepicker {
  background: #111827;
  border-color: #374151;
  color: #f8fafc;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
html.dark .ap-datepicker-month-btn { color: #f8fafc; }
html.dark .ap-datepicker-month-btn:hover { background: #1f2937; }
html.dark .ap-datepicker-nav-btn { background: #1f2937; color: #e5e7eb; }
html.dark .ap-datepicker-nav-btn:hover { background: #273549; color: #93c5fd; }
html.dark .ap-datepicker-week { color: #94a3b8; }
html.dark .ap-datepicker-day { color: #e5e7eb; }
html.dark .ap-datepicker-day.is-muted { color: #64748b; }
html.dark .ap-datepicker-day:hover:not(:disabled):not(.is-selected) {
  background: #1e293b;
  border-color: #1e3a8a;
  color: #93c5fd;
}
html.dark .ap-datepicker-foot { border-top-color: #374151; }
html.dark .ap-datepicker-link { color: #93c5fd; }
html.dark .ap-datepicker-link:hover { background: #1e293b; }
html.dark .ap-datepicker-month-opt {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}
html.dark .ap-datepicker-month-opt:hover {
  background: #273549;
  border-color: #1e3a8a;
  color: #93c5fd;
}

.ap-datepicker-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex-wrap: wrap;
}
.ap-datepicker-year-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1d4ed8;
  cursor: pointer;
  padding: 0.28rem 0.5rem;
  border-radius: 9999px;
}
.ap-datepicker-year-btn:hover { background: #dbeafe; }
.ap-datepicker-year-btn .material-symbols-outlined {
  font-size: 1.05rem !important;
  color: #2563eb;
}
.ap-datepicker-years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.ap-datepicker-years[hidden] { display: none !important; }
.ap-datepicker-year-opt {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0.55rem;
  padding: 0.65rem 0.35rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}
.ap-datepicker-year-opt:hover { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; }
.ap-datepicker-year-opt.is-active {
  background: linear-gradient(165deg, #2563eb, #1e3a8a);
  color: #fff;
  border-color: transparent;
}
.ap-datepicker.is-years .ap-datepicker-week,
.ap-datepicker.is-years .ap-datepicker-grid,
.ap-datepicker.is-years .ap-datepicker-months { display: none !important; }
.ap-datepicker.is-months .ap-datepicker-years { display: none !important; }
html.dark .ap-datepicker-year-btn {
  background: rgba(37, 99, 235, 0.18);
  border-color: #1e3a8a;
  color: #93c5fd;
}
html.dark .ap-datepicker-year-btn .material-symbols-outlined { color: #93c5fd; }
html.dark .ap-datepicker-year-opt {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}
html.dark .ap-datepicker-year-opt:hover {
  background: #273549;
  border-color: #1e3a8a;
  color: #93c5fd;
}

/* Requests table overflow for chip cells */
.ra-requests-table td:has(.ra-req-person),
.ra-requests-table td:has(.ra-req-actions),
.ra-requests-table td:has(.ra-req-amt-chip),
.ra-requests-table td:has(.ra-req-status-pill) {
  max-width: none;
  overflow: visible;
  text-overflow: unset;
}

/* Wallet / request status pills */
.ra-status-pill--pending,
.ra-status-pill--Pending {
  background: #ffedd5;
  color: #9a3412;
}
.ra-status-pill--approved,
.ra-status-pill--Approved,
.ra-status-pill--success,
.ra-status-pill--restored,
.ra-status-pill--Restored {
  background: #dcfce7;
  color: #166534;
}
.ra-status-pill--rejected,
.ra-status-pill--Rejected,
.ra-status-pill--failed {
  background: #fee2e2;
  color: #991b1b;
}
.ra-status-pill--refunded,
.ra-status-pill--Refunded {
  background: #e0e7ff;
  color: #3730a3;
}

.ra-pay-field-lab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}
.ra-pay-submit-label { display: inline-flex; align-items: center; }

.ra-notify-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
}
.ra-notify-submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.ra-telegram-btn--conv {
  background: linear-gradient(165deg, #0f766e, #115e59) !important;
}
.ra-telegram-btn--conv:hover:not(:disabled) {
  filter: brightness(1.08);
}

.ra-wd-balance-hint {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.88;
  max-width: 36rem;
}
.ra-wd-empty-hint {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: #b45309;
}
.ra-wd-empty-hint a { font-weight: 700; color: #1d4ed8; }
html.dark body.ap-publisher .ra-wd-empty-hint { color: #fbbf24; }

.ra-pub-profile-rows-head {
  display: flex;
  justify-content: flex-end;
  padding: 1.65rem 1rem 0;
}

/* Colorful conversion chips used by older report rows */
.ra-chip--offer {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.ra-chip--id {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
}
.ra-chip--pub {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #c4b5fd;
}
.ra-chip--upi {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
}
.ra-chip--click {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  max-width: 220px;
}
.ra-chip--city {
  background: #f3f4f6;
  color: #4b5563;
  border-color: #d1d5db;
}
.ra-chip--money {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
  font-weight: 800;
}
.ra-chip--money-zero {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #d1d5db;
}
.ra-chip--date {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
  font-weight: 600;
}
html.dark body.ap-admin .ra-chip--offer { background: rgba(30, 64, 175, 0.35); color: #93c5fd; border-color: #1d4ed8; }
html.dark body.ap-admin .ra-chip--id { background: rgba(51, 65, 85, 0.5); color: #cbd5e1; border-color: #475569; }
html.dark body.ap-admin .ra-chip--pub { background: rgba(91, 33, 182, 0.35); color: #ddd6fe; border-color: #7c3aed; }
html.dark body.ap-admin .ra-chip--upi { background: rgba(3, 105, 161, 0.35); color: #7dd3fc; border-color: #0284c7; }
html.dark body.ap-admin .ra-chip--click { background: rgba(180, 83, 9, 0.35); color: #fcd34d; border-color: #d97706; }
html.dark body.ap-admin .ra-chip--city { background: rgba(55, 65, 81, 0.5); color: #d1d5db; border-color: #4b5563; }
html.dark body.ap-admin .ra-chip--money { background: rgba(21, 128, 61, 0.35); color: #86efac; border-color: #16a34a; }
html.dark body.ap-admin .ra-chip--money-zero { background: rgba(55, 65, 81, 0.5); color: #9ca3af; border-color: #4b5563; }
html.dark body.ap-admin .ra-chip--date { background: rgba(126, 34, 206, 0.35); color: #e9d5ff; border-color: #a855f7; }

/* Alias / leftover modifier classes used in last-good markup */
.ap-wait-coin--1 { right: 34%; animation-delay: 0s; }
.ra-reports-table-card { padding: 0 0 0.35rem; }
.ra-reports-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem 0.65rem;
}
.ra-reports-export-card { padding: 1rem 1.25rem; }
.ra-reports-select--period { min-width: 10.5rem; }
.ra-wd-page { padding: 0; }
.ra-pb-card--main { flex: 1 1 22rem; }
.ra-pb-card--side { flex: 0 1 18rem; }
.ra-campaigns-overlay.ap-modal-overlay { z-index: 80; }
.ra-campaigns-modal { width: 100%; max-width: 36rem; }
.ra-campaigns-modal-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
html.dark body.ap-admin .ra-campaigns-modal-title,
html.dark body.ap-publisher .ra-campaigns-modal-title { color: #f8fafc; }
.ra-campaigns-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.1rem;
}
.ap-wait-scene--dashboard .ap-wait-hero-ico { color: #2563eb; }
.ap-wait-scene--offers .ap-wait-hero-ico { color: #7c3aed; }
.ap-wait-scene--clicks .ap-wait-hero-ico { color: #0f766e; }
.ap-wait-scene--goals .ap-wait-hero-ico { color: #d97706; }
.ap-wait-scene--api .ap-wait-hero-ico { color: #0284c7; }
.ap-wait-scene--postback .ap-wait-hero-ico { color: #4f46e5; }
.ap-wait-scene--conversion .ap-wait-hero-ico { color: #2563eb; }

/* Backup page */
.ra-backup-page { padding: 0; }
.ra-backup-inner {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.ra-backup-card .ra-telegram-head { margin-bottom: 1rem; }
.ra-backup-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}
.ra-backup-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.8125rem;
  font-weight: 700;
}
.ra-backup-pill .material-symbols-outlined { font-size: 1.05rem !important; }
html.dark body.ap-admin .ra-backup-pill {
  background: rgba(6, 78, 59, 0.45);
  color: #6ee7b7;
}
.ra-backup-next {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
html.dark body.ap-admin .ra-backup-next { color: #cbd5e1; }
.ra-backup-help {
  margin: 0.85rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #64748b;
}
.ra-backup-help--tight { margin-top: 0; }
.ra-backup-help--tight strong { color: #0f172a; }
html.dark body.ap-admin .ra-backup-help--tight strong { color: #f8fafc; }
html.dark body.ap-admin .ra-backup-help { color: #94a3b8; }
.ra-backup-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.ra-backup-stats div {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.85rem 0.9rem;
  background: #f8fafc;
}
html.dark body.ap-admin .ra-backup-stats div {
  border-color: #334155;
  background: #0f172a;
}
.ra-backup-stats strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}
html.dark body.ap-admin .ra-backup-stats strong { color: #f8fafc; }
.ra-backup-stats span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ra-backup-progress { margin: 0.25rem 0 1rem; }
.ra-backup-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
}
html.dark body.ap-admin .ra-backup-progress-top { color: #cbd5e1; }
.ra-backup-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
html.dark body.ap-admin .ra-backup-bar { background: #334155; }
.ra-backup-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #2563eb);
  transition: width 0.35s ease;
}
.ra-backup-bar i.is-fail { background: #dc2626; }
.ra-backup-actions { margin-top: 0.5rem; }
.ra-backup-actions--row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.ra-backup-table-wrap { overflow-x: auto; }
.ra-backup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.ra-backup-table th,
.ra-backup-table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
html.dark body.ap-admin .ra-backup-table th,
html.dark body.ap-admin .ra-backup-table td { border-bottom-color: #334155; }
.ra-backup-table th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.ra-backup-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  word-break: break-all;
  color: #0f172a;
}
html.dark body.ap-admin .ra-backup-name { color: #e2e8f0; }
.ra-backup-empty {
  text-align: center;
  color: #64748b;
  padding: 1.25rem 0.5rem !important;
}
.ra-backup-kind {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.ra-backup-kind--auto { background: #ecfeff; color: #0e7490; }
.ra-backup-kind--manual { background: #eef2ff; color: #4338ca; }
.ra-backup-kind--upload { background: #fef3c7; color: #b45309; }
html.dark body.ap-admin .ra-backup-kind--auto { background: rgba(14, 116, 144, 0.28); color: #67e8f9; }
html.dark body.ap-admin .ra-backup-kind--manual { background: rgba(67, 56, 202, 0.3); color: #c7d2fe; }
html.dark body.ap-admin .ra-backup-kind--upload { background: rgba(180, 83, 9, 0.28); color: #fcd34d; }
.ra-backup-row-actions {
  white-space: nowrap;
  text-align: right;
}
.ra-backup-link {
  background: none;
  border: 0;
  padding: 0.2rem 0.4rem;
  color: #2563eb;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ra-backup-link--danger { color: #dc2626; }
.ra-backup-link--restore { color: #0f766e; }
.ra-backup-link:hover { text-decoration: underline; }
.ra-backup-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
}
@media (max-width: 720px) {
  .ra-backup-stats { grid-template-columns: 1fr; }
}

/* Custom select — replaces native OS dropdown (blue selected row). */
.ap-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.ap-select.flex-1 { flex: 1 1 0%; }
.ap-select-native,
select.ap-select-native,
body.ap-admin .ra-content .ap-select > select,
body.ap-publisher .ra-content .ap-select > select,
body.ap-admin .ra-content label > select.ap-select-native,
body.ap-publisher .ra-content label > select.ap-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.ap-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--ap-skin-input-border, #e2e8f0);
  border-radius: 0.7rem;
  background: #fff;
  color: var(--ap-skin-text, #0f172a);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: text;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ap-select-trigger:hover {
  border-color: #93c5fd;
}
.ap-select.is-open .ap-select-trigger {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.ap-select.is-disabled .ap-select-trigger {
  cursor: not-allowed;
  opacity: 0.72;
  background: #f8fafc;
}
.ap-select-trigger-input,
body.ap-admin .ra-content .ap-select-trigger-input,
body.ap-publisher .ra-content .ap-select-trigger-input,
body.ap-admin .ra-content .ap-form-row .ap-select-trigger-input,
body.ap-publisher .ra-content .ap-form-row .ap-select-trigger-input {
  min-width: 0 !important;
  flex: 1;
  width: 100% !important;
  max-width: none !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit;
  font-size: inherit !important;
  font-weight: 600 !important;
  padding: 0.2rem 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.ap-select-trigger-input::placeholder {
  color: #64748b;
  font-weight: 600;
  opacity: 1;
}
.ap-select.is-placeholder .ap-select-trigger-input {
  color: #64748b;
}
.ap-select-trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-select-trigger-text.is-placeholder {
  color: #64748b;
  font-weight: 600;
}
.ap-select-chevron {
  color: #64748b;
  font-size: 1.2rem !important;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.ap-select.is-open .ap-select-chevron { transform: rotate(180deg); }
.ap-select-menu {
  position: fixed;
  z-index: 90;
  max-height: 16rem;
  overflow: auto;
  padding: 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
}
.ap-select-menu[hidden] { display: none !important; }
.ap-select-search-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: -0.15rem -0.15rem 0.35rem;
  padding: 0.15rem 0.15rem 0.45rem;
  background: inherit;
}
.ap-select-search {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  outline: none;
}
.ap-select-search:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.ap-select-empty {
  padding: 0.7rem 0.75rem;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}
.ap-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.62rem 0.75rem;
  border: none;
  border-radius: 0.6rem;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.ap-select-option[hidden],
.ap-select-empty[hidden] {
  display: none !important;
}
.ap-select-option:hover:not(:disabled) { background: #eff6ff; }
.ap-select-option.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}
.ap-select-option:disabled,
.ap-select-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
html.dark .ap-select-trigger,
html.dark body.ap-admin .ap-select-trigger,
html.dark body.ap-publisher .ap-select-trigger {
  background: #0f172a !important;
  border-color: #4b5563 !important;
  color: #f3f4f6 !important;
}
html.dark .ap-select.is-disabled .ap-select-trigger { background: #1e2937 !important; }
html.dark .ap-select-trigger-input {
  color: #f3f4f6;
  background: transparent;
}
html.dark .ap-select-trigger-input::placeholder,
html.dark .ap-select.is-placeholder .ap-select-trigger-input {
  color: #94a3b8;
}
html.dark .ap-select-menu {
  background: #1e2937;
  border-color: #334155;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}
html.dark .ap-select-empty { color: #94a3b8; }
html.dark .ap-select-option { color: #e2e8f0; }
html.dark .ap-select-option:hover:not(:disabled) { background: rgba(37, 99, 235, 0.22); }
html.dark .ap-select-option.is-active {
  background: #1e40af;
  color: #dbeafe;
}
html.dark .ap-select-trigger-text.is-placeholder,
html.dark .ap-select-chevron { color: #94a3b8; }

