/*
 * Foundations application design system
 * Shared application primitives synchronized with the Root platform UI.
 *
 * This file intentionally loads after the compiled Tailwind bundle. It
 * restyles the existing semantic components and shared utility patterns so
 * legacy pages inherit the new system without duplicating markup.
 */

:root {
  --root-brand: #26a355;
  --root-brand-hover: #1f8746;
  --root-brand-tint: #e6f5eb;
  --root-brand-deep: #19713b;
  --root-ink: #111827;
  --root-ink-2: #374151;
  --root-muted: #6b7280;
  --root-faint: #9ca3af;
  --root-border: #e5e7eb;
  --root-border-soft: #eef0f3;
  --root-surface: #fff;
  --root-surface-2: #f3f4f6;
  --root-surface-3: #f9fafb;
  --root-blue: #0055bc;
  --root-blue-bg: #e9f2ff;
  --root-purple: #6c5bd2;
  --root-purple-bg: #efedfc;
  --root-orange: #b3592a;
  --root-orange-bg: #fdf1e8;
  --root-red: #cd3d64;
  --root-red-bg: #fdeef1;
  --root-green: #217a50;
  --root-green-bg: #e6f5eb;
  --root-yellow: #a17f1a;
  --root-yellow-bg: #fcf4dc;
  --root-radius: 18px;
  --root-radius-sm: 9px;
  --root-sidebar-width: 236px;
  --root-shadow-card: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .035);
  --root-shadow-float: 0 18px 50px rgba(17, 24, 39, .16), 0 3px 12px rgba(17, 24, 39, .08);
}

html {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: var(--root-surface-3) !important;
  color: var(--root-ink-2);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  font-size: 14px;
  line-height: 1.5;
}

body::before {
  content: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--root-ink) !important;
  letter-spacing: -.015em;
}

h1 {
  font-size: 30px !important;
  line-height: 1.18 !important;
  font-weight: 760 !important;
  letter-spacing: -.035em;
}

h2 { font-weight: 700 !important; }
h3, h4, h5, h6 { font-weight: 650 !important; }

p.lead,
.lead {
  color: var(--root-muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

a {
  color: var(--root-brand-deep);
  text-underline-offset: 2px;
}

a:hover { color: var(--root-brand-hover); }

/* ── Shared application shell ───────────────────────────────────────────── */

.fnd-admin-shell {
  display: block !important;
  padding-left: var(--root-sidebar-width);
  background: var(--root-surface-3) !important;
}

.fnd-admin-shell > main {
  width: 100%;
  min-width: 0;
  margin-left: 0;
  padding: 32px 40px 64px !important;
}

.fnd-admin-shell > footer {
  width: 100%;
  margin-left: 0;
  border-color: var(--root-border-soft) !important;
  background: var(--root-surface-3) !important;
}

.fnd-admin-shell > main > .container {
  width: 100%;
  max-width: 1120px !important;
  margin: 0 auto;
  padding: 0 !important;
}

/* Preserve the template's page-width intent. The first redesign temporarily
   flattened every max-w-* page to the same width, making forms and details
   unnecessarily broad. */
.fnd-admin-shell > main > .max-w-7xl { width: 100%; max-width: 1280px !important; margin-inline: auto !important; }
.fnd-admin-shell > main > .max-w-6xl { width: 100%; max-width: 1152px !important; margin-inline: auto !important; }
.fnd-admin-shell > main > .max-w-5xl { width: 100%; max-width: 1024px !important; margin-inline: auto !important; }
.fnd-admin-shell > main > .max-w-4xl { width: 100%; max-width: 896px !important; margin-inline: auto !important; }
.fnd-admin-shell > main > .max-w-3xl { width: 100%; max-width: 768px !important; margin-inline: auto !important; }
.fnd-admin-shell > main > [data-long-page-nav] { max-width: 1120px !important; }

/* A handful of older pages place their content directly after the sidebar
   partial instead of inside <main>. Body padding still reserves the sidebar;
   these selectors supply the same Root page gutter and centering. */
.fnd-admin-shell > .main-content {
  width: calc(100% - 80px) !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding-top: 32px !important;
  padding-bottom: 64px !important;
}

.fnd-admin-shell > .max-w-7xl,
.fnd-admin-shell > .max-w-6xl,
.fnd-admin-shell > .max-w-5xl,
.fnd-admin-shell > .max-w-4xl,
.fnd-admin-shell > .max-w-3xl,
.fnd-admin-shell > .max-w-2xl,
.fnd-admin-shell > .max-w-xl,
.fnd-admin-shell > .max-w-lg,
.fnd-admin-shell > .max-w-md {
  width: calc(100% - 76px) !important;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  width: var(--root-sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--root-border);
  background: #fff;
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 12px;
  color: var(--root-ink) !important;
  text-decoration: none !important;
}

.app-sidebar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: contain;
}

.app-sidebar-brand img.app-sidebar-wordmark {
  width: 132px;
  height: 26px;
  border-radius: 0;
  object-position: left center;
}

.app-mobile-brand img.app-mobile-wordmark {
  width: 120px;
  height: 24px;
  object-position: left center;
}

.app-sidebar-brand-copy {
  min-width: 0;
}

.app-sidebar-brand-title {
  display: block;
  overflow: hidden;
  color: var(--root-ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-brand-subtitle {
  display: none;
}

.app-sidebar-search {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 10px 6px;
  background: #fff;
}

.app-sidebar-search-field {
  position: relative;
}

.app-sidebar-search-field > i {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--root-faint);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}

/* Beat the global input[type=search] { padding: 7px 11px !important } rule. */
.app-sidebar-search input[type="search"] {
  width: 100%;
  min-width: 0;
  padding: 7px 28px 7px 32px !important;
  border: 1px solid var(--root-border);
  border-radius: 10px;
  background: #fff;
  color: var(--root-ink);
  font-size: 13px;
  line-height: 1.25;
}

.app-sidebar-search input::placeholder {
  color: var(--root-faint);
}

.app-sidebar-search input:focus {
  outline: none;
  border-color: var(--root-brand);
  box-shadow: 0 0 0 3px var(--root-brand-tint);
}

.app-sidebar-search-empty,
.app-sidebar-search-status {
  padding: 10px 8px;
  color: var(--root-faint);
  font-size: 12.5px;
}

.app-sidebar-search input[type="search"]::-webkit-search-decoration,
.app-sidebar-search input[type="search"]::-webkit-search-cancel-button,
.app-sidebar-search input[type="search"]::-webkit-search-results-button,
.app-sidebar-search input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
  width: 0;
  height: 0;
}

.app-sidebar-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 2;
  display: flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--root-faint);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.app-sidebar-search-clear:hover {
  background: var(--root-surface-2);
  color: var(--root-ink);
}

.app-sidebar-search-clear[hidden] {
  display: none;
}

.app-sidebar-search-kbd {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 1px 5px;
  border: 1px solid var(--root-border);
  border-radius: 6px;
  background: var(--root-surface-3);
  color: var(--root-faint);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  pointer-events: none;
}

.app-sidebar-search:focus-within .app-sidebar-search-kbd,
.app-sidebar-search:has(.app-sidebar-search-clear:not([hidden])) .app-sidebar-search-kbd {
  display: none;
}

.app-sidebar-search-results .app-nav-heading:first-child {
  padding-top: 6px;
}

.app-search-hit {
  align-items: flex-start;
  min-height: 42px;
}

.app-search-hit-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.app-search-hit-title,
.app-search-hit-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-search-hit-sub {
  color: var(--root-faint);
  font-size: 11.5px;
  font-weight: 500;
}

.app-nav-link.is-active {
  background: rgba(48, 49, 61, .08);
  color: var(--root-ink) !important;
}

.table tr.is-highlighted td {
  background: var(--root-brand-tint);
}

/* display:flex on nav links would otherwise override the hidden attribute */
.app-sidebar-nav .app-nav-link[hidden],
.app-sidebar-nav .app-nav-heading[hidden],
.app-sidebar-search-results[hidden] {
  display: none;
}

.app-sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 6px 10px 20px;
}

.app-nav-heading {
  padding: 14px 8px 3px;
  color: var(--root-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.app-nav-heading:first-child { padding-top: 5px; }

.app-nav-link {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--root-muted) !important;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none !important;
  transition: color .12s ease, background .12s ease, box-shadow .12s ease;
}

.app-nav-link i {
  width: 16px;
  color: var(--root-faint);
  font-size: 13px;
  text-align: center;
}

.app-nav-link:hover {
  background: rgba(48, 49, 61, .05);
  color: var(--root-ink) !important;
}

.app-nav-link.active {
  background: var(--root-brand-tint);
  color: var(--root-brand-deep) !important;
  box-shadow: none;
  font-weight: 600;
}

.app-nav-link.active i { color: var(--root-brand); }

.app-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--root-border-soft);
}

.app-mobile-bar {
  display: none;
}

.app-mobile-menu-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .14s ease;
}

.sidebar-open .app-mobile-menu-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.app-sidebar-scrim {
  display: none;
}

/* ── Page structure ─────────────────────────────────────────────────────── */

.fnd-admin-shell main > .container > .mb-8:first-child,
.fnd-admin-shell main > .container > .mb-6:first-child,
.fnd-admin-shell main > .container > .flex:first-child,
.fnd-admin-shell main > .container > h1:first-child {
  margin-bottom: 22px !important;
}

.fnd-admin-shell main h1 + p,
.fnd-admin-shell main h1 + .lead {
  margin-top: 4px !important;
  color: var(--root-muted) !important;
  font-size: 13.5px !important;
}

.fnd-admin-shell main .border-t.border-gray-300 {
  border-color: var(--root-border) !important;
}

/* Legacy Bootstrap-layout compatibility. Several long-lived pages still use
   row/col and d-* class names even though Bootstrap is no longer loaded. */
.row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  margin-right: -8px;
  margin-left: -8px;
}

.row > [class*="col-"] {
  width: 100%;
  min-width: 0;
  padding-right: 8px;
  padding-left: 8px;
}

.col-12 { width: 100% !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-start { justify-content: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.img-fluid { max-width: 100%; height: auto; }
.ms-1 { margin-left: 4px !important; }
.ms-2 { margin-left: 8px !important; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }

@media (min-width: 768px) {
  .col-md-4 { width: 33.333333% !important; }
  .col-md-6 { width: 50% !important; }
  .col-md-8 { width: 66.666667% !important; }
  .text-md-end { text-align: right !important; }
}

@media (min-width: 1024px) {
  .col-lg-4 { width: 33.333333% !important; }
  .col-lg-8 { width: 66.666667% !important; }
}

.breadcrumb {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  color: var(--root-muted);
  font-size: 12.5px;
  list-style: none;
}

.breadcrumb-item {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--root-faint);
}

.breadcrumb-item.active {
  overflow: hidden;
  color: var(--root-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fnd-admin-shell .border-b > nav.flex {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  white-space: nowrap;
}

/* Root's page-heading primitive. The shared UI enhancer applies this to the
   first real page title so legacy templates and new pages render identically. */
.root-page-head {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 0 4px !important;
  padding: 4px 0 26px !important;
}

.root-page-head > .root-page-glyph {
  display: flex;
  width: 52px;
  height: 52px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--root-border);
  border-radius: 15px;
  background: #fff;
  color: var(--root-brand);
  box-shadow: var(--root-shadow-card);
  font-size: 22px;
}

.root-page-heading { min-width: 0; }

.root-page-heading > h1 {
  margin: 0 !important;
  font-size: 30px !important;
  font-weight: 760 !important;
  letter-spacing: -.035em !important;
}

.root-page-heading > .root-page-subhead {
  max-width: 760px;
  margin: 4px 0 0 !important;
  color: var(--root-muted) !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

.root-page-head > .root-page-actions,
.root-page-head > :last-child:not(.root-page-heading):not(.root-page-glyph) {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Exact long-page shell used by Root's setup and documentation pages. */
.docs-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: start;
}

.docs-shell [id] { scroll-margin-top: 16px; }
.root-long-page-content { width: 100%; min-width: 0; }

.root-long-page-content :is(.grid, .flex, .card-body, .card-header, .card-footer),
.root-long-page-content :is(.grid, .flex) > * {
  min-width: 0;
}

.root-long-page-content :is(pre, code, .break-words) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.docs-side {
  position: sticky;
  top: 16px;
  display: flex;
  min-width: 0;
  max-height: calc(100vh - 32px);
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.docs-nav {
  padding: 8px;
  border: 1px solid var(--root-border);
  border-radius: var(--root-radius);
  background: #fff;
  box-shadow: var(--root-shadow-card);
}

.docs-nav .dn-head {
  padding: 12px 10px 4px;
  color: var(--root-faint);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.docs-nav .dn-group:first-child .dn-head { padding-top: 6px; }

.docs-nav a {
  display: block;
  padding: 5px 10px 6px;
  border-radius: 8px;
}

.docs-nav a:hover {
  background: var(--root-surface-2);
  text-decoration: none;
}

.docs-nav a .t {
  display: block;
  color: var(--root-ink-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.docs-nav a .d {
  display: block;
  margin-top: 1px;
  color: var(--root-faint);
  font-size: 11px;
  line-height: 1.35;
}

.docs-nav a.active { background: var(--root-brand-tint); }
.docs-nav a.active .t { color: var(--root-brand-deep); }

/* Long detail pages historically placed actions and metadata in a second
   content rail. The UI enhancer moves those cards into this regular flow
   before adding Root's single page-navigation rail. */
.root-regularized-sections {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 22px;
}

.root-regularized-sections > * {
  width: 100%;
  min-width: 0;
}

/* ── Cards and sections ────────────────────────────────────────────────── */

.card,
.root-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--root-border) !important;
  border-radius: var(--root-radius) !important;
  background: var(--root-surface) !important;
  box-shadow: var(--root-shadow-card) !important;
}

:is(.fnd-admin-shell, .root-portal-shell) .card.mb-6 {
  margin-bottom: 22px !important;
}

:is(.fnd-admin-shell, .root-portal-shell) .space-y-6 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(22px * calc(1 - var(--tw-space-y-reverse))) !important;
  margin-bottom: calc(22px * var(--tw-space-y-reverse)) !important;
}

.card-header {
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--root-border) !important;
  background: var(--root-surface) !important;
}

.card-header h2,
.card-header h5,
.card-header h4,
.card-header h3,
.card-header a.font-semibold {
  font-size: 15px !important;
  font-weight: 700 !important;
}

.card-body {
  max-width: 100%;
  padding: 16px 18px !important;
  overflow-x: auto;
}

.card-footer {
  padding: 12px 18px !important;
  border-top: 1px solid var(--root-border-soft) !important;
  background: var(--root-surface-3) !important;
}

.list-group {
  overflow: hidden;
  border: 1px solid var(--root-border) !important;
  border-radius: 12px !important;
}

.list-group-item {
  padding: 10px 13px !important;
  border-color: var(--root-border-soft) !important;
  background: #fff !important;
  font-size: 13.5px;
}

.list-group-item-action:hover {
  background: var(--root-surface-3) !important;
  color: var(--root-brand-deep) !important;
}

.rounded-3xl.border.bg-white,
.rounded-3xl.border.bg-gray-50 {
  border-color: var(--root-border) !important;
  border-radius: var(--root-radius) !important;
  box-shadow: var(--root-shadow-card) !important;
}

.rounded-2xl.border.bg-white,
.rounded-2xl.border.bg-gray-50 {
  border-color: var(--root-border) !important;
  border-radius: 12px !important;
}

:is(.fnd-admin-shell, .root-portal-shell)
  :is(div, section, article, form).bg-white.border:is(.rounded-lg, .rounded-xl, .rounded-2xl, .rounded-3xl) {
  min-width: 0;
  border-color: var(--root-border) !important;
  border-radius: var(--root-radius) !important;
  background: #fff !important;
  box-shadow: var(--root-shadow-card) !important;
}

:is(.fnd-admin-shell, .root-portal-shell)
  :is(div, section, article).bg-gray-50.border:is(.rounded-lg, .rounded-xl, .rounded-2xl, .rounded-3xl) {
  min-width: 0;
  border-color: var(--root-border-soft) !important;
  border-radius: 12px !important;
  background: var(--root-surface-3) !important;
  box-shadow: none !important;
}

/* Portal panels use the same section geometry as Root's management UI,
   regardless of whether an older template authored them with Tailwind. */
.root-portal-shell :is(div, article, form).rounded-3xl.border.bg-white {
  padding: 16px 18px !important;
}

.root-portal-shell :is(div, article, form).rounded-3xl.border.bg-white > :is(h2, h3):first-child {
  margin: -16px -18px 16px !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--root-border);
  font-size: 15px !important;
  font-weight: 700 !important;
}

.root-portal-shell
  :is(div, article, form).rounded-3xl.border.bg-white
  > :first-child:has(> :is(h2, h3)) {
  margin: -16px -18px 16px !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--root-border);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex !important;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px !important;
  border: 1px solid transparent !important;
  border-radius: var(--root-radius-sm) !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary,
.btn-success {
  border-color: var(--root-brand) !important;
  background: var(--root-brand) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-success:hover {
  border-color: var(--root-brand-hover) !important;
  background: var(--root-brand-hover) !important;
}

.btn-secondary,
.btn-outline-secondary,
.btn-outline-primary {
  border-color: var(--root-border) !important;
  background: #fff !important;
  color: var(--root-ink-2) !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .035) !important;
}

.btn-secondary:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:hover {
  border-color: #d2d6dc !important;
  background: var(--root-surface-3) !important;
  color: var(--root-ink) !important;
}

.btn-danger,
.btn-outline-danger {
  border-color: #efc8d2 !important;
  background: #fff !important;
  color: var(--root-red) !important;
}

.btn-danger:hover,
.btn-outline-danger:hover {
  background: var(--root-red-bg) !important;
}

.btn-warning,
.btn-outline-warning {
  border-color: #ead9a4 !important;
  background: #fff !important;
  color: var(--root-yellow) !important;
}

.btn-warning:hover,
.btn-outline-warning:hover { background: var(--root-yellow-bg) !important; }

.btn-info {
  border-color: #cbdcf2 !important;
  background: var(--root-blue-bg) !important;
  color: var(--root-blue) !important;
  box-shadow: none !important;
}

.btn-info:hover { border-color: #afc9e9 !important; background: #dceaff !important; }

.btn-link {
  min-height: 0;
  padding: 3px 4px !important;
  border-color: transparent !important;
  background: transparent !important;
  color: var(--root-brand-deep) !important;
  box-shadow: none !important;
}

.btn-link:hover {
  background: var(--root-brand-tint) !important;
  color: var(--root-brand-hover) !important;
}

.btn-sm {
  min-height: 29px;
  padding: 5px 10px !important;
  font-size: 12.5px !important;
}

.btn-lg {
  min-height: 40px;
  padding: 9px 16px !important;
  font-size: 14px !important;
}

.btn i { margin: 0 !important; }

.btn:disabled,
.btn[aria-disabled="true"],
button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: .52 !important;
  transform: none !important;
}

.btn.is-pending,
.btn[aria-busy="true"],
button.is-pending,
button[aria-busy="true"] {
  cursor: wait !important;
  opacity: .72 !important;
}

.btn.is-pending::before,
.btn[aria-busy="true"]::before,
button.is-pending::before,
button[aria-busy="true"]::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: root-control-spin .7s linear infinite;
}

@keyframes root-control-spin { to { transform: rotate(360deg); } }

/* Utility-authored actions from older templates receive the same button
   geometry as .btn. Scope by semantic background/border classes so badges,
   progress bars, and decorative color blocks are unaffected. */
:is(button, a).bg-brand-400,
:is(button, a).bg-indigo-600,
:is(button, a).bg-blue-600 {
  display: inline-flex;
  min-height: 34px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 7px 14px !important;
  border: 1px solid var(--root-brand) !important;
  border-radius: var(--root-radius-sm) !important;
  background: var(--root-brand) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .12) !important;
  cursor: pointer;
}

:is(button, a).bg-brand-400:hover,
:is(button, a).bg-indigo-600:hover,
:is(button, a).bg-blue-600:hover {
  border-color: var(--root-brand-hover) !important;
  background: var(--root-brand-hover) !important;
  color: #fff !important;
}

:is(button, a).bg-red-500,
:is(button, a).bg-red-600 {
  display: inline-flex;
  min-height: 34px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 7px 14px !important;
  border: 1px solid var(--root-red) !important;
  border-radius: var(--root-radius-sm) !important;
  background: var(--root-red) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06) !important;
  cursor: pointer;
}

:is(button, a).border-red-200.bg-red-50 {
  display: inline-flex !important;
  min-height: 34px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 7px 14px !important;
  border: 1px solid #efc8d2 !important;
  border-radius: var(--root-radius-sm) !important;
  background: #fff !important;
  color: var(--root-red) !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .035) !important;
  cursor: pointer;
}

:is(button, a).border-red-200.bg-red-50:hover {
  background: var(--root-red-bg) !important;
  color: var(--root-red) !important;
}

:is(button, a).bg-brand-400:focus-visible,
:is(button, a).bg-indigo-600:focus-visible,
:is(button, a).bg-blue-600:focus-visible,
:is(button, a).bg-red-500:focus-visible,
:is(button, a).bg-red-600:focus-visible,
:is(button, a).border-red-200.bg-red-50:focus-visible,
.btn:focus-visible {
  outline: 2px solid rgba(38, 163, 85, .4) !important;
  outline-offset: 2px !important;
}

button[aria-label="Close"]:not(.btn),
button[aria-label*="close" i]:not(.btn) {
  display: inline-grid !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--root-muted) !important;
  cursor: pointer;
}

button:not(.btn):has(> i:only-child):hover,
button[aria-label="Close"]:not(.btn):hover,
button[aria-label*="close" i]:not(.btn):hover {
  background: var(--root-surface-2) !important;
  color: var(--root-ink) !important;
}

.btn-group,
.action-group {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Segmented controls stay compact even when their selected segment carries
   the same brand utility class as a primary action. */
.flex.rounded-md.overflow-hidden.border > button {
  min-height: 28px !important;
  padding: 5px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */

.form-label,
label[for]:not(.switch):not(.form-check-label) {
  display: block;
  margin-bottom: 5px;
  color: var(--root-ink-2) !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
}

.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="month"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
  min-height: 36px;
  appearance: none;
  border: 1px solid var(--root-border) !important;
  border-radius: var(--root-radius-sm) !important;
  background-color: #fff !important;
  color: var(--root-ink) !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .025), inset 0 1px 1px rgba(17, 24, 39, .02) !important;
  transition: border-color .12s ease, box-shadow .12s ease !important;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="month"],
input[type="datetime-local"],
input[type="time"],
textarea {
  padding: 7px 11px !important;
}

.form-select,
select {
  padding: 7px 32px 7px 11px !important;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6.2 4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: right 9px center !important;
  background-repeat: no-repeat !important;
  background-size: 12px !important;
}

select[multiple],
select[size]:not([size="1"]) {
  min-height: 112px !important;
  padding-right: 11px !important;
  background-image: none !important;
}

.form-control:hover,
.form-select:hover,
input:hover,
select:hover,
textarea:hover { border-color: #d2d6dc !important; }

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--root-brand) !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .025), 0 0 0 3px rgba(38, 163, 85, .14) !important;
}

textarea { resize: vertical; }

input::placeholder,
textarea::placeholder { color: var(--root-faint) !important; }

input:disabled,
select:disabled,
textarea:disabled,
.form-control:disabled,
.form-select:disabled {
  cursor: not-allowed !important;
  border-color: var(--root-border-soft) !important;
  background-color: var(--root-surface-2) !important;
  color: var(--root-faint) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

input[readonly],
textarea[readonly],
.form-control[readonly] {
  border-color: var(--root-border-soft) !important;
  background-color: var(--root-surface-3) !important;
  color: var(--root-ink-2) !important;
  box-shadow: none !important;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
.form-control.is-invalid,
.form-select.is-invalid,
.is-invalid {
  border-color: var(--root-red) !important;
  box-shadow: 0 0 0 3px rgba(205, 61, 100, .12) !important;
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: var(--root-red) !important;
}

.invalid-feedback,
.form-error,
[data-field-error] {
  display: block;
  margin-top: 5px;
  color: var(--root-red) !important;
  font-size: 12px;
  line-height: 1.4;
}

.text-muted,
small.text-muted {
  color: var(--root-muted) !important;
  font-size: 12px !important;
  line-height: 1.45;
}

input[type="checkbox"],
input[type="radio"] {
  width: 15px !important;
  height: 15px !important;
  flex: none;
  margin: 0;
  cursor: pointer;
  border: 1px solid #cfd4dc !important;
  accent-color: var(--root-brand);
}

input[type="checkbox"] { border-radius: 4px !important; }
input[type="radio"] { border-radius: 50% !important; }

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: 2px solid rgba(38, 163, 85, .34) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

.form-check {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
}

.form-check-label {
  margin: -1px 0 0 !important;
  color: var(--root-ink-2) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

.form-text {
  margin-top: 5px !important;
  color: var(--root-muted) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.form-control-sm,
.form-select-sm {
  min-height: 31px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  font-size: 12.5px !important;
}

input[type="file"] {
  color: var(--root-muted);
  font-size: 13px;
}

input[type="file"]::file-selector-button {
  margin-right: 9px;
  padding: 5px 10px;
  border: 1px solid var(--root-border);
  border-radius: var(--root-radius-sm);
  background: #fff;
  color: var(--root-ink-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

input[type="date"],
input[type="time"],
input[type="month"],
input[type="datetime-local"] {
  color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .55;
}

/* Joined controls: search + button, currency prefix/suffix, copy fields. */
.input-group,
.control-group {
  display: flex !important;
  width: 100%;
  align-items: stretch;
}

.input-group > .form-control,
.input-group > .form-select,
.control-group > .form-control,
.control-group > .form-select {
  min-width: 0;
  flex: 1 1 auto;
}

.input-group > .btn,
.control-group > .btn {
  min-height: 36px;
  align-self: stretch;
  flex: none;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.input-group > .btn:has(> i:only-child),
.control-group > .btn:has(> i:only-child) {
  width: 36px;
  min-width: 36px;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.input-group > :focus,
.input-group > :focus-within,
.control-group > :focus,
.control-group > :focus-within {
  position: relative;
  z-index: 2;
}

.input-group > :not(:first-child),
.control-group > :not(:first-child) {
  margin-left: -1px;
}

.input-group > :first-child,
.control-group > :first-child {
  border-top-left-radius: var(--root-radius-sm) !important;
  border-bottom-left-radius: var(--root-radius-sm) !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.input-group > :last-child,
.control-group > :last-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: var(--root-radius-sm) !important;
  border-bottom-right-radius: var(--root-radius-sm) !important;
}

.input-group > :not(:first-child):not(:last-child),
.control-group > :not(:first-child):not(:last-child) {
  border-radius: 0 !important;
}

.rounded-r-none {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.rounded-l-none {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.border-l-0 { border-left-width: 0 !important; }
.border-r-0 { border-right-width: 0 !important; }

.input-group > span,
.control-addon,
.flex > span.border-gray-300 {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px !important;
  border: 1px solid var(--root-border) !important;
  border-color: var(--root-border) !important;
  background: var(--root-surface-3) !important;
  color: var(--root-muted) !important;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Legacy list-page search fields already declare their joined corners. Make
   the adjacent compact button share the field's exact height and seam. */
:is(.fnd-admin-shell, .root-portal-shell)
  .flex:has(> input.form-control.rounded-r-none + .btn) {
  align-items: stretch;
}

:is(.fnd-admin-shell, .root-portal-shell)
  input.form-control.rounded-r-none + .btn {
  min-width: 34px;
  min-height: 34px;
  align-self: stretch;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

:is(.fnd-admin-shell, .root-portal-shell)
  input.form-control.rounded-r-none + .btn:has(> i:only-child) {
  width: 34px;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

:is(.fnd-admin-shell, .root-portal-shell)
  .flex:has(> span.border-gray-300 + input.form-control) {
  align-items: stretch;
}

:is(.fnd-admin-shell, .root-portal-shell)
  .flex:has(> span.border-gray-300 + input.form-control) > span.border-gray-300 {
  border-top-left-radius: var(--root-radius-sm) !important;
  border-bottom-left-radius: var(--root-radius-sm) !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

:is(.fnd-admin-shell, .root-portal-shell)
  .flex > span.border-gray-300 + input.form-control {
  min-width: 0;
  margin-left: -1px;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* Root-style toggle. Supports both legacy two-element Tailwind variants:
   input + track::after and input + track + separate thumb. */
label.relative.inline-flex:has(> input.sr-only.peer),
label:has(> .relative > input.sr-only.peer) {
  cursor: pointer;
  user-select: none;
}

label.relative.inline-flex > input.sr-only.peer + div,
label .relative > input.sr-only.peer + div {
  position: relative !important;
  width: 36px !important;
  height: 21px !important;
  flex: none !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #d5d9df !important;
  box-shadow: inset 0 1px 2px rgba(17, 24, 39, .08) !important;
  transition: background .16s ease !important;
}

label.relative.inline-flex > input.sr-only.peer + div::after {
  content: "" !important;
  position: absolute !important;
  top: 2.5px !important;
  left: 2.5px !important;
  width: 16px !important;
  height: 16px !important;
  transform: none !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .25) !important;
  transition: transform .16s ease !important;
}

label .relative > input.sr-only.peer + div + div {
  position: absolute !important;
  top: 2.5px !important;
  left: 2.5px !important;
  width: 16px !important;
  height: 16px !important;
  transform: none !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .25) !important;
  transition: transform .16s ease !important;
}

label.relative.inline-flex > input.sr-only.peer:checked + div,
label .relative > input.sr-only.peer:checked + div {
  background: var(--root-brand) !important;
}

label.relative.inline-flex > input.sr-only.peer:checked + div::after,
label .relative > input.sr-only.peer:checked + div + div {
  transform: translateX(15px) !important;
}

label.relative.inline-flex > input.sr-only.peer:focus-visible + div,
label .relative > input.sr-only.peer:focus-visible + div {
  outline: 2px solid rgba(38, 163, 85, .35) !important;
  outline-offset: 2px !important;
  box-shadow: inset 0 1px 2px rgba(17, 24, 39, .08) !important;
}

label:has(input.sr-only.peer:disabled) {
  cursor: not-allowed !important;
  opacity: .62;
}

/* Root's custom single-select control. The native select stays in the form
   and remains the source of truth; JS supplies this accessible presentation. */
.pretty-select {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

.pretty-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.pretty-select-button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px 7px 11px;
  border: 1px solid var(--root-border);
  border-radius: var(--root-radius-sm);
  background: #fff;
  color: var(--root-ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .03), inset 0 1px 1px rgba(17, 24, 39, .02);
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.pretty-select-button:hover {
  border-color: #d2d6dc;
  background: var(--root-surface-3);
}

.pretty-select-button:focus,
.pretty-select.is-open .pretty-select-button {
  outline: none;
  border-color: var(--root-brand);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .03), 0 0 0 3px rgba(38, 163, 85, .14);
}

.pretty-select-button[aria-invalid="true"] {
  border-color: var(--root-red);
  box-shadow: 0 0 0 3px rgba(205, 61, 100, .12);
}

.pretty-select-button:disabled {
  cursor: not-allowed;
  border-color: var(--root-border-soft);
  background: var(--root-surface-2);
  color: var(--root-faint);
  box-shadow: none;
}

.pretty-select-value {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pretty-select-chevron {
  width: 8px;
  height: 8px;
  flex: none;
  transform: rotate(45deg) translateY(-2px);
  border-right: 1.5px solid var(--root-muted);
  border-bottom: 1.5px solid var(--root-muted);
  transition: transform .14s ease;
}

.pretty-select.is-open .pretty-select-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.pretty-select-menu {
  position: fixed;
  z-index: 3000;
  display: flex;
  max-height: 280px;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--root-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(17, 24, 39, .16), 0 3px 10px rgba(17, 24, 39, .08);
}

.pretty-select-menu[hidden] { display: none; }

.pretty-select-options {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.pretty-select-search-wrap {
  flex: none;
  padding: 1px 1px 5px;
}

.pretty-select-search {
  width: 100%;
  min-height: 33px !important;
  padding: 6px 9px !important;
  font-size: 13px !important;
}

.pretty-select-empty {
  padding: 10px 9px;
  color: var(--root-muted);
  font-size: 12.5px;
  text-align: center;
}

.pretty-select-empty[hidden] { display: none; }

.pretty-select-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--root-ink-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.pretty-select-option:hover,
.pretty-select-option:focus {
  outline: none;
  background: var(--root-surface-2);
}

.pretty-select-option[hidden] { display: none; }

.pretty-select-option[aria-selected="true"] {
  background: var(--root-brand-tint);
  color: var(--root-brand-deep);
  font-weight: 650;
}

.pretty-select-option[aria-selected="true"]::after {
  content: "✓";
  color: var(--root-brand);
  font-size: 12px;
  font-weight: 800;
}

.pretty-select-option:disabled {
  cursor: not-allowed;
  background: transparent;
  color: var(--root-faint);
}

/* WYSIWYG editors should read as a first-class control, not a foreign iframe. */
.tox.tox-tinymce {
  overflow: hidden !important;
  border: 1px solid var(--root-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .025) !important;
}

.tox.tox-tinymce:focus-within {
  border-color: var(--root-brand) !important;
  box-shadow: 0 0 0 3px rgba(38, 163, 85, .14) !important;
}

.tox .tox-editor-header,
.tox .tox-toolbar-overlord,
.tox .tox-toolbar__primary {
  background: var(--root-surface-3) !important;
  box-shadow: none !important;
}

.tox .tox-editor-header {
  border-bottom: 1px solid var(--root-border-soft) !important;
}

.tox .tox-tbtn {
  border-radius: 7px !important;
}

.tox .tox-tbtn:hover,
.tox .tox-tbtn--enabled {
  background: var(--root-brand-tint) !important;
}

/* ── Tables ────────────────────────────────────────────────────────────── */

.overflow-x-auto:has(> table),
.table-responsive,
.root-listing-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--root-border);
  border-radius: 13px;
  background: #fff;
}

/* A listing already inside a card shouldn't grow a second bordered,
   rounded frame — that clips the card's bottom corners and doubles
   the rule above pagination / card-footer. */
.card > :is(.table-responsive, .overflow-x-auto:has(> table), .root-listing-scroll) {
  border: 0;
  border-radius: 0;
}

.root-listing-scroll > table {
  width: 100%;
  min-width: max-content;
}

.root-listing-block {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.root-listing-block > * {
  max-width: 100%;
  min-width: 0;
}

.root-listing-block > .flex {
  flex-wrap: wrap;
}

.root-listing-block > .flex > :first-child {
  min-width: 0;
  flex: 1 1 280px;
  overflow-wrap: anywhere;
}

table,
.table {
  width: 100%;
  border-collapse: collapse;
  background: transparent !important;
  font-size: 13.5px !important;
}

.table thead,
table thead { background: #fff !important; }

.table th,
table th {
  padding: 9px 10px !important;
  border-bottom: 1px solid var(--root-border) !important;
  color: var(--root-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: .02em !important;
  line-height: 1.3 !important;
  text-align: left;
  text-transform: uppercase !important;
  white-space: nowrap;
}

.table td,
table td {
  padding: 9px 10px !important;
  border-bottom: 1px solid var(--root-border-soft) !important;
  color: var(--root-ink-2) !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  vertical-align: top;
}

.table tbody tr:last-child td,
table tbody tr:last-child td { border-bottom: 0 !important; }

.table tbody tr:hover,
table tbody tr:hover { background: var(--root-surface-3) !important; }

.card-body > :is(.table-responsive, .overflow-x-auto:has(> table), .root-listing-scroll) {
  width: calc(100% + 36px);
  margin: 16px -18px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.card-body > :is(.table-responsive, .overflow-x-auto:has(> table), .root-listing-scroll):first-child {
  margin-top: -16px;
}

.card-body > :is(.table-responsive, .overflow-x-auto:has(> table), .root-listing-scroll):last-child {
  margin-bottom: -16px;
  border-bottom: 0;
}

/* ── Badges and alerts ─────────────────────────────────────────────────── */

.badge {
  display: inline-flex !important;
  min-height: 22px;
  align-items: center;
  gap: 5px;
  padding: 2px 8px !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 11.5px !important;
  font-weight: 680 !important;
  line-height: 18px !important;
  white-space: nowrap;
}

.badge-primary,
.badge-success,
.bg-success { background: var(--root-green-bg) !important; color: var(--root-green) !important; }
.badge-warning,
.bg-warning { background: var(--root-yellow-bg) !important; color: var(--root-yellow) !important; }
.badge-danger,
.bg-danger { background: var(--root-red-bg) !important; color: var(--root-red) !important; }
.badge-info { background: var(--root-blue-bg) !important; color: var(--root-blue) !important; }
.badge-secondary { background: var(--root-surface-2) !important; color: var(--root-muted) !important; }
.badge.bg-brand-400,
.badge.bg-green-500,
.badge.bg-green-600 { background: var(--root-green-bg) !important; color: var(--root-green) !important; }
.badge.bg-red-500,
.badge.bg-red-600 { background: var(--root-red-bg) !important; color: var(--root-red) !important; }
.badge.bg-blue-500,
.badge.bg-blue-600 { background: var(--root-blue-bg) !important; color: var(--root-blue) !important; }

.alert {
  position: relative;
  margin-bottom: 16px !important;
  padding: 13px 15px !important;
  border: 1px solid !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.alert-success { border-color: #bfe3cd !important; background: var(--root-green-bg) !important; color: var(--root-green) !important; }
.alert-danger { border-color: #efc8d2 !important; background: var(--root-red-bg) !important; color: var(--root-red) !important; }
.alert-warning { border-color: #ead9a4 !important; background: var(--root-yellow-bg) !important; color: var(--root-yellow) !important; }
.alert-info { border-color: #cbdcf2 !important; background: var(--root-blue-bg) !important; color: var(--root-blue) !important; }

:is(div, section).border-red-200.bg-red-50,
:is(div, section).border-red-300.bg-red-50 {
  border-color: #efc8d2 !important;
  border-radius: 12px !important;
  background: var(--root-red-bg) !important;
  color: var(--root-red) !important;
}

:is(div, section).border-green-200.bg-green-50,
:is(div, section).border-emerald-200.bg-emerald-50,
:is(div, section).border-emerald-300.bg-emerald-50 {
  border-color: #bfe3cd !important;
  border-radius: 12px !important;
  background: var(--root-green-bg) !important;
  color: var(--root-green) !important;
}

:is(div, section).border-amber-200.bg-amber-50,
:is(div, section).border-yellow-200.bg-yellow-50 {
  border-color: #ead9a4 !important;
  border-radius: 12px !important;
  background: var(--root-yellow-bg) !important;
  color: var(--root-yellow) !important;
}

:is(div, section).border-blue-200.bg-blue-50 {
  border-color: #cbdcf2 !important;
  border-radius: 12px !important;
  background: var(--root-blue-bg) !important;
  color: var(--root-blue) !important;
}

/* ── Modals and confirmations ──────────────────────────────────────────── */

.modal-content,
.modal-dialog > .relative.bg-white,
[aria-modal="true"] .relative.bg-white,
.root-modal-panel {
  overflow: hidden;
  border: 1px solid var(--root-border) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--root-shadow-float) !important;
}

.root-modal-panel {
  width: min(640px, calc(100vw - 32px)) !important;
  max-width: none !important;
  padding: 20px !important;
}

.modal-backdrop,
.root-modal-overlay {
  background: rgba(17, 24, 39, .43) !important;
  backdrop-filter: blur(2px);
}

.modal,
.root-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000 !important;
}
#root-search-overlay { z-index: 1900 !important; }
#root-search-overlay .root-spinner {
  border-color: var(--root-border) !important;
  border-top-color: var(--root-brand) !important;
}

.modal-header,
.modal-footer {
  border-color: var(--root-border-soft) !important;
}

.modal-header { padding: 17px 20px !important; }
.modal-body { padding: 18px 20px !important; }
.modal-footer {
  padding: 13px 20px !important;
  background: var(--root-surface-3) !important;
}

dialog.root-confirm-dialog,
dialog.root-notice-dialog {
  width: min(430px, calc(100vw - 36px));
  max-width: none;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--root-border);
  border-radius: 16px;
  background: #fff;
  color: var(--root-ink-2);
  box-shadow: var(--root-shadow-float);
}

dialog.root-confirm-dialog::backdrop,
dialog.root-notice-dialog::backdrop {
  background: rgba(17, 24, 39, .43);
  backdrop-filter: blur(2px);
}

.root-confirm-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 18px;
}

.root-confirm-glyph {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--root-red-bg);
  color: var(--root-red);
}

.root-confirm-glyph.success {
  background: var(--root-green-bg);
  color: var(--root-green);
}

.root-confirm-glyph i { font-size: 15px; }

.root-confirm-title {
  margin: 0 0 4px;
  color: var(--root-ink);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.35;
}

.root-confirm-message {
  margin: 0;
  color: var(--root-ink-2);
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-line;
}

.root-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 22px;
  border-top: 1px solid var(--root-border-soft);
  background: var(--root-surface-3);
}

.root-confirm-actions .root-confirm-ok {
  border-color: var(--root-red) !important;
  background: var(--root-red) !important;
  color: #fff !important;
}

/* ── Root member portal shell ──────────────────────────────────────────── */

.root-portal-shell {
  display: block !important;
  padding-left: var(--root-sidebar-width);
  background: var(--root-surface-3) !important;
}

.root-portal-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
  display: flex;
  width: var(--root-sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--root-border);
  background: rgba(249, 250, 249, .97);
}

.root-portal-shell > main {
  width: 100% !important;
  min-height: calc(100vh - 43px);
  max-width: none !important;
  margin-left: 0 !important;
  padding: 32px 40px 64px !important;
}

.root-portal-shell > main > .root-portal-page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.root-portal-page > section {
  width: 100%;
  min-width: 0;
}

.root-portal-page > section:first-child > hr {
  display: none;
}

.root-portal-page :is(.grid, .flex),
.root-portal-page :is(.grid, .flex) > * {
  min-width: 0;
}

.root-portal-page pre {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.root-portal-page .flex.justify-between > :last-child:is(a, button, .action-group) {
  margin-left: auto;
}

/* Directory and history search follows one consistent wide-input pattern.
   The query gets the available row; filters and actions stay compact. */
.root-portal-page form[data-search-form] {
  display: flex !important;
  width: 100%;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.root-portal-page form[data-search-form] > input:not([type="hidden"]) {
  width: auto !important;
  min-width: min(100%, 320px);
  flex: 1 1 520px !important;
}

.root-portal-page form[data-search-form] > :is(select, .pretty-select) {
  min-width: 180px;
  flex: 0 1 230px;
}

.root-portal-page form[data-search-form] > :is(button, .btn) {
  flex: none;
}

.root-portal-shell > footer {
  width: 100%;
  margin-left: 0;
  border-color: var(--root-border-soft) !important;
  background: var(--root-surface-3) !important;
}

.root-portal-account {
  margin-top: auto;
  padding: 12px 10px 14px;
  border-top: 1px solid var(--root-border-soft);
}

.root-portal-user {
  min-width: 0;
  padding: 8px 9px;
}

.root-portal-user strong,
.root-portal-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.root-portal-user strong {
  color: var(--root-ink);
  font-size: 12.5px;
}

.root-portal-user span {
  margin-top: 2px;
  color: var(--root-faint);
  font-size: 11px;
}

.root-registered-account {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--root-border);
  border-radius: 16px;
  background: var(--root-surface-3);
}

.root-registered-account-head {
  margin-bottom: 14px;
}

.root-registered-account-head p {
  margin: 3px 0 0;
  color: var(--root-muted);
  font-size: 12.5px;
}

.root-registered-account > .root-account-identity {
  margin-bottom: 12px;
}

.root-account-identity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr);
  gap: 12px;
}

.root-account-identity {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--root-border);
  border-radius: 13px;
  background: #fff;
}

.root-account-identity-label {
  display: block;
  margin: 0;
  color: var(--root-muted) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.root-account-email-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.root-account-email-control .form-control {
  width: 100%;
  min-width: 0;
}

.root-account-email-control .btn {
  min-height: 36px;
}

.root-account-identity-help {
  margin: 8px 0 0;
  color: var(--root-muted);
  font-size: 12px;
  line-height: 1.5;
}

.root-account-invite-pref {
  margin-top: 12px;
}

.root-account-invite-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.root-account-invite-control .form-select {
  width: 100%;
  min-width: 0;
}

.root-account-invite-control .btn {
  min-height: 36px;
}

.root-account-slack-state {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.root-account-slack-state code {
  min-width: 0;
  overflow: hidden;
  color: var(--root-ink-2);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.root-jobs-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.root-jobs-intro h2 {
  margin: 0;
  font-size: 20px !important;
}

.root-jobs-intro p {
  margin: 4px 0 0;
  color: var(--root-muted);
  font-size: 13.5px;
}

.root-jobs-counts {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
}

.root-jobs-counts span {
  padding: 4px 9px;
  border: 1px solid var(--root-border);
  border-radius: 999px;
  background: #fff;
  color: var(--root-muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.root-jobs-counts strong {
  color: var(--root-ink-2);
  font-weight: 750;
}

.root-job-company-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}

.root-job-company-card {
  overflow: hidden;
  border: 1px solid var(--root-border);
  border-radius: var(--root-radius);
  background: #fff;
  box-shadow: var(--root-shadow-card);
}

.root-job-company-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--root-border-soft);
}

.root-job-company-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.root-job-company-identity h3 {
  overflow: hidden;
  margin: 0;
  font-size: 15px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.root-job-company-logo,
.root-job-company-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--root-border);
  border-radius: 10px;
  background: var(--root-surface-3);
}

.root-job-company-logo img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.root-job-company-mark {
  background: var(--root-brand-tint);
  color: var(--root-brand-deep);
  font-size: 14px;
  font-weight: 750;
}

.root-job-company-count {
  flex: none;
  color: var(--root-muted);
  font-size: 12px;
}

.root-job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.root-job-card {
  display: flex;
  min-width: 0;
  min-height: 126px;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--root-border-soft);
  border-radius: 12px;
  background: var(--root-surface-3);
}

.root-job-card h4 {
  margin: 0;
  color: var(--root-ink);
  font-size: 14px !important;
  line-height: 1.4;
}

.root-job-card-main p {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--root-muted);
  font-size: 12.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.root-job-card-main .root-job-description-empty {
  color: var(--root-faint);
  font-style: italic;
}

.root-job-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--root-brand-deep);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
}

.root-job-link:hover {
  color: var(--root-brand-hover);
  text-decoration: none;
}

.root-job-link i {
  font-size: 10px;
}

.root-jobs-empty {
  margin-top: 18px;
  padding: 32px;
  border: 1px dashed var(--root-border);
  border-radius: var(--root-radius);
  background: #fff;
  color: var(--root-muted);
  font-size: 13.5px;
  text-align: center;
}

.root-fir-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid #ead9a4;
  border-radius: var(--root-radius);
  background: var(--root-yellow-bg);
  color: var(--root-yellow);
}

.root-fir-banner-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.root-fir-banner-copy strong {
  color: var(--root-yellow);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.root-fir-banner-copy span {
  color: var(--root-yellow);
  font-size: 13.5px;
  line-height: 1.45;
}

.root-fir-banner-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--root-yellow) !important;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none !important;
  box-shadow: var(--root-shadow-card);
  white-space: nowrap;
}

.root-fir-banner-link:hover {
  background: var(--root-yellow);
  color: #fff !important;
}

.root-fir-banner-link i {
  font-size: 11px;
}

.root-portal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--root-border);
}

.root-portal-header-actions {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.root-portal-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 16px;
}

.root-portal-heading img {
  width: 52px;
  height: 52px;
  flex: none;
  padding: 4px;
  border: 1px solid var(--root-border);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--root-shadow-card);
  object-fit: contain;
}

.root-portal-heading p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--root-muted);
  font-size: 13.5px;
}

.root-tab-toolbar {
  display: flex;
  max-width: 100%;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--root-border);
}

.root-tab-list {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.root-tab-actions {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 8px;
}

.root-portal-shell :is(#calendar-tabs, #studio-tabs, #conference-tabs, #contributions-tabs) {
  max-width: 100%;
}

.root-portal-shell :is(#calendar-tabs, #studio-tabs, #conference-tabs, #contributions-tabs) > button {
  flex: none;
  min-height: 40px;
  padding: 9px 12px !important;
  color: var(--root-muted);
  font-family: inherit;
  font-size: 13.5px !important;
  line-height: 1.35;
  white-space: nowrap;
}

.root-portal-shell .bg-indigo-600 { background-color: var(--root-brand) !important; }
.root-portal-shell .hover\:bg-indigo-500:hover,
.root-portal-shell .hover\:bg-indigo-700:hover { background-color: var(--root-brand-hover) !important; }
.root-portal-shell .text-indigo-500,
.root-portal-shell .text-indigo-600,
.root-portal-shell .text-indigo-700,
.root-portal-shell .text-indigo-800,
.root-portal-shell .text-indigo-900,
.root-portal-shell .hover\:text-indigo-500:hover,
.root-portal-shell .hover\:text-indigo-600:hover,
.root-portal-shell .hover\:text-indigo-700:hover { color: var(--root-brand-deep) !important; }
.root-portal-shell .bg-indigo-50,
.root-portal-shell .bg-indigo-100,
.root-portal-shell .hover\:bg-indigo-50:hover,
.root-portal-shell .hover\:bg-indigo-100:hover { background-color: var(--root-brand-tint) !important; }
.root-portal-shell .border-indigo-100,
.root-portal-shell .border-indigo-200,
.root-portal-shell .border-indigo-300,
.root-portal-shell .border-indigo-400,
.root-portal-shell .border-indigo-600,
.root-portal-shell .hover\:border-indigo-300:hover,
.root-portal-shell .focus\:border-indigo-400:focus { border-color: rgba(38, 163, 85, .36) !important; }
.root-portal-shell .focus\:ring-indigo-400:focus,
.root-portal-shell .focus\:ring-indigo-500:focus {
  --tw-ring-color: rgba(38, 163, 85, .25) !important;
}

.root-portal-shell a.border-indigo-200.bg-indigo-50 {
  display: inline-flex !important;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px !important;
  border: 1px solid var(--root-border) !important;
  border-radius: var(--root-radius-sm) !important;
  background: #fff !important;
  color: var(--root-ink-2) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .035);
}

.root-portal-shell a.border-indigo-200.bg-indigo-50:hover {
  border-color: #d2d6dc !important;
  background: var(--root-surface-3) !important;
  color: var(--root-ink) !important;
}

/* ── Authentication and public forms ───────────────────────────────────── */

body[class*="bg-gradient"] .card,
body.flex.items-center.justify-center .card {
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(17, 24, 39, .09) !important;
}

body[class*="bg-gradient"]::after,
body.flex.items-center.justify-center::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 10%, rgba(38, 163, 85, .12), transparent 24rem),
    linear-gradient(180deg, #f8fcf9, #f4f6f5);
}

/* ── Pagination and dropdowns ───────────────────────────────────────────── */

.pagination { gap: 4px !important; }

.page-link {
  min-width: 32px;
  padding: 6px 9px !important;
  border: 1px solid var(--root-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--root-ink-2) !important;
  font-size: 12.5px !important;
  text-align: center;
}

.page-item.active .page-link {
  border-color: var(--root-brand) !important;
  background: var(--root-brand) !important;
  color: #fff !important;
}

.dropdown-menu {
  overflow: hidden;
  padding: 5px !important;
  border: 1px solid var(--root-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--root-shadow-float) !important;
}

.dropdown-item {
  padding: 7px 9px !important;
  border-radius: 8px;
  color: var(--root-ink-2) !important;
  font-size: 13px !important;
}

.dropdown-item:hover { background: var(--root-surface-2) !important; }

/* ── Responsive shell ──────────────────────────────────────────────────── */

/* The app sidebar consumes 236px, so long admin pages reach Root's
   1020px docs-shell threshold at a 1256px viewport. */
@media (max-width: 1256px) {
  :is(.fnd-admin-shell, .root-portal-shell) .root-long-page-shell {
    display: flex;
    flex-direction: column;
  }

  :is(.fnd-admin-shell, .root-portal-shell) .root-long-page-shell > .docs-side {
    position: static;
    order: -1;
    max-height: none;
    margin-bottom: 18px;
    overflow: visible;
  }

  :is(.fnd-admin-shell, .root-portal-shell) .root-long-page-shell .docs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 10px 12px 12px;
  }

  :is(.fnd-admin-shell, .root-portal-shell) .root-long-page-shell .dn-group { display: contents; }
  :is(.fnd-admin-shell, .root-portal-shell) .root-long-page-shell .dn-head { width: 100%; padding: 8px 0 2px; }
  :is(.fnd-admin-shell, .root-portal-shell) .root-long-page-shell .dn-group:first-child .dn-head { padding-top: 0; }
  :is(.fnd-admin-shell, .root-portal-shell) .root-long-page-shell .docs-nav a {
    padding: 4px 10px;
    border: 1px solid var(--root-border);
    border-radius: 999px;
  }
  :is(.fnd-admin-shell, .root-portal-shell) .root-long-page-shell .docs-nav a .d { display: none; }
}

@media (max-width: 1020px) {
  .docs-shell {
    display: flex;
    flex-direction: column;
  }

  .docs-side {
    position: static;
    order: -1;
    max-height: none;
    margin-bottom: 18px;
    overflow: visible;
  }

  .docs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 10px 12px 12px;
  }

  .docs-nav .dn-group { display: contents; }
  .docs-nav .dn-head { width: 100%; padding: 8px 0 2px; }
  .docs-nav .dn-group:first-child .dn-head { padding-top: 0; }
  .docs-nav a { padding: 4px 10px; border: 1px solid var(--root-border); border-radius: 999px; }
  .docs-nav a .d { display: none; }
}

@media (max-width: 780px) {
  .fnd-admin-shell,
  .root-portal-shell {
    padding-left: 0 !important;
  }

  .app-sidebar,
  .root-portal-sidebar {
    position: fixed;
    inset: 50px auto 0 0;
    z-index: 100;
    display: flex;
    width: min(320px, 86vw);
    height: auto;
    max-height: none;
    overflow-y: auto;
    transform: translateX(-102%);
    border-right: 1px solid var(--root-border);
    border-bottom: 0;
    background: #fff;
    box-shadow: var(--root-shadow-float);
    transition: transform .18s ease;
  }

  .sidebar-open .app-sidebar,
  .sidebar-open .root-portal-sidebar { transform: translateX(0); }

  .app-sidebar .app-sidebar-brand,
  .root-portal-sidebar .app-sidebar-brand { display: none; }

  .app-sidebar-nav {
    gap: 3px;
    padding: 8px 10px 10px;
    border-top: 1px solid var(--root-border-soft);
  }

  .app-sidebar-scrim {
    position: fixed;
    inset: 50px 0 0;
    z-index: 95;
    display: block;
    background: rgba(17, 24, 39, .28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }

  .sidebar-open .app-sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open { overflow: hidden; }

  .app-mobile-bar {
    position: sticky;
    top: 0;
    z-index: 110;
    display: flex;
    min-height: 49px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--root-border);
    background: #fff;
  }

  .app-mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--root-ink) !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
  }

  .app-mobile-brand img { width: 28px; height: 28px; object-fit: contain; }

  .app-mobile-menu-button {
    display: inline-flex;
    width: auto;
    height: 31px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid var(--root-border);
    border-radius: 9px;
    background: #fff;
    color: var(--root-ink-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
  }

  .fnd-admin-shell > main,
  .root-portal-shell > main {
    margin-left: 0 !important;
    padding: 22px 16px 44px !important;
  }

  .root-portal-shell > main {
    min-height: calc(100vh - 92px);
  }

  .fnd-admin-shell > .main-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 22px 16px 44px !important;
  }

  .fnd-admin-shell > .max-w-7xl,
  .fnd-admin-shell > .max-w-6xl,
  .fnd-admin-shell > .max-w-5xl,
  .fnd-admin-shell > .max-w-4xl,
  .fnd-admin-shell > .max-w-3xl,
  .fnd-admin-shell > .max-w-2xl,
  .fnd-admin-shell > .max-w-xl,
  .fnd-admin-shell > .max-w-lg,
  .fnd-admin-shell > .max-w-md {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 22px 16px 44px !important;
  }

  .fnd-admin-shell > footer,
  .root-portal-shell > footer { margin-left: 0; }

  .root-fir-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .root-fir-banner-link {
    align-self: flex-start;
  }

  .root-portal-header-row {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .root-portal-header-actions {
    align-self: flex-end;
    margin-left: 0;
  }

  .root-account-identity-grid,
  .root-account-invite-control {
    grid-template-columns: minmax(0, 1fr);
  }

  .root-jobs-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .root-job-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .root-job-card {
    min-height: 0;
  }

  .root-tab-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .root-tab-list {
    width: 100%;
  }

  .root-tab-actions {
    align-self: flex-end;
  }

  table,
  .table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .table-responsive table,
  .overflow-x-auto > table {
    display: table;
    min-width: 680px;
    overflow: visible;
  }

  .fnd-admin-shell main form.flex,
  .root-portal-shell main form.flex {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  h1 { font-size: 25px !important; }

  .card-header,
  .card-body,
  .card-footer { padding-left: 14px !important; padding-right: 14px !important; }

  :is(.fnd-admin-shell, .root-portal-shell) main .flex.justify-between,
  :is(.fnd-admin-shell, .root-portal-shell) main .sm\:justify-between {
    gap: 10px;
    flex-wrap: wrap;
  }

  .btn { max-width: 100%; }

  .card-header.flex,
  .card-footer.flex,
  .modal-footer.flex {
    flex-wrap: wrap;
    gap: 8px;
  }

  .root-portal-header-row > .btn,
  .root-portal-header-row > :is(button, a).bg-indigo-600 {
    width: 100%;
  }

  .root-portal-page form[data-search-form] > input:not([type="hidden"]) {
    width: 100% !important;
    flex: 1 0 100% !important;
  }

  .root-portal-page form[data-search-form] > :is(select, .pretty-select) {
    min-width: 0;
    flex: 1 1 170px;
  }

  .root-section-heading {
    align-items: stretch !important;
    flex-direction: column;
  }

  .root-section-heading > .shrink-0 {
    align-self: flex-end;
  }

  .modal-body,
  .modal-header,
  .modal-footer {
    padding-right: 14px !important;
    padding-left: 14px !important;
  }

  .root-modal-panel { padding: 14px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Member-owned community products and offers. */
.root-offers-toolbar,
.root-offers-tabs,
.root-offers-search,
.root-offer-card header,
.root-offer-card footer,
.root-offer-dialog header,
.root-offer-dialog footer,
.root-offers-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.root-offers-toolbar { justify-content: space-between; margin-top: 24px; }
.root-offers-tabs { gap: 4px; }
.root-offers-tabs a { padding: 9px 14px; border-radius: 10px; color: var(--root-muted); font-weight: 650; }
.root-offers-tabs a.active { background: var(--root-brand-tint); color: var(--root-brand-deep); }
.root-offers-hint, .root-offer-attribution { margin: 12px 0; color: var(--root-muted); font-size: 13px; }
.root-offers-search { align-items: flex-end; margin: 22px 0; }
.root-offers-search-input { flex: 1 1 260px; min-width: 0; }
.root-offers-search label, .root-offer-dialog label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.root-offers-search input[type="search"], .root-offer-dialog input:not([type="hidden"]), .root-offer-dialog textarea {
  width: 100%; border: 1px solid var(--root-border); border-radius: 9px; padding: 10px 12px; background: white;
}
.root-offers-search .root-offers-checkbox { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.root-offers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.root-offer-card { display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 1px solid var(--root-border); border-radius: var(--root-radius); background: white; box-shadow: var(--root-shadow-card); overflow-wrap: anywhere; }
.root-offer-card header, .root-offer-dialog header { justify-content: space-between; }
.root-offer-card h2, .root-offer-dialog h2 { margin: 0; font-size: 20px !important; }
.root-offer-card h3 { margin: 0 0 8px; font-size: 13px !important; font-weight: 700; }
.root-offer-badge { border-radius: 999px; background: var(--root-brand-tint); color: var(--root-brand-deep); padding: 4px 9px; font-size: 11px; white-space: nowrap; }
.root-offer-text { white-space: pre-wrap; line-height: 1.6; font-size: 14px; margin: 0 0 12px; }
.root-offer-discount { background: var(--root-surface-3); border: 1px solid var(--root-border-soft); border-radius: 10px; padding: 15px; margin: 4px 0 18px; }
.root-offer-discount p { margin: 0 0 10px; }
.root-offer-discount p:last-child { margin-bottom: 0; }
.root-offer-discount code { display: inline-block; user-select: all; white-space: pre-wrap; border: 1px dashed var(--root-border); border-radius: 5px; padding: 3px 8px; background: white; }
.root-offer-card footer { margin-top: auto; padding-top: 8px; }
.root-offer-card footer form { margin: 0 0 0 auto; }
.root-offer-remove { border: 0; background: transparent; color: #b42318; font-size: 13px; cursor: pointer; }
.root-offers-empty { text-align: center; padding: 45px 24px; border: 1px dashed var(--root-border); border-radius: var(--root-radius); background: white; }
.root-offers-empty h2 { font-size: 20px !important; }
.root-offers-empty p { margin-top: 10px; color: var(--root-muted); }
.root-offers-pagination { justify-content: flex-end; margin-top: 24px; }
.root-offer-dialog { width: min(640px, calc(100vw - 32px)); max-height: 90vh; margin: auto; padding: 28px; border: 1px solid var(--root-border); border-radius: 18px; color: var(--root-ink); background: white; overflow-y: auto; }
.root-offer-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.root-offer-dialog form > input, .root-offer-dialog textarea, .root-offer-dialog fieldset input { margin-bottom: 16px; }
.root-offer-dialog fieldset { border: 1px solid var(--root-border); border-radius: 12px; padding: 16px; margin: 8px 0 20px; }
.root-offer-dialog legend { padding: 0 5px; font-size: 14px; font-weight: 650; }
.root-offer-dialog legend span { color: var(--root-muted); font-weight: 400; }
.root-offer-error { padding: 12px; background: #fff1f0; color: #b42318; border-radius: 10px; margin-bottom: 16px; }
@media (max-width: 760px) {
  .root-offers-grid { grid-template-columns: 1fr; }
  .root-offer-dialog { padding: 20px; }
}
