/*
  Client Registry focused polish.
  Scope is enabled only by client-registry-polish.js when the real
  authenticated Client Registry screen is present.
*/
body.iqb-client-registry-polish {
  --iqb-fiori-bg: #f5f6f7;
  --iqb-fiori-surface: #ffffff;
  --iqb-fiori-surface-soft: #f7f9fb;
  --iqb-fiori-border: #d9dde3;
  --iqb-fiori-border-strong: #b8c2cc;
  --iqb-fiori-text: #223548;
  --iqb-fiori-muted: #5b6f83;
  --iqb-fiori-blue: #0a6ed1;
  --iqb-fiori-blue-dark: #0854a0;
  --iqb-fiori-green: #107e3e;
  --iqb-fiori-cyan: #0070b1;
  --iqb-fiori-red: #bb0000;
  background: var(--iqb-fiori-bg) !important;
  color: var(--iqb-fiori-text) !important;
}

body.iqb-client-registry-polish header {
  background: #ffffff !important;
  border-bottom: 1px solid var(--iqb-fiori-border) !important;
  box-shadow: 0 1px 2px rgba(34, 53, 72, 0.06) !important;
}

body.iqb-client-registry-polish aside {
  background: #ffffff !important;
  border-right: 1px solid var(--iqb-fiori-border) !important;
  box-shadow: none !important;
}

body.iqb-client-registry-polish main,
body.iqb-client-registry-polish .bg-slate-50,
body.iqb-client-registry-polish .bg-\[\#eef4fb\] {
  background: var(--iqb-fiori-bg) !important;
}

body.iqb-client-registry-polish section.rounded-3xl,
body.iqb-client-registry-polish .rounded-3xl.border,
body.iqb-client-registry-polish .rounded-\[30px\].border,
body.iqb-client-registry-polish .rounded-\[34px\].border {
  border: 1px solid var(--iqb-fiori-border) !important;
  border-radius: 12px !important;
  background: var(--iqb-fiori-surface) !important;
  box-shadow: 0 1px 3px rgba(34, 53, 72, 0.08) !important;
}

body.iqb-client-registry-polish section.rounded-3xl:first-of-type {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%) !important;
}

body.iqb-client-registry-polish h1,
body.iqb-client-registry-polish h2,
body.iqb-client-registry-polish h3,
body.iqb-client-registry-polish strong,
body.iqb-client-registry-polish .text-slate-900,
body.iqb-client-registry-polish .text-slate-950 {
  color: var(--iqb-fiori-text) !important;
}

body.iqb-client-registry-polish .text-slate-600,
body.iqb-client-registry-polish .text-slate-500,
body.iqb-client-registry-polish .text-slate-400 {
  color: var(--iqb-fiori-muted) !important;
}

body.iqb-client-registry-polish .tracking-\[0\.3em\],
body.iqb-client-registry-polish .tracking-\[0\.18em\] {
  letter-spacing: 0.14em !important;
}

body.iqb-client-registry-polish .rounded-2xl,
body.iqb-client-registry-polish .rounded-xl {
  border-radius: 8px !important;
}

body.iqb-client-registry-polish .border-slate-200,
body.iqb-client-registry-polish .border-slate-300 {
  border-color: var(--iqb-fiori-border) !important;
}

body.iqb-client-registry-polish .bg-slate-50,
body.iqb-client-registry-polish .bg-slate-100 {
  background-color: var(--iqb-fiori-surface-soft) !important;
}

body.iqb-client-registry-polish .bg-slate-900,
body.iqb-client-registry-polish button.bg-slate-900 {
  background-color: var(--iqb-fiori-blue-dark) !important;
  border-color: var(--iqb-fiori-blue-dark) !important;
  color: #ffffff !important;
}

body.iqb-client-registry-polish button,
body.iqb-client-registry-polish input,
body.iqb-client-registry-polish select,
body.iqb-client-registry-polish textarea {
  border-color: var(--iqb-fiori-border) !important;
  box-shadow: none !important;
}

body.iqb-client-registry-polish input:focus,
body.iqb-client-registry-polish select:focus,
body.iqb-client-registry-polish textarea:focus,
body.iqb-client-registry-polish button:focus-visible {
  border-color: var(--iqb-fiori-blue) !important;
  outline: 2px solid rgba(10, 110, 209, 0.18) !important;
  outline-offset: 1px !important;
}

body.iqb-client-registry-polish aside a,
body.iqb-client-registry-polish aside button {
  color: #183b5b !important;
}

body.iqb-client-registry-polish aside .bg-\[\#b8d4ea\],
body.iqb-client-registry-polish aside [aria-current="page"],
body.iqb-client-registry-polish aside a[class*="bg-"] {
  background: #e5f2fd !important;
  border-color: #9dccf3 !important;
  color: #073763 !important;
}

body.iqb-client-registry-polish .grid.min-w-\[240px\] > div,
body.iqb-client-registry-polish .rounded-2xl.border.bg-slate-50,
body.iqb-client-registry-polish .rounded-2xl.border.bg-emerald-50,
body.iqb-client-registry-polish .rounded-2xl.border.bg-violet-50,
body.iqb-client-registry-polish .rounded-2xl.border.bg-cyan-50,
body.iqb-client-registry-polish .rounded-2xl.border.bg-amber-50 {
  border-radius: 10px !important;
  box-shadow: none !important;
}

body.iqb-client-registry-polish .bg-emerald-50 {
  background: #edf7ed !important;
  border-color: #b7d7b7 !important;
}

body.iqb-client-registry-polish .text-emerald-700,
body.iqb-client-registry-polish .text-emerald-900 {
  color: var(--iqb-fiori-green) !important;
}

body.iqb-client-registry-polish .bg-cyan-50 {
  background: #eaf4ff !important;
  border-color: #b8d7f1 !important;
}

body.iqb-client-registry-polish .text-cyan-700,
body.iqb-client-registry-polish .text-cyan-900 {
  color: var(--iqb-fiori-cyan) !important;
}

body.iqb-client-registry-polish .bg-violet-50 {
  background: #f1effb !important;
  border-color: #d6d0ef !important;
}

body.iqb-client-registry-polish .text-violet-700,
body.iqb-client-registry-polish .text-violet-900 {
  color: #5d36a8 !important;
}

body.iqb-client-registry-polish .bg-amber-50 {
  background: #fff4e5 !important;
  border-color: #ffd0a6 !important;
}

body.iqb-client-registry-polish .text-amber-700,
body.iqb-client-registry-polish .text-amber-900 {
  color: #8a4b00 !important;
}

body.iqb-client-registry-polish .overflow-hidden.rounded-2xl.border {
  border-radius: 10px !important;
  border-color: var(--iqb-fiori-border) !important;
  background: #ffffff !important;
}

body.iqb-client-registry-polish .hidden.bg-slate-50 {
  background: #eff4f9 !important;
  color: #223548 !important;
  border-bottom: 1px solid var(--iqb-fiori-border) !important;
}

body.iqb-client-registry-polish article {
  background: #ffffff !important;
}

body.iqb-client-registry-polish article:hover {
  background: #f8fbff !important;
}

body.iqb-client-registry-polish .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: #e5e9ef !important;
}

body.iqb-client-registry-polish .rounded-full.bg-slate-100,
body.iqb-client-registry-polish .rounded-full.bg-slate-200 {
  background: #eef2f5 !important;
  color: #334e68 !important;
}

body.iqb-client-registry-polish .rounded-full.bg-blue-50 {
  background: #e5f2fd !important;
  color: var(--iqb-fiori-blue-dark) !important;
}

body.iqb-client-registry-polish .rounded-full.bg-emerald-100 {
  background: #dff3df !important;
  color: var(--iqb-fiori-green) !important;
}

body.iqb-client-registry-polish .rounded-full.bg-slate-900 {
  background: #223548 !important;
  color: #ffffff !important;
}

body.iqb-client-registry-polish button.text-red-700,
body.iqb-client-registry-polish .text-red-700 {
  color: var(--iqb-fiori-red) !important;
}

body.iqb-client-registry-polish button.bg-red-50 {
  background: #fff1f1 !important;
  border-color: #ffc6c6 !important;
}

body.iqb-client-registry-polish .iqb-platform-owner-row {
  background: #f7fbff !important;
  box-shadow: inset 3px 0 0 var(--iqb-fiori-blue) !important;
}

/*
  Fallback: if the route-level script does not add the body class in a cached
  browser session, still make authenticated IQBusiness pages visibly coherent.
  This is intentionally shell-scoped via aside so login/public pages are safe.
*/
@supports selector(body:has(aside)) {
  body:has(aside) {
    --iqb-fiori-bg: #f4f6f8;
    --iqb-fiori-surface: #ffffff;
    --iqb-fiori-surface-soft: #f7f9fb;
    --iqb-fiori-border: #d9dde3;
    --iqb-fiori-border-strong: #b8c2cc;
    --iqb-fiori-text: #223548;
    --iqb-fiori-muted: #5b6f83;
    --iqb-fiori-blue: #0a6ed1;
    --iqb-fiori-blue-dark: #0854a0;
    --iqb-fiori-green: #107e3e;
    --iqb-fiori-cyan: #0070b1;
    --iqb-fiori-red: #bb0000;
    background: var(--iqb-fiori-bg) !important;
    color: var(--iqb-fiori-text) !important;
  }

  body:has(aside) header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--iqb-fiori-border) !important;
    box-shadow: 0 1px 3px rgba(34, 53, 72, 0.08) !important;
  }

  body:has(aside) aside {
    background: #ffffff !important;
    border-right: 1px solid var(--iqb-fiori-border) !important;
    box-shadow: none !important;
  }

  body:has(aside) main,
  body:has(aside) .bg-slate-50,
  body:has(aside) .bg-\[\#eef4fb\] {
    background: var(--iqb-fiori-bg) !important;
  }

  body:has(aside) section.rounded-3xl,
  body:has(aside) .rounded-3xl.border,
  body:has(aside) .rounded-\[30px\].border,
  body:has(aside) .rounded-\[34px\].border {
    border: 1px solid var(--iqb-fiori-border) !important;
    border-radius: 12px !important;
    background: var(--iqb-fiori-surface) !important;
    box-shadow: 0 1px 3px rgba(34, 53, 72, 0.08) !important;
  }

  body:has(aside) h1,
  body:has(aside) h2,
  body:has(aside) h3,
  body:has(aside) strong,
  body:has(aside) .text-slate-900,
  body:has(aside) .text-slate-950 {
    color: var(--iqb-fiori-text) !important;
  }

  body:has(aside) .text-slate-600,
  body:has(aside) .text-slate-500,
  body:has(aside) .text-slate-400 {
    color: var(--iqb-fiori-muted) !important;
  }

  body:has(aside) .border-slate-200,
  body:has(aside) .border-slate-300 {
    border-color: var(--iqb-fiori-border) !important;
  }

  body:has(aside) .bg-slate-50,
  body:has(aside) .bg-slate-100 {
    background-color: var(--iqb-fiori-surface-soft) !important;
  }

  body:has(aside) .bg-slate-900,
  body:has(aside) button.bg-slate-900 {
    background-color: var(--iqb-fiori-blue-dark) !important;
    border-color: var(--iqb-fiori-blue-dark) !important;
    color: #ffffff !important;
  }

  body:has(aside) aside .bg-\[\#b8d4ea\],
  body:has(aside) aside [aria-current="page"],
  body:has(aside) aside a[class*="bg-"] {
    background: #e5f2fd !important;
    border-color: #9dccf3 !important;
    color: #073763 !important;
  }

  body:has(aside) .hidden.bg-slate-50 {
    background: #eaf4ff !important;
    color: var(--iqb-fiori-text) !important;
    border-bottom: 1px solid var(--iqb-fiori-border) !important;
  }

  body:has(aside) article:hover {
    background: #f8fbff !important;
  }

  body:has(aside) .rounded-full.bg-blue-50 {
    background: #e5f2fd !important;
    color: var(--iqb-fiori-blue-dark) !important;
  }

  body:has(aside) .rounded-full.bg-emerald-100,
  body:has(aside) .bg-emerald-50 {
    background: #edf7ed !important;
    color: var(--iqb-fiori-green) !important;
    border-color: #b7d7b7 !important;
  }

  body:has(aside) .bg-cyan-50 {
    background: #eaf4ff !important;
    color: var(--iqb-fiori-cyan) !important;
    border-color: #b8d7f1 !important;
  }

  body:has(aside) .bg-violet-50 {
    background: #f1effb !important;
    border-color: #d6d0ef !important;
  }

  body:has(aside) .bg-amber-50 {
    background: #fff4e5 !important;
    border-color: #ffd0a6 !important;
  }
}
