/* --- MODAL STYLES --- */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
}

.modal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

fieldset {
  border: 1px solid #ccc;
  padding: 1rem 1rem 1.25rem;
  border-radius: 8px;
}
legend {
  padding: 0;               /* remove extra default padding */
  margin: 0 0 .5rem;        /* spacing below the legend */
}

.legend-h4 {
  display: inline-block;    /* so margins/padding work nicely */
  font-size: 1.25rem;       /* ~ h4 scale */
  line-height: 1.2;
  font-weight: 600;
  color: #222;
  margin: 0;                /* avoid unexpected spacing */
}

/* legend sits on the fieldset border, give it a bg to “cut” the line */
.legend-h4 {
  background: #fff;         /* match your page background */
  padding: 0 .25rem;
}


/* the on/off switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin-right: 8px;
}
.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: .4s;
}
.slider:before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: 2px; bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: .4s;
}
input:checked + .slider {
  background: #4caf50;
}
input:checked + .slider:before {
  transform: translateX(26px);
}

/* status badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.9em;
  vertical-align: middle;
}
.badge-green { background: #4caf50; color: #fff; }
.badge-red   { background: #e53935; color: #fff; }

.bot-status-desc {
  color: #555;
  font-size: 0.9em;
  margin-bottom: 6px;
}
/* button colors */
.toggle-btn.red   { background:#dc3545; color:#fff; }
.toggle-btn.green { background:#28a745; color:#fff; }

/* status label colors */
.status-label.status-red   { color:#dc3545; font-weight:bold; }
.status-label.status-green { color:#28a745; font-weight:bold; }


/* ─── Spinner (when .is-loading) ─────────────────────────── */
/* ─── Buttons: visible spinner without hiding label ───────────────────── */
.button.is-loading{
  position: relative;
  pointer-events: none;
  /* IMPORTANT: do NOT hide text via color:transparent */
}

.button.is-loading::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width: 1.1em;
  height: 1.1em;
  margin:-0.55em 0 0 -0.55em;
  border: 0.22em solid #2271b1;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

/* If it's a primary WP button, use white spinner */
.button.button-primary.is-loading::after{
  border-color: rgba(255,255,255,.9);
  border-right-color: transparent;
}

/* Inline spinner next to Save */
.save-row{display:flex;align-items:center;gap:8px}
.inline-spinner{
  display:none;width:16px;height:16px;border:2px solid #2271b1;
  border-right-color:transparent;border-radius:50%;animation:spin .75s linear infinite
}
.save-row.is-busy .inline-spinner{display:inline-block}
.save-status{font-size:.9em;color:#555}


/* ─── SMTP buttons: small spinner on the right ───────────────────────── */
button.rh-has-spinner{ position: relative; }

button.rh-has-spinner.is-spinning{
  pointer-events: none;
  padding-right: 32px;
}

button.rh-has-spinner.is-spinning::after{
  content:"";
  position:absolute;
  top:50%;
  right:10px;
  width:14px;
  height:14px;
  margin-top:-7px;
  border:2px solid #2271b1;
  border-right-color: transparent;
  border-radius:50%;
  animation: spin .75s linear infinite;
}

button.button-primary.rh-has-spinner.is-spinning::after{
  border-color: rgba(255,255,255,.9);
  border-right-color: transparent;
}


/* Button-centered spinner (works on any .button.is-loading) */
.button.is-loading {
  position: relative;
  color: transparent;       /* hide label while spinning */
  pointer-events: none;
}
.button.is-loading::after{
  content:"";
  position:absolute;
  top:50%; left:50%;
  width: 1.25em; height: 1.25em;      /* a bit smaller looks nicer in-line */
  margin:-0.625em 0 0 -0.625em;
  border: 0.25em solid currentColor;  /* always visible */
  border-left-color: transparent;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

/* Inline spinner next to the button */
.inline-spinner{
  display:none;
  width:16px; height:16px;
  border:2px solid currentColor;      /* always visible */
  border-right-color: transparent;
  border-radius:50%;
  animation: spin .75s linear infinite;
}
.inline-spinner.is-loading{ display:inline-block; }
.inline-spinner{ vertical-align: middle; }

/* Probe results (auto-detect + test) */
#rhProbeResults.notice-success{
  border-left: 4px solid #00a32a;
  background: #f0f6f1;
}
#rhProbeResults.notice-error{
  border-left: 4px solid #d63638;
  background: #fcf0f1;
}
#rhProbeResults.notice-success,
#rhProbeResults.notice-error{
  padding:10px;
}

/* Save status line */
.save-status.ok{ color:#00a32a; font-weight:600; }
.save-status.err{ color:#d63638; font-weight:600; }



/* Show the sibling inline spinner while the button is busy */
#rhPrefillAI.is-loading + .inline-spinner { display:inline-block; }


/* Full-width form controls inside all custom modals */
.custom-modal .modal-content input[type="text"],
.custom-modal .modal-content input[type="url"],
.custom-modal .modal-content input[type="email"],
.custom-modal .modal-content input[type="number"],
.custom-modal .modal-content input[type="password"],
.custom-modal .modal-content select,
.custom-modal .modal-content textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
}

/* Tidy labels + spacing */
.custom-modal .modal-content label {
  display: block;
  font-weight: 600;
  margin: 0 0 6px;
}
.custom-modal .modal-content p {
  margin: 0 0 12px;
}

/* Optional: nicer fieldsets */
.custom-modal .modal-content fieldset {
  border: 1px solid #e5e7eb;
  padding: 12px;
  margin: 0 0 16px;
  border-radius: 6px;
}
.custom-modal .modal-content legend {
  padding: 0 6px;
  font-weight: 600;
}

/* FAQ table: make inner fields fill cells */
#faqTable {
  width: 100%;
  table-layout: fixed;
}
#faqTable td input[type="text"],
#faqTable td textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#faqTable .drag-handle { cursor: grab; white-space: nowrap; }
#faqTable .drag-handle:active { cursor: grabbing; }
#faqTable .drag-handle .grip { opacity:.6; margin-left:.35rem; }
#faqTable tbody tr.ui-sortable-helper { background:#fffbe7; }
#faqTable tbody tr.faq-row-placeholder td {
  background:#f3f4f6 !important; visibility:visible !important;
}
#faqTable tbody tr.faq-row-placeholder * { visibility:hidden; }
/* Make the onboarding modal wider (classic .custom-modal) */
#rhOnboardingModal .modal-content {
  width: min(96vw, 1100px);   /* was likely ~720–900px */
  max-height: 88vh;           /* stays within viewport */
  overflow: auto;             /* scroll inner content if needed */
}

/* Onboarding modal: break past the base 700px cap */
#rhOnboardingModal .modal-content{
  max-width: none !important;          /* <-- remove 700px cap */
  width: clamp(900px, 96vw, 1100px);   /* comfortable width for the FAQ table */
  margin: 4vh auto;                    /* better vertical spacing */
  max-height: 88vh;
  overflow: auto;
}

/* If using the newer modal */
#wfb-onboarding .wfb-modal__content{
  position: relative;                   /* for the absolute close button */
  max-width: none !important;
  width: clamp(900px, 96vw, 1100px);
  margin: 3vh auto;
  max-height: 88vh;
  overflow: auto;
}


/* Optional: small table niceties so columns behave */
#faqTable { table-layout: fixed; }
#faqTable td.pos, #faqTable th:first-child { width: 5rem; white-space: nowrap; }
#faqTable td:last-child, #faqTable th:last-child { width: 3rem; }
#faqTable input[type="text"], #faqTable textarea { width: 100%; }

/* Make table neat */
#faqTable { width: 100%; border-collapse: collapse; }
#faqTable th, #faqTable td { padding: 6px 8px; vertical-align: top; }
#faqTable input[type="text"], #faqTable textarea { width: 100%; box-sizing: border-box; }

/* Drag handle column */
#faqTable .pos.drag-handle { width: 44px; white-space: nowrap; cursor: grab; }
#faqTable .grip { opacity: .5; margin-left: 6px; }

/* Delete column */
#faqTable td.remove-cell { width: 44px; text-align: center; }

/* Trash button: no border, no WP styles, sits nicely inside the cell */
#faqTable .faq-trash {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px;
  margin: 0;
  cursor: pointer;
  font-size: 18px;     /* 🗑️ size */
  line-height: 1;
}
#faqTable .faq-trash:hover,
#faqTable .faq-trash:focus {
  outline: none;       /* remove focus ring border */
  box-shadow: none;    /* ensure WP styles don’t bleed */
  transform: scale(1.05);
  background: rgba(0,0,0,.05);
  border-radius: 6px;
}

/* keep this separate from your existing @keyframes spin */
@keyframes rhspin { to { transform: rotate(360deg); } }


/* ─── Keyframes ───────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.wfb-modal{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:9999;display:none}
.wfb-modal__content{background:#fff;max-width:1100px;margin:3vh auto;border-radius:10px;box-shadow:0 4px 20px rgba(0,0,0,.2);padding:0;overflow:hidden}
.wfb-close{position:absolute;right:14px;top:10px;background:transparent;border:0;font-size:26px;cursor:pointer}
.wfb-grid{display:grid;grid-template-columns:280px 1fr;min-height:70vh}
.wfb-rail{background:#fafafa;border-right:1px solid #eee;padding:18px}
.wfb-rail h3{margin-top:0}
.wfb-steps{list-style:none;margin:0;padding:0}
.wfb-steps li{display:flex;gap:8px;align-items:center;padding:6px 4px;border-radius:6px}
.wfb-steps li.is-active{background:#eef6ff}
.wfb-pane{padding:20px}
.wfb-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;border-top:1px solid #eee;padding-top:12px}
.wfb-help{margin-top:20px;font-size:.9em;color:#666}

.phones{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.phone{border:1px solid #eee;border-radius:10px;overflow:hidden}
.phone h3{margin:0;padding:10px 12px;background:#f5f5f5}
.chat{height:300px;overflow:auto;padding:12px;background:#fff}
.composer{display:flex;gap:8px;padding:10px;border-top:1px solid #eee}
.composer input{flex:1}

.bubble{display:inline-block;max-width:80%;margin:6px 0;padding:8px 10px;border-radius:14px;font-size:14px;line-height:1.3}
.bubble--me{background:#e6f2ff;margin-left:auto;display:block}
.bubble--them{background:#f0f0f0;display:block}

.wfb-done{text-align:center;padding:40px}
.wfb-done h2{margin:10px 0}
/* optional: responsive scaling */

@media (min-width: 768px) {
  .legend-h4 { font-size: 1.35rem; }
}

/* Email manager modal */
#rhSetupEmailModal .rh-em-sub{margin:4px 0 14px;color:#4b5563}
#rhSetupEmailModal .rh-email-modal{max-width:900px}
#rhSetupEmailModal .rh-em-card{border:1px solid #e5e7eb;background:#f8fafc;border-radius:10px;padding:12px;margin:8px 0}
#rhSetupEmailModal .rh-em-status{background:#eef6ff;border-color:#c7defa}
#rhSetupEmailModal .rh-em-status--ok{
  border-color:#86efac;
  background:#f0fdf4;
  color:#166534;
  font-weight:700;
}
#rhSetupEmailModal .rh-em-status--warn{
  border-color:#facc15;
  background:#fefce8;
  color:#713f12;
  font-weight:600;
}
#rhSetupEmailModal .rh-em-reset-wrap{
  display:flex;
  justify-content:flex-end;
  margin:6px 0 8px;
}
#rhSetupEmailModal .rh-em-reset-btn{
  background:#c62828;
  border-color:#a81f1f;
  color:#fff;
  font-size:12px;
  line-height:1.2;
  padding:4px 8px;
}
#rhSetupEmailModal .rh-em-reset-btn:hover{
  background:#b71c1c;
  border-color:#8d1717;
  color:#fff;
}
#rhSetupEmailModal .rh-em-form label{display:block;font-weight:600;margin-bottom:4px}
#rhSetupEmailModal .rh-em-form input[type=text],
#rhSetupEmailModal .rh-em-form input[type=email],
#rhSetupEmailModal .rh-em-form input[type=password],
#rhSetupEmailModal .rh-em-form input[type=number],
#rhSetupEmailModal .rh-em-form select,
#rhSetupEmailModal .rh-em-form textarea{width:100%;max-width:100%}
#rhSetupEmailModal .rh-em-mini{margin-top:-6px}
#rhSetupEmailModal .rh-em-provider-only{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:8px;
}
#rhSetupEmailModal .rh-provider-choice{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:10px;
  border:1px solid #d9dfe8;
  border-radius:10px;
  background:#f8fafc;
  padding:14px;
  cursor:pointer;
  min-height:140px;
}
#rhSetupEmailModal .rh-provider-choice:hover{
  border-color:#93c5fd;
  background:#eff6ff;
}
#rhSetupEmailModal .rh-provider-choice img{
  width:96px;
  height:96px;
  object-fit:contain;
  display:block;
}
#rhSetupEmailModal .rh-provider-choice span{
  font-size:14px;
  font-weight:600;
  color:#0f172a;
}
#rhSetupEmailModal .rh-em-probe-hint{
  font-size:12px;
  color:#475569;
}
#rhSetupEmailModal #rhEmailFlowMsg.notice-success{
  border-left:4px solid #00a32a;
  background:#f0f6f1;
  color:#155724;
}
#rhSetupEmailModal #rhEmailFlowMsg.notice-error{
  border-left:4px solid #d63638;
  background:#fcf0f1;
  color:#842029;
}
#rhSetupEmailModal .rh-em-review{
  margin-top:8px;
  border:1px solid #dbe3ef;
  border-radius:8px;
  padding:8px 10px;
  background:#f8fbff;
}
#rhSetupEmailModal .rh-em-review summary{
  cursor:pointer;
  font-weight:600;
  color:#1e3a8a;
}
#rhSetupEmailModal .rh-em-dorito{
  display:inline-block;
  margin-right:6px;
  font-size:10px;
  transform: translateY(-1px);
}
#rhSetupEmailModal .rh-em-review[open] .rh-em-dorito{
  transform: rotate(90deg) translateX(1px);
}
#rhSetupEmailModal .rh-em-review-note{
  margin:8px 0;
  color:#475569;
  font-size:12px;
}

@media (min-width: 1024px) {
  #rhSetupEmailModal .rh-email-modal{
    max-width: 980px;
  }
}
@media (max-width: 782px) {
  #rhSetupEmailModal .rh-em-provider-only{
    grid-template-columns:1fr;
  }
}

/* Global overlay spinner */
.rh-overlay{position:fixed;inset:0;z-index:99999;background:rgba(255,255,255,.85);display:none;align-items:center;justify-content:center}
.rh-overlay--shown{display:flex}
.rh-spinner{width:54px;height:54px;border:4px solid #e5e7eb;border-top-color:#2563eb;border-radius:9999px;animation:rhspin 1s linear infinite}
@keyframes rhspin{to{transform:rotate(360deg)}}
.rh-overlay__inner{display:flex;flex-direction:column;align-items:center;gap:12px}
.rh-overlay__label{font:500 14px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Arial}
body.rh-noscroll{overflow:hidden}

/* Unified Control Center */
.rh-ops-launch{
  border:1px solid #dbe1e7;
  background:linear-gradient(160deg,#f8fbff,#eef4f9);
  border-radius:12px;
  padding:16px 18px;
  margin:10px 0 18px;
}
.rh-ops-launch-text{margin:0 0 10px;color:#1f2937}
.rh-ops-inline{margin:8px auto 20px;max-width:1100px}
.rh-ops-inline .rh-ops-shell{max-width:1100px;width:100%;padding:0;border-radius:14px;overflow:hidden;border:1px solid #dbe1e7}
.rh-ops-header{
  position:relative;
  max-width:1100px;
  width:100%;
  margin:8px auto 0;
  padding:12px 16px 3px;
  background:#0f172a;
  color:#f8fafc;
  border:1px solid #1f2a3a;
  border-radius:14px 14px 0 0;
  box-sizing:border-box;
}
.rh-ops-header + #rhOpsHubSection.rh-ops-inline{
  margin-top:0;
}
.rh-ops-header + #rhOpsHubSection.rh-ops-inline .rh-ops-shell{
  border-top-left-radius:0;
  border-top-right-radius:0;
  border-top:0;
}
#rhOpsHubSection.rh-ops-inline .rh-ops-shell{
  border-top-left-radius:0;
  border-top-right-radius:0;
}
.rh-ops-header-top{display:block}
.rh-ops-header h2{margin:0;color:#fff;line-height:1.2}
.rh-ops-header p{margin:0 0 8px;color:#cbd5e1;line-height:1.3}
.rh-ops-header-actions{position:absolute;top:8px;right:12px;display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:nowrap;margin:0;z-index:3}
.rh-ops-header-profile{display:flex;align-items:center}
.rh-ops-header-menu{display:flex;align-items:center}
.rh-ops-header-identity{
  display:inline-flex;
  align-items:center;
  width:fit-content;
  max-width:100%;
  margin:0 0 8px;
  padding:7px 10px;
  border:1px solid #334155;
  border-radius:8px;
  background:#111827;
  color:#e2e8f0;
  font-size:13px;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.rh-ops-status-row{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;flex-wrap:wrap;margin-bottom:0;padding-bottom:0}
.rh-ops-billing{margin:0}
.rh-ops-billing-inline{margin:0 0 0 auto;text-align:right}
.rh-ops-billing :is(p,div,span){color:#e2e8f0}
.rh-ops-billing-inline .paystack-subscription-status{
  margin:0;
  max-width:none;
  display:inline-flex !important;
  align-items:center;
  gap:8px;
  padding:4px 8px !important;
  border-width:1px !important;
  line-height:1.15;
}
.rh-ops-billing-inline .paystack-subscription-status > div:first-child{
  display:inline-flex !important;
  align-items:center;
  gap:6px !important;
  margin:0 !important;
}
.rh-ops-billing-inline .paystack-subscription-status > div:first-child svg{
  width:16px !important;
  height:16px !important;
  flex:0 0 auto;
}
.rh-ops-billing-inline .paystack-subscription-status > div:first-child > div{
  display:inline-flex !important;
  align-items:center;
  gap:6px;
  line-height:1.1 !important;
}
.rh-ops-billing-inline .paystack-subscription-status > div:first-child > div > div{
  margin:0 !important;
  font-size:11px !important;
  line-height:1.1 !important;
}
.rh-ops-billing-inline .paystack-subscription-status > div:first-child > div > div + div{
  margin-top:0 !important;
  opacity:.92;
}
.rh-ops-billing-inline .paystack-subscription-status > div + div{
  margin-top:0 !important;
  text-align:left !important;
}
.rh-ops-billing-inline .paystack-subscription-status a{white-space:nowrap}
.rh-ops-billing-inline .paystack-subscription-status :is(p,h1,h2,h3,h4,h5,h6){margin:0}
.rh-ops-billing-inline .paystack-subscription-status .paystack-update-card-link{
  display:inline !important;
  font-size:11px !important;
}
.rh-ops-pill-row{display:flex;gap:8px;flex-wrap:wrap}
.rh-ops-pill{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;background:#334155;color:#e2e8f0}
.rh-ops-pill.is-on{background:#14532d;color:#dcfce7}
.rh-ops-pill.is-off{background:#7f1d1d;color:#fee2e2}
.rh-ops-layout{display:grid;grid-template-columns:220px 1fr;min-height:62vh;background:#fff}
.rh-ops-layout.rh-ops-layout--single{grid-template-columns:1fr}
.rh-ops-nav{padding:14px;border-right:1px solid #e5e7eb;background:#f8fafc;display:flex;flex-direction:column;gap:8px}
.rh-ops-nav-btn{
border:1px solid #d1d5db;
background:#fff;
border-radius:8px;
padding:10px 12px;
text-align:left;
cursor:pointer;
font-weight:600;
color:#0f172a;
white-space:normal;
overflow-wrap:anywhere;
word-break:break-word;
line-height:1.3;
}
.rh-ops-nav-btn.active{background:#0f766e;color:#fff;border-color:#0f766e}
.rh-ops-content{padding:16px 18px;overflow:auto}
.rh-ops-panel{display:none}
.rh-ops-panel.active{display:block}
.rh-ops-panel h3{margin:0 0 4px}
.rh-ops-panel h4{margin:0 0 10px;color:#0f172a}
.rh-ops-sub{margin:0 0 14px;color:#6b7280}
.rh-ops-card{border:1px solid #e5e7eb;background:#f8fafc;border-radius:10px;padding:12px;margin:0 0 12px}
.rh-ops-wa-card{background:linear-gradient(180deg,#ffffff,#f8fafc);border-color:#dbe6f4;box-shadow:0 1px 1px rgba(15,23,42,.04)}
.rh-ops-wa-card--pairing{padding:14px}
.rh-ops-wa-card--credentials{padding:14px}
.rh-ops-wa-card--credentials .rh-ops-grid-2 label{background:#f1f5f9;border:1px solid #dbe6f4;border-radius:8px;padding:8px 10px}
.rh-ops-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rh-ops-grid-2 label{font-weight:600}
.rh-ops-collapse{border:1px solid #dbe6f4;border-radius:10px;background:#fff;overflow:hidden}
.rh-ops-collapse > summary{cursor:pointer;list-style:none;padding:10px 12px;font-weight:700;color:#0f172a;background:#f8fafc}
.rh-ops-collapse > summary::-webkit-details-marker{display:none}
.rh-ops-collapse > summary::after{content:'+';float:right;color:#334155}
.rh-ops-collapse[open] > summary::after{content:'-'}
.rh-ops-collapse-body{padding:10px 12px;border-top:1px solid #e2e8f0}
.rh-ops-bot-card{background:linear-gradient(160deg,#fffdf5,#fff7ed);border-color:#fde68a}
.rh-ops-botai-shell{background:linear-gradient(170deg,#fffcf5,#fffaf1);border-color:#f2d39a;box-shadow:0 3px 10px rgba(15,23,42,.05);padding:10px}
.rh-ops-bot-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.rh-ops-bot-head h4{font-size:14px}
.rh-ops-bot-badge{display:inline-flex;align-items:center;background:#b45309;color:#fff;border-radius:999px;padding:3px 10px;font-size:11px;font-weight:700;letter-spacing:.02em}
.rh-ops-botai-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.rh-ops-botai-tile{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;background:#fff;border:1px solid #e5e7eb;border-radius:9px;padding:7px 8px;min-height:0;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.rh-ops-botai-kpi.is-on{border-color:#86efac;background:#f0fdf4}
.rh-ops-botai-kpi.is-off{border-color:#fecaca;background:#fff7f7}
.rh-ops-botai-tile:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(15,23,42,.07)}
.rh-ops-botai-top{display:block}
.rh-ops-botai-title-row{display:flex;align-items:center;gap:4px}
.rh-ops-botai-top h5{margin:0;font-size:12px;color:#111827;line-height:1.25}
.rh-ops-botai-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:0}
.rh-ops-botai-state{display:inline-flex;align-items:center;gap:5px;padding:0;border-radius:0;font-size:10px;font-weight:700;line-height:1.15;background:transparent;white-space:nowrap}
.rh-ops-botai-state::before{content:"";width:7px;height:7px;border-radius:50%;background:#94a3b8;display:inline-block}
.rh-ops-botai-state.is-active{color:#166534}
.rh-ops-botai-state.is-active::before{background:#22c55e}
.rh-ops-botai-state.is-inactive{color:#b91c1c}
.rh-ops-botai-state.is-inactive::before{background:#ef4444}
.rh-ops-botai-dependency{margin:8px 0 4px;padding:7px 9px;border:1px solid #f59e0b;background:#fffbeb;color:#92400e;border-radius:8px;font-size:11px;line-height:1.35}
.rh-ops-botai-dependency.is-neutral{border-color:#cbd5e1;background:#f8fafc;color:#475569}
.rh-ops-kv{font-size:13px;color:#475569;background:#fff;border:1px dashed #cbd5e1;padding:6px 8px;border-radius:8px;margin:8px 0}
.rh-ops-kv code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.rh-ops-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.rh-ops-msg{font-size:13px;color:#6b7280}
.rh-ops-msg.ok{color:#166534}
.rh-ops-msg.err{color:#b91c1c}
.rh-ops-muted{color:#6b7280;font-size:13px}
.rh-ops-inline-spinner{display:none;width:16px;height:16px;border:2px solid #cbd5e1;border-top-color:#0f766e;border-radius:999px;animation:rhspin 1s linear infinite}
.rh-ops-inline-spinner.is-loading{display:inline-block}
.rh-ops-live-line{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.rh-ops-qr-wrap{text-align:center;padding:10px;border:1px dashed #cbd5e1;border-radius:10px;background:#fff}
#rhOpsWaQr{max-width:260px;width:100%;height:auto;border-radius:8px}
.rh-ops-switch-row{display:flex;gap:8px;align-items:center;border:1px solid #d1d5db;border-radius:8px;padding:8px 10px;background:#fff}
.rh-ops-switch-row--bot{border-color:#99f6e4;background:#ecfeff}
.rh-ops-switch-row--ai{border-color:#fed7aa;background:#fff7ed}
.rh-ops-switch-row--compact{margin-top:auto;justify-content:center;padding:8px 12px;border-radius:10px;font-weight:600}
.rh-ops-tip{
  position:relative;border:1px solid #cbd5e1;background:#fff;color:#334155;
  border-radius:999px;width:16px;height:16px;padding:0;line-height:14px;
  text-align:center;font-size:10px;font-weight:700;cursor:help;
}
.rh-ops-tip::after{
  content:attr(data-tip);position:absolute;left:50%;bottom:125%;transform:translateX(-50%);
  min-width:180px;max-width:240px;padding:7px 9px;border-radius:8px;
  background:#0f172a;color:#f8fafc;font-size:11px;line-height:1.35;
  box-shadow:0 6px 14px rgba(15,23,42,.25);opacity:0;pointer-events:none;
  transition:opacity .15s ease;z-index:20;text-align:left;font-weight:500;
}
.rh-ops-tip:hover::after,.rh-ops-tip:focus::after{opacity:1}
.rh-ops-toggle{position:relative;display:inline-flex;align-items:center;cursor:pointer}
.rh-ops-toggle input{
  position:absolute;opacity:0;width:0;height:0;
}
.rh-ops-toggle-ui{
  width:42px;height:24px;border-radius:999px;background:#cbd5e1;display:inline-block;
  position:relative;transition:background-color .2s ease;
}
.rh-ops-toggle-ui::before{
  content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;
  background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.28);transition:transform .2s ease;
}
.rh-ops-toggle input:checked + .rh-ops-toggle-ui{background:#10b981}
.rh-ops-toggle input:checked + .rh-ops-toggle-ui::before{transform:translateX(18px)}
.rh-ops-toggle input:focus-visible + .rh-ops-toggle-ui{
  outline:2px solid #0f766e;outline-offset:2px;
}
/* Keep compact controls isolated to Bot & AI panel only */
.rh-ops-panel[data-ops-panel="botai"] .rh-ops-tip{
  width:15px;height:15px;line-height:13px;font-size:9px;
}
.rh-ops-panel[data-ops-panel="botai"] .rh-ops-tip::after{
  min-width:160px;max-width:220px;padding:6px 8px;border-radius:7px;font-size:10px;line-height:1.3;
}
.rh-ops-panel[data-ops-panel="botai"] .rh-ops-toggle-ui{
  width:36px;height:20px;
}
.rh-ops-panel[data-ops-panel="botai"] .rh-ops-toggle-ui::before{
  top:2px;left:2px;width:16px;height:16px;
}
.rh-ops-panel[data-ops-panel="botai"] .rh-ops-toggle input:checked + .rh-ops-toggle-ui::before{
  transform:translateX(16px);
}
.rh-ops-email-flow{margin-top:12px}
.rh-ops-email-flow label{font-weight:600}
.rh-ops-email-flow input[type="email"],
.rh-ops-email-flow input[type="password"]{width:100%;max-width:540px}
#rhOpsEmailPasswordWrap{padding:10px;border:1px dashed #cbd5e1;background:#fff;border-radius:8px}
.rh-ops-email-review{margin-top:10px;padding:10px;border:1px dashed #cbd5e1;border-radius:8px;background:#fff}
.rh-ops-email-review summary{cursor:pointer;font-weight:600}
.rh-ops-email-connected{background:#f0fdf4;border-color:#bbf7d0}
.rh-ops-email-connected-row{display:flex;align-items:center;gap:12px}
.rh-ops-email-connected-icon{width:28px;height:28px;object-fit:contain}
.rh-ops-email-connected-title{font-weight:700;color:#166534}
.rh-ops-email-connected-sub{font-size:13px;color:#166534}
.rh-ops-email-connected-badge{margin-left:auto;background:#166534;color:#dcfce7;border-radius:999px;padding:3px 8px;font-size:12px;font-weight:700}
.rh-ops-email-connected .rh-ops-actions{margin-top:10px}
.rh-ops-email-collapse{margin-top:10px}
.rh-ops-email-collapse > summary::after{content:'▸'}
.rh-ops-email-collapse[open] > summary::after{content:'▾'}
.rh-ops-email-collapse input[readonly]{background:#f8fafc;color:#475569}
.rh-ops-email-debug{margin-top:10px;border:1px solid #dbeafe;background:#f8fbff;border-radius:8px;padding:8px 10px}
.rh-ops-email-debug > summary{cursor:pointer;font-weight:600;color:#1e3a8a}
.rh-ops-email-debug-output{
  margin:8px 0 0;
  background:#0b1020;
  color:#dbeafe;
  border-radius:6px;
  padding:10px;
  font-size:12px;
  line-height:1.45;
  max-height:320px;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
}
.rh-ops-spam-score{
  border:1px dashed #cbd5e1;border-radius:10px;background:#fff;padding:10px 12px;margin:8px 0 10px;
}
.rh-ops-spam-score-label{font-size:12px;color:#475569;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.rh-ops-spam-score-value{font-size:28px;line-height:1.05;font-weight:800;color:#0f172a}
.rh-ops-spam-score-note{font-size:12px;color:#475569}
.rh-ops-spam-score.is-good{border-color:#86efac;background:#f0fdf4}
.rh-ops-spam-score.is-fair{border-color:#fde68a;background:#fffbeb}
.rh-ops-spam-score.is-risk{border-color:#fecaca;background:#fef2f2}
.rh-ops-spam-check-list{display:grid;gap:8px}
.rh-ops-spam-item{border:1px solid #e5e7eb;border-radius:8px;background:#fff;padding:8px 10px}
.rh-ops-spam-item.is-valid{border-color:#86efac;background:#f0fdf4}
.rh-ops-spam-item.is-invalid{border-color:#fecaca;background:#fef2f2}
.rh-ops-spam-item-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.rh-ops-spam-chip{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:700}
.rh-ops-spam-chip.is-valid{background:#166534;color:#dcfce7}
.rh-ops-spam-chip.is-invalid{background:#991b1b;color:#fee2e2}
.rh-ops-spam-item code{
  display:block;margin:0 0 4px;padding:5px 6px;background:#0f172a;color:#e2e8f0;border-radius:6px;
  white-space:normal;word-break:break-word;font-size:11px;
}
.rh-ops-spam-item p{margin:0;color:#475569;font-size:12px}

/* AI usage panel overhaul */
.rh-ai-usage-shell{
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  border-color:#dbe6f4;
  padding:14px;
}
.rh-ai-usage-section{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px;
  margin:0 0 12px;
}
.rh-ai-usage-section:last-child{margin-bottom:0}
.rh-ai-usage-section h4{
  margin:0 0 4px;
  font-size:15px;
  line-height:1.3;
}
.rh-ai-usage-note{
  margin:0 0 10px;
  color:#475569;
  font-size:13px;
  line-height:1.5;
}
.rh-ai-usage-kpi-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.rh-ai-usage-kpi{
  border:1px solid #dbe6f4;
  background:linear-gradient(165deg,#f8fbff,#eef6ff);
  border-radius:10px;
  padding:10px;
}
.rh-ai-usage-kpi h5{
  margin:0 0 6px;
  font-size:12px;
  color:#334155;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.rh-ai-usage-kpi strong{
  display:block;
  font-size:22px;
  line-height:1.15;
  color:#0f172a;
}
.rh-ai-usage-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin:0 0 2px;
}
.rh-ai-usage-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  background:#0f766e;
  color:#fff;
  font-size:11px;
  font-weight:700;
  padding:4px 8px;
  white-space:nowrap;
}
.rh-ai-usage-chip--soft{
  background:#dbeafe;
  color:#1e3a8a;
}
.rh-ai-usage-grid label{
  font-weight:600;
}
.rh-ai-usage-grid p{
  margin:0;
}
.rh-ai-usage-section .rh-ops-actions{
  margin-top:6px;
}
.rh-ai-usage-toggle-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  min-height:40px;
  border:1px solid #dbe6f4;
  background:#f8fbff;
  border-radius:10px;
  padding:8px 10px;
}
.rh-ai-usage-toggle-line > span{
  font-weight:600;
  color:#0f172a;
}
.rh-ai-usage-inline-help{
  margin-top:10px;
  border:1px solid #dbe6f4;
  border-radius:10px;
  background:#f8fbff;
  padding:10px;
}
.rh-ai-usage-inline-help h5{
  margin:0 0 8px;
  color:#0f172a;
  font-size:13px;
}
.rh-ai-usage-inline-help ol{
  margin:0;
  padding-left:18px;
  color:#334155;
  font-size:13px;
  line-height:1.45;
}
.rh-ai-usage-inline-help li + li{
  margin-top:5px;
}
@media (max-width: 900px){
  .rh-ops-layout{grid-template-columns:1fr}
  .rh-ops-nav{border-right:none;border-bottom:1px solid #e5e7eb;flex-direction:row;overflow:auto}
  .rh-ops-nav-btn{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
  .rh-ops-grid-2{grid-template-columns:1fr}
  .rh-ops-bot-grid{grid-template-columns:1fr}
  .rh-ops-botai-grid{grid-template-columns:1fr}
  .rh-ai-usage-kpi-grid{grid-template-columns:1fr}
  .rh-ops-botai-tile{grid-template-columns:minmax(0,1fr) auto;min-height:unset}
  .rh-ops-botai-actions{justify-content:space-between}
  .rh-ops-header-top{display:block}
  .rh-ops-header-actions{position:static;justify-content:flex-start;align-items:flex-start;margin:8px 0 8px}
  .rh-ops-status-row{align-items:flex-start}
  .rh-ops-billing-inline{margin-left:0;text-align:left}
}

/* Onboarding wizard spacing guardrail (AI Research + review forms) */
.paystack-wizard-modal-content .paystack-wizard-body .company-research-form{
  margin-bottom:24px;
}
.paystack-wizard-modal-content .paystack-wizard-body .form-group{
  margin:0 0 18px !important;
}
.paystack-wizard-modal-content .paystack-wizard-body .form-group:last-child{
  margin-bottom:0 !important;
}
.paystack-wizard-modal-content .paystack-wizard-body .form-group > label{
  display:block !important;
  margin:0 0 8px !important;
  font-weight:600;
  line-height:1.35;
}
.paystack-wizard-modal-content .paystack-wizard-body .form-group > input,
.paystack-wizard-modal-content .paystack-wizard-body .form-group > select,
.paystack-wizard-modal-content .paystack-wizard-body .form-group > textarea{
  display:block !important;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.paystack-wizard-modal-content .paystack-wizard-body .form-group > input[type="hidden"]{
  display:none !important;
  width:auto !important;
  max-width:none !important;
}
.paystack-wizard-modal-content .paystack-wizard-body .form-group > input[type="file"]{
  padding:6px 0;
  line-height:1.4;
}
.paystack-wizard-modal-content .paystack-wizard-body .form-group > small{
  display:block !important;
  margin:6px 0 0 !important;
  line-height:1.45;
}

/* Rerun-only close button injected by dashboard.js (does not affect first-run wizard flow) */
.paystack-wizard-modal-content .rh-rerun-close-btn{
  position:absolute;
  top:12px;
  right:14px;
  width:34px;
  height:34px;
  border:1px solid rgba(255,255,255,.4);
  border-radius:999px;
  background:rgba(0,0,0,.22);
  color:#fff;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  z-index:5;
}
.paystack-wizard-modal-content .rh-rerun-close-btn:hover{
  background:rgba(0,0,0,.35);
}

