/* One JBN visual language for the Flask and React administration workspaces. */
:root {
  --jbn-admin-ink: #2b2430;
  --jbn-admin-plum: #6e4172;
  --jbn-admin-gold: #c8ae4d;
  --jbn-admin-paper: #fbf9f5;
  --jbn-admin-line: #e7dfd2;
  --jbn-admin-muted: #625b65;
  --jbn-admin-shadow: 0 14px 36px rgba(43, 36, 48, .07);
}
body.admin-shell,
html body .b44-admin-shell {
  color: var(--jbn-admin-ink);
  background: var(--jbn-admin-paper);
  font-family: "Cooper Hewitt", Arial, sans-serif;
}
html body .b44-admin-shell {
  --b44-ink: #2b2430;
  --b44-ink-deep: #211b25;
  --b44-ivory: #fbf9f5;
  --b44-gold: #c8ae4d;
  --b44-gold-strong: #94782d;
  --b44-line: #e7dfd2;
  --b44-body: #625b65;
  --b44-muted: #756d78;
  --b44-shadow: var(--jbn-admin-shadow);
}
:is(body.admin-shell .admin-portal-content, html body .b44-admin-shell .b44-admin-main) :is(h1, h2, h3, h4),
body.admin-shell .admin-login-stage :is(h1, h2) {
  font-family: "JBN Contact Heading", "Cormorant Garamond", Georgia, serif !important;
  font-style: normal !important;
  font-weight: 500 !important;
  font-synthesis: none !important;
  letter-spacing: -.035em !important;
  color: var(--jbn-admin-ink);
  text-wrap: balance;
}
:is(body.admin-shell .admin-portal-content, html body .b44-admin-shell .b44-admin-main) h1 { line-height: 1.08 !important; }
:is(body.admin-shell .admin-portal-content, html body .b44-admin-shell .b44-admin-main) :is(h2, h3, h4) { line-height: 1.16 !important; }

/* Public-site inspired white navigation, warm canvas, and plum workspace rail. */
body.admin-shell > header {
  margin: 1rem auto 0;
  width: min(calc(100% - 2rem), 96rem);
  border: 1px solid var(--jbn-admin-line);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--jbn-admin-shadow);
}
body.admin-shell .admin-brand { color: var(--jbn-admin-ink) !important; font-weight: 700; }
body.admin-shell .admin-brand img { width: 2.8rem; height: 2.8rem; }
body.admin-shell .admin-top-actions > a,
body.admin-shell .admin-top-actions > div a {
  min-height: 2.5rem;
  border-radius: 999px !important;
  align-content: center;
  text-decoration: none;
}
body.admin-shell .admin-top-actions > a:last-child {
  color: #fff !important;
  background: var(--jbn-admin-ink) !important;
  border-color: var(--jbn-admin-ink) !important;
}
body.admin-shell .admin-top-actions > a:last-child:hover { color: #fff !important; background: #47354d !important; }
body.admin-shell .admin-portal-sidebar {
  border: 1px solid rgba(200, 174, 77, .36);
  border-top: 3px solid var(--jbn-admin-gold);
  border-radius: 1.2rem;
  background: linear-gradient(165deg, #35283a 0%, var(--jbn-admin-ink) 76%);
  box-shadow: 0 18px 42px rgba(43, 36, 48, .15);
}
body.admin-shell .admin-portal-sidebar__nav button { border-radius: .65rem; }
body.admin-shell .admin-portal-sidebar__nav button:is(:hover, :focus-visible) { color: #fff !important; background: rgba(255,255,255,.1) !important; }
body.admin-shell .admin-portal-sidebar__nav button[aria-selected="true"] { color: var(--jbn-admin-ink) !important; background: var(--jbn-admin-gold) !important; }
body.admin-shell .admin-portal-sidebar__nav button[aria-selected="true"] .icon { color: inherit !important; }

html body .b44-admin-shell .b44-admin-sidebar { background: linear-gradient(165deg, #35283a, var(--jbn-admin-ink)) !important; }
html body .b44-admin-shell .b44-admin-sidebar__brand { border-bottom-color: rgba(255,255,255,.13); }
html body .b44-admin-shell .b44-admin-topbar {
  color: var(--jbn-admin-ink) !important;
  background: rgba(255, 255, 255, .97) !important;
  border-bottom: 1px solid var(--jbn-admin-line) !important;
  box-shadow: 0 8px 25px rgba(43, 36, 48, .06) !important;
}
html body .b44-admin-shell .b44-admin-brand strong {
  color: var(--jbn-admin-ink) !important;
  font-family: "JBN Contact Heading", Georgia, serif !important;
  font-size: 1.18rem;
  letter-spacing: -.02em;
}
html body .b44-admin-shell .b44-admin-global-search {
  color: var(--jbn-admin-muted) !important;
  background: var(--jbn-admin-paper) !important;
  border-color: var(--jbn-admin-line) !important;
}
html body .b44-admin-shell .b44-admin-global-search input { color: var(--jbn-admin-ink) !important; }
html body .b44-admin-shell .b44-admin-global-search input::placeholder { color: var(--jbn-admin-muted) !important; }
html body .b44-admin-shell .b44-admin-top-actions :is(.b44-admin-icon-btn, .b44-admin-pill, .b44-admin-mobile-menu),
html body .b44-admin-shell .b44-admin-avatar {
  color: var(--jbn-admin-ink) !important;
  border-color: var(--jbn-admin-line) !important;
}
html body .b44-admin-shell .b44-admin-top-actions :is(.b44-admin-icon-btn, .b44-admin-pill, .b44-admin-mobile-menu):hover {
  color: var(--jbn-admin-plum) !important;
  background: #f6f0e4 !important;
}
html body .b44-admin-shell .b44-admin-main { background: var(--jbn-admin-paper) !important; }

/* Shared card, metric, form, and table treatment across every workspace view. */
body.admin-shell .admin-portal-content :is(.admin-command-center, .admin-section-hero, .admin-data-card, .admin-safety-card, .admin-readiness-card, .admin-workspace-card, .admin-workspace-heading, .admin-workspace-summary, .admin-login-card),
html body .b44-admin-shell :is(.b44-admin-card, .b44-admin-page-header, .b44-admin-nextstep),
html body .b44-admin-shell .live-workspace :is(.admin-section-hero, .admin-data-card, .admin-safety-card) {
  border: 1px solid var(--jbn-admin-line) !important;
  border-radius: 1.15rem !important;
  background: #fff !important;
  box-shadow: var(--jbn-admin-shadow) !important;
}
body.admin-shell .admin-portal-content :is(.admin-command-center, .admin-section-hero, .admin-workspace-heading),
html body .b44-admin-shell .b44-admin-page-header {
  background: linear-gradient(135deg, #fff, #fbf5e9) !important;
}
body.admin-shell .admin-portal-content :is(.admin-section-kicker, .admin-login-eyebrow),
html body .b44-admin-shell .b44-admin-eyebrow {
  color: #92752a !important;
  font-weight: 700;
  letter-spacing: .14em;
}
body.admin-shell .admin-portal-content :is(.admin-kpi-grid > article, .admin-directory, .admin-command-grid > article),
html body .b44-admin-shell .live-workspace .admin-kpi-grid > article {
  border: 1px solid var(--jbn-admin-line) !important;
  border-radius: 1rem !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(43,36,48,.05) !important;
}
body.admin-shell .admin-portal-content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea),
html body .b44-admin-shell .b44-admin-main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  color: var(--jbn-admin-ink);
  background: #fff;
  border: 1px solid #d9d0c3;
  border-radius: .65rem;
}
body.admin-shell .admin-portal-content :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus-visible,
html body .b44-admin-shell .b44-admin-main :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus-visible {
  outline: 2px solid var(--jbn-admin-gold);
  outline-offset: 2px;
  border-color: #a88b3d;
}
body.admin-shell .admin-portal-content :is(.admin-modern-table, table) th,
html body .b44-admin-shell :is(.b44-admin-table, .live-workspace table) th {
  color: var(--jbn-admin-ink) !important;
  background: #f7f3eb !important;
  border-bottom: 1px solid var(--jbn-admin-line) !important;
}
body.admin-shell .admin-portal-content :is(.admin-modern-table, table) tbody tr:nth-child(even),
html body .b44-admin-shell :is(.b44-admin-table, .live-workspace table) tbody tr:nth-child(even) {
  background: #fdfbf7;
}
body.admin-shell .admin-portal-content :is(.admin-primary-link, .admin-save-button, .admin-login-submit),
html body .b44-admin-shell :is(.b44-admin-primary, .live-workspace .admin-primary-link) {
  color: #fff !important;
  background: var(--jbn-admin-ink) !important;
  border-color: var(--jbn-admin-ink) !important;
  border-radius: 999px !important;
}
body.admin-shell .admin-portal-content :is(.admin-primary-link, .admin-save-button, .admin-login-submit):hover,
html body .b44-admin-shell :is(.b44-admin-primary, .live-workspace .admin-primary-link):hover {
  color: #fff !important;
  background: #493550 !important;
}
body.admin-shell .admin-portal-content :is(.admin-primary-link, .admin-save-button, .admin-login-submit):hover *,
html body .b44-admin-shell :is(.b44-admin-primary, .live-workspace .admin-primary-link):hover * { color: #fff !important; }
body.admin-shell .admin-portal-content :is(.admin-secondary-link, .admin-workflow-action),
html body .b44-admin-shell .b44-admin-outline {
  border-radius: 999px !important;
}

/* Login is the first admin screen; give its image and form the same finish. */
body.admin-shell .admin-login-stage { border-radius: 1.3rem; overflow: hidden; box-shadow: var(--jbn-admin-shadow); }
body.admin-shell .admin-login-visual { border-radius: 1.3rem 0 0 1.3rem; }
body.admin-shell .admin-login-visual__content h1 { color: #fff !important; }
body.admin-shell .admin-login-visual__content > p:last-child { color: rgba(255,255,255,.86) !important; }
body.admin-shell .admin-login-card { border-radius: 0 1.3rem 1.3rem 0 !important; }
body.admin-shell .admin-login-card__intro > p:last-child { font-size: .9375rem; line-height: 1.55; }
body.admin-shell .admin-login-form label > span { font-size: .875rem; }
body.admin-shell .admin-login-input-wrap input { font-size: .9375rem; }
body.admin-shell .admin-login-form :is(input, button) { min-height: 2.75rem; }
body.admin-shell .admin-login-form .admin-login-submit { min-height: 3.1rem; }

@media (max-width: 900px) {
  body.admin-shell > header { width: min(calc(100% - 1rem), 96rem); margin-top: .5rem; }
  body.admin-shell .admin-login-visual, body.admin-shell .admin-login-card { border-radius: 0 !important; }
  body.admin-shell .admin-login-stage { border-radius: 1rem; }
  body.admin-shell .admin-login-card { order: -1; }
  body.admin-shell .admin-login-visual { min-height: 23rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.admin-shell *, html body .b44-admin-shell * { scroll-behavior: auto !important; }
}
