/* Publisher shell uses .pub-sidebar (React-style); legacy .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;
}

* { box-sizing: border-box; }
body.ap-body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; 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: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f9fafb;
  color: #111827;
}

.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: #4b5563;
  transition: background 0.15s, color 0.15s;
}
.ra-nav-link:hover {
  background: #e5e7eb;
  color: #111827;
}
.ra-nav-link.is-active {
  background: #2563eb;
  color: #fff;
}
.ra-nav-link.is-active .ra-nav-ico {
  color: #fff;
}
.ra-nav-ico {
  font-size: 1.25rem !important;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}
.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-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;
  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;
}
.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;
}
.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;
}

/* Dashboard (React-style) */
.ra-dash-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #6b7280;
}
.ra-dash {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 100%;
  min-height: calc(100vh - 7.5rem);
}
.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(6, minmax(0, 1fr));
  }
}
.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: 1;
  min-height: 280px;
  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: 1;
  min-height: 220px;
  padding: 0.5rem;
  position: relative;
}

.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: 1rem;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}
.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: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.ra-bottom-head h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}
.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 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  text-align: center;
}
.ra-bottom-dim {
  margin: 0;
  font-size: 0.625rem;
  opacity: 0.75;
}
.ra-bottom-num {
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .ra-sidebar {
    position: relative;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
  .ra-main {
    margin-left: 0;
  }
  .ra-shell.ra-collapsed .ra-main {
    margin-left: 0;
  }
}

/* Publisher top bar + sidebar (React Layout.js) */
body.ap-publisher {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f9fafb;
  color: #111827;
  margin: 0;
  padding-top: 3.5rem;
}
.ap-publisher .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.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;
  color: #6b7280;
  flex-shrink: 0;
}
.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-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.8125rem;
}
body.ap-admin .ra-content .ap-table th,
body.ap-publisher .pub-content .ap-table th {
  background: #f9fafb;
  color: #374151;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.65rem 0.75rem;
}
body.ap-admin .ra-content .ap-table td,
body.ap-publisher .pub-content .ap-table td {
  border-bottom: 1px solid #f3f4f6;
  padding: 0.6rem 0.75rem;
  color: #374151;
}
body.ap-admin .ra-content .ap-table tr:hover td,
body.ap-publisher .pub-content .ap-table tr:hover td {
  background: #f9fafb;
}

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;
}

@media (max-width: 900px) {
  .pub-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
  body.ap-publisher {
    padding-top: 3.5rem;
  }
  .pub-main {
    margin-left: 0;
  }
}

/* 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: 'Inter', system-ui, sans-serif;
}
.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;
}
.auth-ok {
  color: #15803d;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  text-align: center;
}

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

.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 {
  color: #e5e7eb;
}
html.dark body.ap-admin .ra-sidebar {
  background: #1f2937;
  border-right-color: #374151;
}
html.dark body.ap-admin .ra-brand,
html.dark body.ap-admin .ra-nav-link {
  color: #d1d5db;
}
html.dark body.ap-admin .pub-logo-rest {
  color: #d1d5db;
}
html.dark body.ap-admin .ra-brand-tag {
  color: #f87171;
}
html.dark body.ap-admin .ra-nav-link:hover {
  background: #374151;
  color: #f9fafb;
}
html.dark body.ap-admin .ra-nav-link.is-active {
  background: #2563eb;
  color: #fff;
}
html.dark body.ap-admin .ra-sidebar-foot {
  border-top-color: #374151;
}
html.dark body.ap-admin .ra-topbar {
  background: #111827;
  border-bottom-color: #374151;
}
html.dark body.ap-admin .ra-welcome {
  color: #f3f4f6;
}
html.dark body.ap-admin .ra-icon-btn {
  color: #9ca3af;
}
html.dark body.ap-admin .ra-icon-btn:hover {
  background: #374151;
  color: #e5e7eb;
}
html.dark body.ap-admin .ra-profile-name {
  color: #d1d5db;
}
html.dark body.ap-admin .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-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: #374151;
  color: #d1d5db;
  border-color: #4b5563;
}
html.dark body.ap-admin .ra-content .ap-table td {
  border-color: #374151;
  color: #e5e7eb;
}
html.dark body.ap-admin .ra-content .ap-table tr:hover td {
  background: rgba(55, 65, 81, 0.5);
}
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-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;
}

/* 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-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  transition: background .2s, box-shadow .2s;
}
html.dark body.ap-admin .ra-reports-card {
  background: #111827;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.35);
}
.ra-reports-filter-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}
@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: center;
  gap: 0.75rem 1rem;
  width: 100%;
}
.ra-reports-period-label {
  font-weight: 600;
  font-size: 1.125rem;
  color: #374151;
  white-space: nowrap;
}
html.dark body.ap-admin .ra-reports-period-label { color: #d1d5db; }
.ra-reports-select {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  background: #fff;
  color: #111827;
  min-width: 180px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
html.dark body.ap-admin .ra-reports-select {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-reports-date-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ra-reports-date-input {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  background: #fff;
  color: #111827;
  min-width: 140px;
}
html.dark body.ap-admin .ra-reports-date-input {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-reports-date-to {
  font-weight: 600;
  font-size: 1.125rem;
  color: #4b5563;
}
html.dark body.ap-admin .ra-reports-date-to { color: #9ca3af; }
.ra-reports-apply-btn {
  border: none;
  border-radius: 0.5rem;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.35);
  transition: background .15s;
  width: 100%;
}
@media (min-width: 768px) {
  .ra-reports-apply-btn { width: auto; }
}
.ra-reports-apply-btn:hover { background: #1d4ed8; }
.ra-reports-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}
html.dark body.ap-admin .ra-reports-section-head { border-color: #374151; }
.ra-reports-section-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}
html.dark body.ap-admin .ra-reports-section-title { color: #e5e7eb; }
.ra-reports-record-count {
  font-size: 1.125rem;
  font-weight: 400;
  color: #6b7280;
}
html.dark body.ap-admin .ra-reports-record-count { color: #9ca3af; }
.ra-reports-cols-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  background: #f9fafb;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: background .15s;
}
html.dark body.ap-admin .ra-reports-cols-toggle {
  background: #1f2937;
  color: #60a5fa;
}
.ra-reports-cols-toggle:hover { background: #f3f4f6; }
html.dark body.ap-admin .ra-reports-cols-toggle:hover { background: #374151; }
.ra-reports-cols-toggle .material-symbols-outlined { font-size: 20px; }
.ra-reports-col-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.ra-reports-col-inner label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  color: #374151;
}
html.dark body.ap-admin .ra-reports-col-inner label { color: #d1d5db; }
.ra-reports-col-inner input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #2563eb;
}
.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: #6b7280;
  font-size: 1rem;
}
html.dark body.ap-admin .ra-reports-loading-text { color: #9ca3af; }
.ra-reports-table-scroll {
  overflow-x: auto;
  width: 100%;
}
.ra-reports-table {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
}
.ra-reports-table thead { background: #f9fafb; }
html.dark body.ap-admin .ra-reports-table thead { background: #1f2937; }
.ra-reports-table th {
  padding: 0.75rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4b5563;
  white-space: nowrap;
  min-width: 120px;
  border-bottom: 1px solid #e5e7eb;
}
html.dark body.ap-admin .ra-reports-table th {
  color: #d1d5db;
  border-color: #374151;
}
.ra-reports-table td {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: #1f2937;
  white-space: nowrap;
  min-width: 120px;
  border-bottom: 1px solid #e5e7eb;
}
html.dark body.ap-admin .ra-reports-table td {
  color: #e5e7eb;
  border-color: #374151;
}
.ra-reports-table tbody tr:hover td { background: #f9fafb; }
html.dark body.ap-admin .ra-reports-table tbody tr:hover td { background: #1f2937; }
.ra-reports-empty {
  text-align: center;
  padding: 2rem !important;
  color: #6b7280;
}
html.dark body.ap-admin .ra-reports-empty { color: #9ca3af; }
.ra-reports-status-pill {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.ra-reports-status-pill--ok {
  background: #dcfce7;
  color: #15803d;
}
html.dark body.ap-admin .ra-reports-status-pill--ok {
  background: rgba(6, 78, 59, 0.45);
  color: #86efac;
}
.ra-reports-status-pill--bad {
  background: #fee2e2;
  color: #b91c1c;
}
html.dark body.ap-admin .ra-reports-status-pill--bad {
  background: rgba(127, 29, 29, 0.4);
  color: #fecaca;
}
.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.875rem;
  border: none;
  border-radius: 0.5rem;
  background: #e5e7eb;
  color: #1f2937;
  cursor: pointer;
  transition: background .15s;
}
html.dark body.ap-admin .ra-reports-page-btn {
  background: #374151;
  color: #e5e7eb;
}
.ra-reports-page-btn:hover:not(:disabled) { background: #d1d5db; }
html.dark body.ap-admin .ra-reports-page-btn:hover:not(:disabled) { background: #4b5563; }
.ra-reports-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ra-reports-page-info {
  font-size: 0.875rem;
  color: #6b7280;
  padding: 0 0.5rem;
}
html.dark body.ap-admin .ra-reports-page-info { color: #9ca3af; }

/* 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.75rem;
  border-radius: 0.5rem;
  background: #f9fafb;
  font-size: 0.875rem;
}
html.dark body.ap-admin .ra-postback-adv-info { background: #1f2937; }
.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; }
.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: #2563eb;
  color: #fff;
}
.ra-postback-btn--primary:hover:not(:disabled) { background: #1d4ed8; }
.ra-postback-btn:disabled {
  opacity: 0.5;
  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 {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  color: #1f2937;
  outline: none;
}
.ra-advertisers-search:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
html.dark body.ap-admin .ra-advertisers-search {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
.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: collapse;
}
.ra-advertisers-table thead th {
  background: #3b82f6;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  text-align: left;
}
html.dark body.ap-admin .ra-advertisers-table thead th {
  background: #1d4ed8;
}
.ra-advertisers-table td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
html.dark body.ap-admin .ra-advertisers-table td {
  color: #e5e7eb;
  border-bottom-color: #374151;
}
.ra-advertisers-table tbody tr:hover td {
  background: #f9fafb;
}
html.dark body.ap-admin .ra-advertisers-table tbody tr:hover td {
  background: rgba(55, 65, 81, 0.5);
}
.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-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-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; }
.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-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: 640px;
  border-collapse: collapse;
}
.ra-requests-table thead th {
  background: #f3f4f6;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  text-align: left;
}
html.dark body.ap-admin .ra-requests-table thead th {
  background: #374151;
  color: #d1d5db;
}
.ra-requests-table td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
html.dark body.ap-admin .ra-requests-table td {
  color: #e5e7eb;
  border-bottom-color: #4b5563;
}
.ra-requests-table tbody tr:hover td {
  background: #f9fafb;
}
html.dark body.ap-admin .ra-requests-table tbody tr:hover td {
  background: rgba(75, 85, 99, 0.45);
}
.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: collapse;
  font-size: 0.875rem;
}
.ra-notify-table thead th {
  background: #2563eb;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  text-align: left;
}
html.dark body.ap-admin .ra-notify-table thead th {
  background: #1d4ed8;
}
.ra-notify-table td {
  padding: 0.625rem 1rem;
  color: #374151;
  border-top: 1px solid #e5e7eb;
  vertical-align: top;
}
html.dark body.ap-admin .ra-notify-table td {
  color: #d1d5db;
  border-top-color: #374151;
}
.ra-notify-table tbody tr:hover td {
  background: #f9fafb;
}
html.dark body.ap-admin .ra-notify-table tbody tr:hover td {
  background: rgba(31, 41, 55, 0.65);
}
.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-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: collapse;
  font-size: 0.875rem;
}
.ra-aff-table thead th {
  background: #f9fafb;
  color: #4b5563;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
html.dark body.ap-admin .ra-aff-table thead th {
  background: #1f2937;
  color: #d1d5db;
}
.ra-aff-table td {
  padding: 0.5rem 0.75rem;
  color: #1f2937;
  border-top: 1px solid #e5e7eb;
  vertical-align: middle;
}
html.dark body.ap-admin .ra-aff-table td {
  color: #e5e7eb;
  border-top-color: #374151;
}
.ra-aff-table tbody tr:hover td {
  background: #f9fafb;
}
html.dark body.ap-admin .ra-aff-table tbody tr:hover td {
  background: rgba(31, 41, 55, 0.65);
}
.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;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.ra-aff-status--ok {
  background: #dcfce7;
  color: #15803d;
}
.ra-aff-status--bad {
  background: #fee2e2;
  color: #b91c1c;
}
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);
}

/* Campaigns page — React Campaigns.js parity */
.ra-campaigns-page { display: flex; flex-direction: column; gap: 1rem; }
.ra-campaigns-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
@media (min-width: 640px) {
  .ra-campaigns-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
html.dark body.ap-admin .ra-campaigns-head {
  background: #111827;
}
.ra-campaigns-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}
html.dark body.ap-admin .ra-campaigns-title { color: #f3f4f6; }
.ra-campaigns-create {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  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-campaigns-create:hover { background: #1d4ed8; }
.ra-campaigns-alert {
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: #dcfce7;
  color: #15803d;
}
.ra-campaigns-alert[hidden] { display: none !important; }
html.dark body.ap-admin .ra-campaigns-alert {
  background: rgba(6, 78, 59, 0.35);
  color: #86efac;
}
.ra-campaigns-shell {
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  background: #fff;
  border: 1px solid #e5e7eb;
}
html.dark body.ap-admin .ra-campaigns-shell {
  background: #111827;
  border-color: #374151;
}
.ra-campaigns-loading {
  display: flex;
  justify-content: center;
  padding: 4rem 1rem;
}
.ra-campaigns-loading[hidden] { display: none !important; }
.ra-campaigns-subhead {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}
html.dark body.ap-admin .ra-campaigns-subhead { border-bottom-color: #374151; }
.ra-campaigns-subtitle {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}
html.dark body.ap-admin .ra-campaigns-subtitle { color: #f3f4f6; }
.ra-campaigns-modal.ap-modal { max-width: 28rem; width: 100%; padding: 1.5rem; }
.ra-campaigns-modal-title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.ra-campaigns-form-field { margin-bottom: 1rem; }
.ra-campaigns-form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
html.dark body.ap-admin .ra-campaigns-form-label { color: #d1d5db; }
.ra-campaigns-form-input,
.ra-campaigns-form-select {
  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;
}
html.dark body.ap-admin .ra-campaigns-form-input,
html.dark body.ap-admin .ra-campaigns-form-select {
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}
.ra-campaigns-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}
html.dark body.ap-admin .ra-campaigns-form-actions { border-top-color: #374151; }
.ra-campaigns-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
}
.ra-campaigns-btn--cancel {
  background: #e5e7eb;
  color: #1f2937;
}
html.dark body.ap-admin .ra-campaigns-btn--cancel {
  background: #4b5563;
  color: #f3f4f6;
}
.ra-campaigns-btn--save {
  background: #2563eb;
  color: #fff;
}
.ra-campaigns-btn--save:disabled { opacity: 0.5; cursor: not-allowed; }
.ra-campaigns-btn--danger {
  background: #dc2626;
  color: #fff;
}
.ra-campaigns-delete-modal.ap-modal {
  max-width: 24rem;
  padding: 1.5rem;
}
.ra-campaigns-delete-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}
.ra-campaigns-delete-sub {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.45;
}
html.dark body.ap-admin .ra-campaigns-delete-sub { color: #9ca3af; }

/* —— 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; }
.ra-pub-offers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.ra-pub-offers-table thead { background: #f9fafb; }
.ra-pub-offers-table th {
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5563;
  white-space: nowrap;
}
.ra-pub-offers-table td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  color: #1f2937;
}
.ra-pub-offers-table tbody tr:hover td { background: #f9fafb; }
.ra-pub-offers-th-logo { width: 3rem; }
.ra-pub-offers-td-logo { text-align: center; }
.ra-pub-offers-td-name { font-weight: 500; }
.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-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-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-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.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid #2563eb;
  border-radius: 0.5rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.ra-pub-offer-add-pb:hover { background: #dbeafe; }
.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(17, 24, 39, 0.45);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.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-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-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-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-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 1280px) {
  .ra-pub-profile-grid { grid-template-columns: 2fr 1fr; }
}
.ra-pub-profile-main {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}
.ra-pub-profile-banner {
  position: relative;
  height: 4rem;
  background: linear-gradient(to right, #1e40af, #3b82f6);
}
.ra-pub-profile-pw-btn {
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
  padding: 0.35rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.ra-pub-profile-avatar {
  position: absolute;
  left: 1rem;
  top: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: #e5e7eb;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}
.ra-pub-profile-rows-head {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem 0;
}
.ra-pub-profile-rows { padding-top: 0.5rem; }
.ra-pub-profile-row-val {
  text-align: right;
  color: #374151;
  min-width: 0;
}
.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 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}
.ra-pub-profile-row span:first-child { font-weight: 600; color: #1f2937; }
.ra-pub-profile-row span:last-child { text-align: right; color: #374151; }
.ra-pub-profile-pay-card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}
.ra-pub-profile-pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.ra-pub-profile-pay-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.ra-pub-profile-edit-toggle {
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  border: 1px solid #93c5fd;
  background: transparent;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.ra-pub-profile-pay-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
}
.ra-pub-profile-pay-row > span { font-weight: 600; color: #374151; }
.ra-pub-profile-pay-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  text-align: right;
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}
.ra-pub-profile-pay-input.is-editing {
  border-color: #d1d5db;
  background: #fff;
}
.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;
}
.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-row { border-color: #374151; }
html.dark body.ap-publisher .ra-pub-profile-row span:first-child { color: #f3f4f6; }
html.dark body.ap-publisher .ra-pub-profile-row span:last-child,
html.dark body.ap-publisher .ra-pub-profile-row-val { color: #d1d5db; }
html.dark body.ap-publisher .ra-pub-profile-field-input.is-editing {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}
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; }
