/**
 * AllOfBD Dashboard — unified with My Dashboard (.aob-user)
 * Same ink rail, teal accent, IBM Plex, paper plane
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --aob-ink: #0f172a;
  --aob-ink-soft: #1e293b;
  --aob-rail: #0b1220;
  --aob-rail-edge: rgba(148, 163, 184, 0.18);
  --aob-rail-text: #94a3b8;
  --aob-rail-muted: #64748b;
  --aob-muted: #64748b;
  --aob-line: #e2e8f0;
  --aob-paper: #f1f5f9;
  --aob-white: #ffffff;
  --aob-accent: #0f766e;
  --aob-accent-deep: #0d9488;
  --aob-accent-soft: #ccfbf1;
  --aob-ok: #047857;
  --aob-ok-bg: #ecfdf5;
  --aob-warn: #9a3412;
  --aob-warn-bg: #fff4eb;
  --aob-err: #b91c1c;
  --aob-err-bg: #fef2f2;
  --aob-display: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --aob-sans: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --aob-radius: 10px;
}

/* =========================================================
   Full-page canvas — ONLY while AllOfBD panels are open
   (never touch native ListingPro pages like Announcements)
   ========================================================= */
body.allofbd-panel-open #wrapper,
body.allofbd-panel-open #page-content-wrapper,
body.allofbd-panel-open .dashboard-content,
body.allofbd-panel-open .dashboard-content-inner,
body.allofbd-panel-open .panel-dashboard {
  background: var(--aob-paper) !important;
  background-color: var(--aob-paper) !important;
  color: var(--aob-ink) !important;
  min-height: calc(100vh - 32px) !important;
}

body.allofbd-panel-open #page-content-wrapper > *:not(#allofbd-dash-panels-root) {
  display: none !important;
}

/* =========================================================
   Unified shell — match My Dashboard grid feel
   ========================================================= */
body.aob-unified-dash #wrapper,
body.listing-author #wrapper {
  background: var(--aob-paper) !important;
}

body.aob-unified-dash #page-content-wrapper,
body.aob-unified-dash .dashboard-content,
body.aob-unified-dash .dashboard-content-inner {
  background: var(--aob-paper) !important;
  font-family: var(--aob-sans) !important;
  color: var(--aob-ink) !important;
}

.aob-unified-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 14px 16px;
  border-bottom: 1px solid var(--aob-rail-edge);
  margin-bottom: 8px;
  font-family: var(--aob-sans) !important;
}

.aob-unified-brand__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
}

.aob-unified-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--aob-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.aob-unified-brand__name {
  font-size: 14px;
  font-weight: 650;
  color: #f8fafc;
  line-height: 1.2;
}

.aob-unified-brand__sub {
  font-size: 11px;
  margin-top: 2px;
  color: var(--aob-rail-text);
}

.aob-unified-brand__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px;
}

.aob-unified-brand__links a {
  display: block !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--aob-rail-text) !important;
  text-decoration: none !important;
  background: transparent !important;
  margin: 0 !important;
}

.aob-unified-brand__links a:hover {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #e2e8f0 !important;
}

.aob-unified-brand__links a.is-here {
  background: rgba(15, 118, 110, 0.28) !important;
  color: #f8fafc !important;
  font-weight: 600 !important;
}

#sidebar-wrapper .sidebar-brand.aob-unified-brand-hide,
.sidebar-brand.aob-unified-brand-hide,
.aob-unified-brand-hide {
  display: none !important;
}

/* =========================================================
   Chrome cleanup — match My Dashboard app feel
   ========================================================= */
body.aob-unified-dash .page-heading.listing-page,
body.aob-unified-dash .page-heading,
body.aob-unified-dash .page-header-overlay,
body.page-template-template-dashboard .page-heading {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Google Auto Ads inject “Discover more” into dashboard header — kill on dashboards */
body.aob-unified-dash .google-auto-placed,
body.aob-unified-dash ins.adsbygoogle,
body.aob-unified-dash .header-container > .google-auto-placed,
body.page-template-template-dashboard .google-auto-placed,
body.page-template-template-dashboard ins.adsbygoogle,
body.aob-admin-chrome-free .google-auto-placed,
body.aob-admin-chrome-free ins.adsbygoogle {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.aob-unified-dash .lp-user-header {
  background: var(--aob-white) !important;
  border-bottom: 1px solid var(--aob-line) !important;
  padding: 12px 16px !important;
  margin: 0 0 12px !important;
  font-family: var(--aob-sans) !important;
}

body.aob-unified-dash .dashboard-content,
body.aob-unified-dash .page-content.dashboard-content {
  background: var(--aob-paper) !important;
  font-family: var(--aob-sans) !important;
}

/* iframe embed: strip LP chrome so My Dashboard owns the shell */
body.aob-embed-mode #wpadminbar,
body.aob-embed-mode .lp-header,
body.aob-embed-mode .header-container,
body.aob-embed-mode .page-heading,
body.aob-embed-mode #sidebar-wrapper,
body.aob-embed-mode .lp-dashboard-sidebar,
body.aob-embed-mode #allofbd-unified-brand,
body.aob-embed-mode .google-auto-placed,
body.aob-embed-mode ins.adsbygoogle,
body.aob-embed-mode .lp-user-header {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.aob-embed-mode #page-content-wrapper,
body.aob-embed-mode .dashboard-content {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 12px 16px 24px !important;
  background: #fff !important;
}

/* =========================================================
   Sidebar rail — match .aob-user__sidebar
   ========================================================= */
#sidebar-wrapper,
#sidebar-wrapper.toggled,
.lp-dashboard-sidebar,
aside.dashboard-sidebar {
  background: var(--aob-rail) !important;
  border-right: 1px solid var(--aob-rail-edge) !important;
  font-family: var(--aob-sans) !important;
  width: 240px !important;
  min-width: 240px !important;
}

#sidebar,
ul.sidebar-nav,
#sidebar-wrapper ul.sidebar-nav {
  background: transparent !important;
  padding: 8px 0 28px !important;
  margin: 0 !important;
}

#sidebar-wrapper .sidebar-brand,
.sidebar-brand {
  background: transparent !important;
  border-bottom: 1px solid var(--aob-rail-edge) !important;
}

#sidebar-wrapper .sidebar-brand a,
.sidebar-brand a {
  color: #f8fafc !important;
  font-family: var(--aob-sans) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
}

/* Section labels */
.allofbd-sidebar-section-header,
#sidebar-wrapper .allofbd-sidebar-section-header,
ul.sidebar-nav > li.allofbd-sidebar-section-header {
  display: block !important;
  padding: 22px 20px 8px !important;
  margin: 6px 0 0 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--aob-rail-muted) !important;
  list-style: none !important;
  pointer-events: none !important;
  border-top: 1px solid var(--aob-rail-edge) !important;
  background: transparent !important;
}

#sidebar-wrapper ul.sidebar-nav > li,
#sidebar > li,
ul.sidebar-nav > li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  border: 0 !important;
  background: transparent !important;
}

/* Hide duplicate invoice rows ListingPro sometimes injects */
ul.sidebar-nav > li.allofbd-nav-dupe {
  display: none !important;
}

#sidebar-wrapper ul.sidebar-nav li a,
#sidebar li a,
ul.sidebar-nav > li > a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 2px 8px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 0 !important;
  border-left: 0 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  color: var(--aob-rail-text) !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#sidebar-wrapper ul.sidebar-nav li a i,
#sidebar li a i,
ul.sidebar-nav > li > a i {
  width: 18px !important;
  text-align: center !important;
  opacity: 0.78 !important;
  font-size: 14px !important;
  color: inherit !important;
}

#sidebar-wrapper ul.sidebar-nav li a:hover,
#sidebar li a:hover,
ul.sidebar-nav > li > a:hover {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #e2e8f0 !important;
}

#sidebar-wrapper ul.sidebar-nav li a:hover i,
#sidebar li a:hover i {
  opacity: 1 !important;
}

#sidebar-wrapper ul.sidebar-nav li.active > a,
#sidebar li.active > a,
ul.sidebar-nav > li.active > a,
#sidebar-wrapper ul.sidebar-nav li.allofbd-nav-active > a {
  background: rgba(15, 118, 110, 0.28) !important;
  color: #f8fafc !important;
  font-weight: 600 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

#sidebar-wrapper ul.sidebar-nav li.active > a i,
#sidebar li.active > a i,
ul.sidebar-nav > li.active > a i {
  opacity: 1 !important;
  color: #ffffff !important;
}

/* =========================================================
   Panel root — always fills the content column
   ========================================================= */
#allofbd-dash-panels-root {
  display: none !important;
  box-sizing: border-box;
  width: 100% !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  font-family: var(--aob-sans);
  color: var(--aob-ink);
  position: relative;
  z-index: 5;
}

body.allofbd-panel-open #allofbd-dash-panels-root {
  display: block !important;
  height: auto !important;
  min-height: calc(100vh - 32px) !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 0 64px !important;
  background: var(--aob-paper) !important;
}

.aob-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 28px 16px;
  animation: aob-in 0.4s ease both;
}

@keyframes aob-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.aob-hero {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--aob-line);
}

.aob-hero--kyc {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.aob-hero__copy {
  min-width: 0;
  flex: 1;
}

.aob-hero__badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--aob-line);
  background: linear-gradient(180deg, #ffffff 0%, #f3f7f8 100%);
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.05);
}

.aob-hero__badge-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--aob-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.aob-hero__badge-text {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aob-ink);
}

.aob-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aob-accent);
}

.aob-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aob-accent);
}

.aob-title {
  margin: 0 0 8px;
  font-family: var(--aob-display);
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--aob-ink);
}

.aob-lede {
  margin: 0;
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--aob-muted);
}

.aob-subtitle {
  margin: 0 0 6px;
  font-family: var(--aob-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--aob-ink);
}

.aob-note,
.aob-hint {
  display: block;
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--aob-muted);
}

.aob-stage__head .aob-note {
  margin-bottom: 18px;
}

.aob-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.aob-metrics--band {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--aob-line);
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.045);
}

.aob-metrics--band .aob-metric {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-top: 0;
  border-right: 1px solid var(--aob-line);
  background: transparent;
  box-shadow: none;
}

.aob-metrics--band .aob-metric:last-child {
  border-right: 0;
}

.aob-metric__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--aob-accent-soft);
  color: var(--aob-accent);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.aob-metric__icon--ok {
  background: var(--aob-ok-bg);
  color: var(--aob-ok);
}

.aob-metric__body {
  min-width: 0;
}

.aob-metric {
  padding: 14px 16px;
  border-top: 2px solid var(--aob-accent);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 0 rgba(16, 24, 32, 0.04);
}

.aob-metric__val {
  display: block;
  font-family: var(--aob-display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  color: var(--aob-ink);
}

.aob-metric__lbl {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aob-muted);
}

.aob-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

.aob-stage,
.aob-registry {
  background: var(--aob-white);
  border: 1px solid var(--aob-line);
  padding: 22px 22px 24px;
  box-shadow: 0 10px 30px rgba(16, 24, 32, 0.04);
}

.aob-stage--narrow {
  max-width: 480px;
}

.aob-registry__head {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--aob-line);
}

.aob-search {
  display: block;
  margin-top: 12px;
}

.aob-search input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--aob-line);
  border-radius: 8px;
  background: #fbfcfd;
  font-family: var(--aob-sans);
  font-size: 0.92rem;
  color: var(--aob-ink);
}

.aob-search input[type="search"]:focus {
  outline: none;
  border-color: var(--aob-accent);
  box-shadow: 0 0 0 3px rgba(14, 79, 86, 0.12);
  background: #fff;
}

.aob-registry__body {
  max-height: 420px;
  overflow: auto;
}

.aob-registry__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aob-registry__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid #e8edf2;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.aob-registry__row:last-child {
  border-bottom: 0;
}

.aob-registry__row:hover,
.aob-registry__row.is-selected {
  background: #f5f9f9;
  border-left-color: var(--aob-accent);
}

.aob-registry__pick {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  flex: 1;
}

.aob-registry__pick:hover .aob-registry__name,
.aob-registry__pick:focus-visible .aob-registry__name {
  color: var(--aob-accent);
}

.aob-registry__name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--aob-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aob-registry__meta {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--aob-muted);
}

.aob-pill {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
}

.aob-pill.is-verified {
  color: var(--aob-ok);
  background: var(--aob-ok-bg);
  border-color: #bbf7d0;
}

.aob-pill.is-pending {
  color: #854d0e;
  background: #fef9c3;
  border-color: #fde68a;
}

.aob-pill.is-rejected {
  color: var(--aob-err);
  background: var(--aob-err-bg);
  border-color: #fecaca;
}

.aob-pill.is-empty {
  color: var(--aob-muted);
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.aob-form {
  margin-top: 4px;
}

.aob-field {
  margin-bottom: 16px;
}

.aob-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}

.aob-field input[type="text"],
.aob-field input[type="password"],
.aob-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--aob-line);
  border-radius: 8px;
  background: #fbfcfd;
  font-family: var(--aob-sans);
  font-size: 1rem;
  color: var(--aob-ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.aob-field input[type="password"] {
  letter-spacing: 0.28em;
  font-size: 1.15rem;
}

.aob-field input:focus,
.aob-field select:focus {
  outline: none;
  border-color: var(--aob-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 79, 86, 0.12);
}

.aob-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 22px 18px;
  border: 1px dashed #9db0b3;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fbfb 0%, #eef6f6 100%);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.aob-drop__glyph {
  font-size: 1.1rem;
  color: var(--aob-accent);
  margin-bottom: 4px;
}

.aob-drop:hover,
.aob-drop:focus-within {
  border-color: var(--aob-accent);
  background: var(--aob-accent-soft);
}

.aob-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.aob-drop__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--aob-ink);
}

.aob-drop__sub {
  font-size: 0.85rem;
  color: var(--aob-muted);
}

.aob-btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--aob-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 13px 18px;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.aob-btn--primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--aob-accent) 0%, var(--aob-accent-deep) 100%);
}

.aob-btn--primary:hover {
  transform: translateY(-1px);
}

.aob-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.aob-status,
.aob-toast {
  margin-bottom: 16px;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--aob-ink);
}

.aob-status--ok,
.aob-toast--ok {
  color: var(--aob-ok);
  background: var(--aob-ok-bg);
  border-color: #bbf7d0;
}

.aob-status--warn {
  color: var(--aob-warn);
  background: var(--aob-warn-bg);
  border-color: #fed7aa;
}

.aob-status--err,
.aob-toast--err {
  color: var(--aob-err);
  background: var(--aob-err-bg);
  border-color: #fecaca;
}

.aob-toast {
  margin-top: 14px;
  margin-bottom: 0;
}

.aob-empty {
  margin: 8px 0;
  color: var(--aob-muted);
  font-size: 0.92rem;
}

/* Soften third-party clutter while our panels are open */
body.allofbd-panel-open iframe[src*="apnic"],
body.allofbd-panel-open [id*="apnic" i],
body.allofbd-panel-open .apn-banner {
  display: none !important;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .aob-split {
    grid-template-columns: 1fr;
  }

  .aob-hero--kyc {
    flex-direction: column;
    align-items: flex-start;
  }

  .aob-metrics--band {
    grid-template-columns: 1fr;
  }

  .aob-metrics--band .aob-metric {
    border-right: 0;
    border-bottom: 1px solid var(--aob-line);
  }

  .aob-metrics--band .aob-metric:last-child {
    border-bottom: 0;
  }

  .aob-registry__body {
    max-height: 280px;
  }
}

@media (max-width: 560px) {
  .aob-metrics {
    grid-template-columns: 1fr;
  }

  .aob-shell {
    padding: 20px 16px 12px;
  }
}
