/* =====================================================================
   InspControl · camada de redesign (v1)
   Aplica a nova identidade visual por cima do CSS original (Tailwind v4),
   sem mudar a posição de nenhuma funcionalidade.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --rd-font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --rd-display: 'Outfit', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;

  --rd-bg: #eef1f6;
  --rd-surface: #ffffff;
  --rd-surface-2: #f5f7fb;
  --rd-surface-3: #eaeef4;
  --rd-border: #e3e7ee;
  --rd-border-strong: #d4dae4;
  --rd-text: #0f1729;
  --rd-text-2: #3a4659;
  --rd-muted: #778196;
  --rd-faint: #a3abba;

  --rd-ink: #0e1116;
  --rd-ink-hover: #272c36;
  --rd-on-ink: #ffffff;

  --rd-brand: #8104fc;
  --rd-brand-600: #6f00db;
  --rd-brand-300: #ba76fe;
  --rd-brand-soft: #f0e1ff;
  --rd-brand-ring: rgba(129, 4, 252, .18);
  --rd-grad-hero: linear-gradient(118deg, #7a02f1 0%, #8104fc 38%, #9936fd 72%, #ca96fe 100%);
  --rd-grad-soft: linear-gradient(140deg, #e5ccfe 0%, #f1e4fe 55%, #faf6ff 100%);

  --rd-success: #15924a; --rd-success-soft: #e5f6ec;
  --rd-warn: #b86a00;    --rd-warn-soft: #fff3df;
  --rd-danger: #d93c41;  --rd-danger-soft: #fdecec;

  --rd-shadow-card: 0 1px 2px rgba(15, 23, 41, .04), 0 10px 28px -16px rgba(15, 23, 41, .14);
  --rd-shadow-pop: 0 18px 48px -12px rgba(15, 23, 41, .28), 0 2px 6px rgba(15, 23, 41, .06);
  --rd-radius-card: 22px;
  --rd-radius-field: 12px;

  --rd-side-bg: #0c0f15;
  --rd-side-text: #9ba4b4;
  --rd-side-strong: #f3f5f9;
  --rd-side-hover: rgba(255, 255, 255, .06);
  --rd-side-line: rgba(255, 255, 255, .07);

  --rd-grid: #e7ebf1;
  --rd-topbar-h: 72px;

  /* tokens do Tailwind usados pelo sistema */
  --font-sans: var(--rd-font);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --color-slate-50: #f5f7fb;
  --color-slate-100: #eef1f6;
  --color-slate-200: #e3e7ee;
  --color-slate-300: #d4dae4;
  --color-slate-400: #a3abba;
  --color-slate-500: #778196;
  --color-slate-600: #4f5a6d;
  --color-slate-700: #364154;
  --color-slate-800: #1d2738;
  --color-slate-900: #0f1729;
  --color-blue-50: #f1e4fe;
  --color-blue-100: #e8d0ff;
  --color-blue-200: #d6aefe;
  --color-blue-300: #ba76fe;
  --color-blue-500: #9630fd;
  --color-blue-600: #8104fc;
  --color-blue-700: #6f00db;
  --color-blue-800: #6d32a8;
  --color-blue-900: #613390;

  accent-color: var(--rd-ink);
}

html.dark {
  --rd-bg: #10131a;
  --rd-surface: #161a22;
  --rd-surface-2: #1b2029;
  --rd-surface-3: #232935;
  --rd-border: rgba(255, 255, 255, .07);
  --rd-border-strong: rgba(255, 255, 255, .12);
  --rd-text: #eef1f6;
  --rd-text-2: #c4cad6;
  --rd-muted: #8a93a6;
  --rd-faint: #646d80;

  --rd-ink: #f1f3f7;
  --rd-ink-hover: #ffffff;
  --rd-on-ink: #0e1116;

  --rd-brand-soft: rgba(129, 4, 252, .16);
  --rd-brand-ring: rgba(153, 54, 253, .28);
  --rd-grad-soft: linear-gradient(140deg, rgba(129, 4, 252, .28) 0%, rgba(129, 4, 252, .10) 60%, rgba(129, 4, 252, .04) 100%);

  --rd-success: #4ade80; --rd-success-soft: rgba(34, 197, 94, .14);
  --rd-warn: #fbbf24;    --rd-warn-soft: rgba(245, 158, 11, .15);
  --rd-danger: #ff7b7f;  --rd-danger-soft: rgba(239, 68, 68, .15);

  --rd-shadow-card: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 30px -18px rgba(0, 0, 0, .6);
  --rd-shadow-pop: 0 20px 50px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);

  --rd-side-bg: #08090d;
  --rd-grid: rgba(255, 255, 255, .06);
  color-scheme: dark;
}

/* ---------- 2. Base e casco ---------- */
html, html.dark body, body {
  font-family: var(--rd-font);
  background: var(--rd-side-bg) !important;
  color: var(--rd-text);
  -webkit-font-smoothing: antialiased;
}

html .min-h-screen.bg-\[\#f8f7fa\] {
  background: var(--rd-side-bg) !important;
  --cor-menu: var(--rd-side-bg) !important;
  --cor-primaria: #8104fc !important;
  --cor-primaria-suave: #ba76fe !important;
  --cor-primaria-15: rgba(129, 4, 252, .15) !important;
  --cor-primaria-20: rgba(129, 4, 252, .20) !important;
  --cor-primaria-30: rgba(129, 4, 252, .30) !important;
  --cor-primaria-40: rgba(129, 4, 252, .40) !important;
}

main.flex-1 {
  background: var(--rd-bg);
  min-height: 100vh;
  position: relative;
}
@media (min-width: 1024px) {
  main.flex-1 {
    margin: 10px 10px 10px 0;
    border-radius: 28px;
    min-height: calc(100vh - 20px);
  }
}

/* cabeçalho mobile original e sino flutuante saem (agora ficam no topo) */
.min-h-screen > header.lg\:hidden { display: none !important; }
main > div.px-4.pt-4:empty { display: none; }

/* ---------- 3. Sidebar escura fixa (claro e escuro) ---------- */
aside.bg-\[var\(--cor-menu\)\] {
  background: var(--rd-side-bg) !important;
  color: var(--rd-side-text) !important;
}
aside .bg-\[var\(--cor-primaria\)\] {
  background: linear-gradient(135deg, #8104fc, #af60fd) !important;
  box-shadow: 0 6px 16px -6px rgba(129, 4, 252, .7) !important;
}
aside > div:first-child { padding: 22px 20px 18px !important; }
aside > div:first-child .font-semibold { font-family: var(--rd-display); font-size: 17px !important; font-weight: 500 !important; letter-spacing: -.01em; }

.rd-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.rd-nav__label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #5d6676; padding: 14px 12px 6px; font-weight: 600; }
.rd-nav__item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 999px; border: 0; background: transparent;
  color: var(--rd-side-text); font: 500 14px/1.2 var(--rd-font); text-align: left; text-decoration: none;
  cursor: pointer; transition: background .15s, color .15s;
}
.rd-nav__item:hover { background: var(--rd-side-hover); color: var(--rd-side-strong); }
.rd-nav__item svg { flex-shrink: 0; width: 18px; height: 18px; }
.rd-nav__item > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-nav__item.is-active { background: #ffffff; color: #0e1116; font-weight: 600; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6); }
.rd-nav__item.is-current-group { color: var(--rd-side-strong); }
.rd-nav__chev { width: 16px !important; height: 16px !important; opacity: .55; transition: transform .2s; }
.rd-nav__group.is-open .rd-nav__chev { transform: rotate(180deg); }
.rd-nav__sub { display: none; margin: 2px 0 6px 21px; padding-left: 12px; border-left: 1px solid var(--rd-side-line); }
.rd-nav__group.is-open .rd-nav__sub { display: block; }
.rd-nav__subitem {
  position: relative; display: block; padding: 7px 12px; border-radius: 10px;
  color: #848d9d; font: 400 13px/1.3 var(--rd-font); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, color .15s;
}
.rd-nav__subitem:hover { color: var(--rd-side-strong); background: var(--rd-side-hover); }
.rd-nav__subitem.is-active { color: #fff; background: rgba(129, 4, 252, .16); font-weight: 600; }
.rd-nav__subitem.is-active::before {
  content: ""; position: absolute; left: -15.5px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--rd-brand); box-shadow: 0 0 0 3px rgba(129, 4, 252, .25);
}
.rd-side-foot { padding: 14px 20px 18px; border-top: 1px solid var(--rd-side-line); font-size: 11px; color: #5d6676; display: flex; align-items: center; gap: 8px; }
.rd-side-foot b { color: #8b94a4; font-weight: 600; }

/* ---------- 4. Barra superior ---------- */
.rd-topbar {
  position: sticky; top: 0; z-index: 45;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  height: var(--rd-topbar-h); padding: 0 24px;
  background: color-mix(in srgb, var(--rd-bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
@media (min-width: 1024px) { .rd-topbar { border-radius: 28px 28px 0 0; padding: 0 32px; } }
.rd-topbar.is-stuck { border-bottom-color: var(--rd-border); }
.rd-topbar__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rd-topbar__center { display: flex; align-items: center; gap: 8px; }
.rd-topbar__right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.rd-crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--rd-muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.rd-crumbs b { color: var(--rd-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.rd-crumbs svg { width: 14px; height: 14px; opacity: .5; flex-shrink: 0; }

.rd-icon-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 999px; border: 1px solid var(--rd-border); background: var(--rd-surface);
  color: var(--rd-text-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s;
  box-shadow: 0 1px 2px rgba(15, 23, 41, .04);
}
.rd-icon-btn:hover { color: var(--rd-text); border-color: var(--rd-border-strong); }
.rd-icon-btn:active { transform: scale(.96); }
.rd-icon-btn[aria-expanded="true"] { background: var(--rd-ink); color: var(--rd-on-ink); border-color: var(--rd-ink); }
.rd-icon-btn svg { width: 19px; height: 19px; }
.rd-badge {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px; background: var(--rd-danger); color: #fff;
  font: 700 10.5px/1 var(--rd-font); border: 2px solid var(--rd-bg);
}
.rd-icon-btn .rd-badge--brand { background: var(--rd-brand); }
.rd-menu-btn { display: none; }

.rd-search { position: relative; width: min(440px, 38vw); }
.rd-search__field {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 16px;
  border-radius: 999px; background: var(--rd-surface); border: 1px solid var(--rd-border);
  box-shadow: 0 1px 2px rgba(15, 23, 41, .04); transition: border-color .15s, box-shadow .15s;
}
.rd-search__field:focus-within { border-color: var(--rd-brand); box-shadow: 0 0 0 4px var(--rd-brand-ring); }
.rd-search__field svg { width: 18px; height: 18px; color: var(--rd-muted); flex-shrink: 0; }
.rd-search__field input {
  flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0; background: transparent !important;
  font: 400 14px var(--rd-font); color: var(--rd-text); box-shadow: none !important; padding: 0 !important;
}
.rd-search__field input::placeholder { color: var(--rd-faint); }
.rd-kbd { font: 600 11px var(--rd-font); color: var(--rd-muted); border: 1px solid var(--rd-border); background: var(--rd-surface-2); border-radius: 8px; padding: 4px 7px; }

.rd-pop {
  position: absolute; top: calc(100% + 10px); z-index: 60; min-width: 280px;
  background: var(--rd-surface); border: 1px solid var(--rd-border); border-radius: 20px;
  box-shadow: var(--rd-shadow-pop); padding: 8px; color: var(--rd-text);
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .16s, transform .16s;
}
.rd-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.rd-pop--right { right: 0; }
.rd-pop--left { left: 0; }
.rd-pop__title { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px; font-weight: 600; font-size: 14px; }
.rd-pop__title small { font-weight: 500; color: var(--rd-muted); font-size: 12px; }
.rd-pop__sep { height: 1px; background: var(--rd-border); margin: 6px 4px; }

.rd-results { width: 100%; max-height: 380px; overflow: auto; }
.rd-result {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px;
  color: var(--rd-text); text-decoration: none; font-size: 14px; cursor: pointer;
}
.rd-result small { margin-left: auto; color: var(--rd-muted); font-size: 12px; }
.rd-result svg { width: 16px; height: 16px; color: var(--rd-muted); }
.rd-result.is-hl, .rd-result:hover { background: var(--rd-surface-2); }
.rd-result mark { background: var(--rd-brand-soft); color: inherit; border-radius: 4px; padding: 0 1px; }
.rd-empty { padding: 18px 12px; text-align: center; color: var(--rd-muted); font-size: 13px; }

.rd-filter { width: 340px; padding: 6px 6px 10px; }
.rd-filter__group { padding: 8px 12px; }
.rd-filter__group > div:first-child { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--rd-muted); margin-bottom: 8px; }
.rd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rd-border); background: var(--rd-surface); color: var(--rd-text-2); font: 500 12.5px var(--rd-font);
  transition: all .15s;
}
.rd-chip:hover { border-color: var(--rd-border-strong); color: var(--rd-text); }
.rd-chip.is-on { background: var(--rd-ink); border-color: var(--rd-ink); color: var(--rd-on-ink); }
.rd-pop__actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px 2px; }

.rd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--rd-border); background: var(--rd-surface); color: var(--rd-text);
  font: 600 13.5px var(--rd-font); cursor: pointer; text-decoration: none; transition: all .15s; white-space: nowrap;
}
.rd-btn:hover { border-color: var(--rd-border-strong); background: var(--rd-surface-2); }
.rd-btn--ink { background: var(--rd-ink); border-color: var(--rd-ink); color: var(--rd-on-ink); }
.rd-btn--ink:hover { background: var(--rd-ink-hover); border-color: var(--rd-ink-hover); }
.rd-btn svg { width: 16px; height: 16px; }
.rd-btn-plus { width: 40px; padding: 0; }

.rd-notif { width: 380px; }
.rd-notif__list { max-height: 400px; overflow: auto; padding: 2px; }
.rd-notif__item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; }
.rd-notif__item:hover { background: var(--rd-surface-2); }
.rd-notif__ico { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.rd-notif__ico svg { width: 17px; height: 17px; }
.rd-notif__ico.is-vencido { background: var(--rd-danger-soft); color: var(--rd-danger); }
.rd-notif__ico.is-vermelho { background: var(--rd-danger-soft); color: var(--rd-danger); }
.rd-notif__ico.is-laranja { background: var(--rd-warn-soft); color: var(--rd-warn); }
.rd-notif__txt { min-width: 0; }
.rd-notif__item b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--rd-text); }
.rd-notif__sub { display: block; font-size: 12.5px; color: var(--rd-muted); margin-top: 2px; }
.rd-notif__sub.is-late { color: var(--rd-danger); }
.rd-notif__foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 4px; font-size: 12.5px; color: var(--rd-muted); }
.rd-notif__foot a { color: var(--rd-brand); font-weight: 600; text-decoration: none; }

/* perfil */
.rd-profile { position: relative; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--rd-surface); border: 1px solid var(--rd-border); box-shadow: 0 1px 2px rgba(15, 23, 41, .04); }
.rd-profile__btn { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 0; height: 40px; border: 0; background: transparent; border-radius: 999px; cursor: pointer; color: var(--rd-text); text-align: left; }
.rd-avatar { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0; font: 600 13px var(--rd-font); color: #fff; background: linear-gradient(135deg, #8104fc, #af60fd); }
.rd-avatar--lg { width: 48px; height: 48px; font-size: 15px; }
.rd-profile__meta { display: flex; flex-direction: column; line-height: 1.15; }
.rd-profile__meta b { font-size: 14px; font-weight: 600; }
.rd-role { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--rd-muted); font-weight: 500; }
.rd-role::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rd-brand); }
.rd-profile__chev { width: 16px; height: 16px; color: var(--rd-muted); transition: transform .2s; }
.rd-profile__btn[aria-expanded="true"] .rd-profile__chev { transform: rotate(180deg); }
.rd-profile__sep { width: 1px; height: 24px; background: var(--rd-border); margin: 0 2px; }
.rd-logout-btn { width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--rd-muted); display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.rd-logout-btn:hover { background: var(--rd-danger-soft); color: var(--rd-danger); }
.rd-logout-btn svg { width: 18px; height: 18px; }

.rd-usermenu { width: 290px; }
.rd-usermenu__head { display: flex; gap: 12px; align-items: center; padding: 12px; margin-bottom: 4px; border-radius: 16px; background: var(--rd-surface-2); }
.rd-usermenu__head b { display: block; font-size: 15px; font-weight: 600; }
.rd-usermenu__head code { display: block; font: 500 11.5px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--rd-muted); margin: 2px 0 6px; }
.rd-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font: 600 10.5px var(--rd-font); letter-spacing: .06em; text-transform: uppercase; background: var(--rd-brand-soft); color: var(--rd-brand); }
html.dark .rd-tag { color: var(--rd-brand-300); }
.rd-mi {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; border: 0; background: transparent;
  color: var(--rd-text); font: 500 14px var(--rd-font); text-decoration: none; cursor: pointer; text-align: left;
}
.rd-mi:hover { background: var(--rd-surface-2); }
.rd-mi svg { width: 18px; height: 18px; color: var(--rd-muted); }
.rd-mi small { margin-left: auto; font-size: 11.5px; color: var(--rd-muted); }
.rd-mi--danger { color: var(--rd-danger); background: var(--rd-danger-soft); font-weight: 600; }
.rd-mi--danger svg { color: var(--rd-danger); }
.rd-mi--danger:hover { background: var(--rd-danger); color: #fff; }
.rd-mi--danger:hover svg { color: #fff; }

.rd-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 100; transform: translate(-50%, 20px); opacity: 0;
  background: var(--rd-ink); color: var(--rd-on-ink); padding: 11px 18px; border-radius: 999px;
  font: 500 13.5px var(--rd-font); box-shadow: var(--rd-shadow-pop); transition: all .2s; pointer-events: none;
}
.rd-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1023px) {
  .rd-menu-btn { display: grid; }
  .rd-crumbs { display: none; }
  aside.bg-\[var\(--cor-menu\)\] { transition: transform .25s; }
  body.rd-aside-open aside.bg-\[var\(--cor-menu\)\] { transform: none !important; translate: none !important; }
  body.rd-aside-open::after { content: ""; position: fixed; inset: 0; background: rgba(8, 10, 14, .55); z-index: 40; }
}
@media (max-width: 860px) {
  .rd-topbar { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 12px; gap: 8px; }
  .rd-search { width: 100%; }
  .rd-kbd, .rd-profile__meta, .rd-profile__chev, .rd-profile__sep, .rd-logout-btn { display: none; }
  .rd-profile__btn { padding: 0; }
  .rd-notif, .rd-filter { width: min(92vw, 380px); }
}

/* ---------- 5. Tipografia ---------- */
main h1 { font-family: var(--rd-display); font-weight: 500 !important; letter-spacing: -.025em; }
main h1.text-2xl, main header > h1 { font-size: clamp(1.75rem, 1.35rem + 1vw, 2.25rem) !important; line-height: 1.1; }
main header > h1 + p, main header > p { margin-top: 6px; }
main h2, main h3 { letter-spacing: -.01em; }
main .font-bold:is(h2, h3) { font-weight: 650 !important; }
main .tabular-nums.text-2xl,
main .text-2xl.font-bold.tabular-nums,
main .text-lg.font-bold.leading-none {
  font-family: var(--rd-display); font-weight: 400 !important; letter-spacing: -.02em;
}
main .tabular-nums.text-2xl, main .text-2xl.font-bold.tabular-nums { font-size: 2.15rem !important; line-height: 1.1; }
main .text-lg.font-bold.leading-none { font-size: 1.7rem !important; }
main .uppercase.tracking-wide:is(h3, h2) { text-transform: none; letter-spacing: -.01em; font-size: 15px !important; }

/* ---------- 6. Cards e superfícies ---------- */
main :is(div, section, article, form, header, aside):is(.bg-white):is(.border, .shadow-sm, .shadow, .shadow-md):not(.inline-flex) {
  background-color: var(--rd-surface) !important;
  border-color: var(--rd-border) !important;
  border-radius: var(--rd-radius-card) !important;
  box-shadow: var(--rd-shadow-card) !important;
}
main section.bg-white, main .rounded-2xl.bg-white { padding: 22px !important; }

/* KPI em destaque */
main div.rounded-xl.border.bg-blue-50\/60 {
  background: var(--rd-grad-soft) !important; border-color: #cbdafe !important; box-shadow: var(--rd-shadow-card);
  border-radius: var(--rd-radius-card) !important;
}
html.dark main div.rounded-xl.border.bg-blue-50\/60 { border-color: rgba(129, 4, 252, .3) !important; }
main div.rounded-xl.border.bg-blue-50\/60 .text-blue-700 { color: var(--rd-brand) !important; }
html.dark main div.rounded-xl.border.bg-blue-50\/60 .text-blue-700 { color: #cf9ffe !important; }

/* cards de gráfico escuros -> superfície padrão */
main .rounded-2xl.bg-slate-900 {
  background: var(--rd-surface) !important; border: 1px solid var(--rd-border); box-shadow: var(--rd-shadow-card);
  border-radius: var(--rd-radius-card) !important; padding: 22px !important;
}
main .rounded-2xl.bg-slate-900 .text-slate-300 { color: var(--rd-text) !important; }
main .rounded-2xl.bg-slate-900 .text-slate-100 { color: var(--rd-text) !important; }
main .rounded-2xl.bg-slate-900 .text-slate-400 { color: var(--rd-muted) !important; }
main .recharts-responsive-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
main .recharts-cartesian-grid line { stroke: var(--rd-grid) !important; }
main .recharts-cartesian-axis-line, main .recharts-cartesian-axis-tick-line { stroke: var(--rd-border-strong) !important; }
main .recharts-cartesian-axis-tick text, main .recharts-cartesian-axis text { fill: var(--rd-muted) !important; font-family: var(--rd-font); }
main .recharts-legend-wrapper { color: var(--rd-muted) !important; }
main .recharts-label-list text { fill: var(--rd-text-2) !important; font-family: var(--rd-font); }
main .recharts-rectangle:is([fill="#3b82f6"], [fill="#2a78d6"], [fill="#2563eb"]) { fill: var(--rd-brand) !important; }

/* hero (saudação do dashboard) */
main header.bg-gradient-to-r {
  background: var(--rd-grad-hero) !important;
  border-radius: 28px !important;
  padding: 30px 34px !important;
  box-shadow: 0 24px 48px -26px rgba(129, 4, 252, .6) !important;
}
main header.bg-gradient-to-r h1 { font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.6rem) !important; font-weight: 400 !important; }
main header.bg-gradient-to-r p { color: rgba(255, 255, 255, .82) !important; font-size: 14.5px !important; }
main header.bg-gradient-to-r > .absolute.rounded-full {
  border-radius: 26px !important; background: rgba(255, 255, 255, .14) !important;
  border: 1px solid rgba(255, 255, 255, .38); backdrop-filter: blur(4px);
  width: 92px !important; height: 112px !important; top: 50% !important; bottom: auto !important;
  transform: translateY(-50%) perspective(600px) rotateY(-32deg) rotateZ(-4deg);
}
main header.bg-gradient-to-r > .absolute.rounded-full:nth-child(1) { right: 352px !important; left: auto !important; }
main header.bg-gradient-to-r > .absolute.rounded-full:nth-child(2) { right: 326px !important; left: auto !important; background: rgba(255, 255, 255, .2) !important; }
main header.bg-gradient-to-r::after {
  content: ""; position: absolute; top: 50%; right: 300px; width: 92px; height: 112px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, .12));
  border: 1px solid rgba(255, 255, 255, .5); transform: translateY(-50%) perspective(600px) rotateY(-32deg) rotateZ(-4deg);
  pointer-events: none;
}
@media (max-width: 900px) { main header.bg-gradient-to-r::after, main header.bg-gradient-to-r > .absolute.rounded-full { display: none; } }
main header.bg-gradient-to-r a {
  border-radius: 999px !important; padding: 9px 16px !important; font-size: 13px !important;
  background: rgba(255, 255, 255, .18) !important; border: 1px solid rgba(255, 255, 255, .35);
}
main header.bg-gradient-to-r a:hover { background: rgba(255, 255, 255, .28) !important; }

/* ---------- 7. Botões ---------- */
main button:is(.rounded, .rounded-md, .rounded-lg):not(:has(> div, > p, > span.block, > strong)),
main a:is(.rounded, .rounded-md, .rounded-lg):is(.border, .px-3, .px-4):not(:has(> div, > p)) {
  border-radius: 999px !important;
}
main :is(button, a):is(.px-4.py-1\.5, .px-3.py-1\.5, .px-4.py-2, .px-5.py-2) { font-weight: 600; }

/* primário = pílula escura (como na referência) */
main :is(button, a):is(.bg-\[\#7367f0\], .bg-\[var\(--cor-primaria\)\], .bg-blue-600) {
  background: var(--rd-ink) !important; color: var(--rd-on-ink) !important; border-color: var(--rd-ink) !important;
  box-shadow: 0 8px 18px -10px rgba(14, 17, 22, .55) !important;
}
main :is(button, a):is(.bg-\[\#7367f0\], .bg-\[var\(--cor-primaria\)\], .bg-blue-600):hover { background: var(--rd-ink-hover) !important; }
html.dark main :is(button, a):is(.bg-\[\#7367f0\], .bg-\[var\(--cor-primaria\)\], .bg-blue-600) { box-shadow: none !important; }

/* secundário */
main :is(button, a).border.border-slate-300 { border-color: var(--rd-border-strong) !important; background-color: var(--rd-surface); }
main :is(button, a).border.border-slate-300:hover { background-color: var(--rd-surface-2) !important; }

/* abas do dashboard (botões soltos) */
main .flex.gap-2.mb-6 > button { padding: 10px 18px !important; box-shadow: none !important; border: 1px solid var(--rd-border); background-color: var(--rd-surface); }
main .flex.gap-2.mb-6 > button.bg-white:hover { border-color: var(--rd-border-strong); }

/* controles segmentados */
main .inline-flex.rounded-lg.border.p-0\.5 {
  border-radius: 999px !important; background: var(--rd-surface-2) !important; border-color: var(--rd-border) !important; padding: 4px !important; gap: 2px;
}
main .inline-flex.rounded-lg.border.p-0\.5 > button { border-radius: 999px !important; padding-left: 14px !important; padding-right: 14px !important; }
main .inline-flex.rounded-lg.border.p-0\.5 > button.bg-blue-600 { box-shadow: 0 4px 12px -6px rgba(14, 17, 22, .5) !important; }

/* restos do roxo antigo -> azul da marca */
main .text-\[\#7367f0\] { color: var(--rd-brand) !important; }
html.dark main .text-\[\#7367f0\] { color: #af60fd !important; }
main .border-\[\#7367f0\]\/30 { border-color: rgba(129, 4, 252, .3) !important; }
main .bg-\[\#7367f0\]\/10 { background-color: var(--rd-brand-soft) !important; }
main .hover\:bg-\[\#7367f0\]\/20:hover { background-color: rgba(129, 4, 252, .2) !important; }

/* links de ação em azul */
main .text-blue-600, main .text-blue-700 { color: var(--rd-brand) !important; }
html.dark main .text-blue-600, html.dark main .text-blue-700 { color: #af60fd !important; }

/* ---------- 8. Formulários ---------- */
main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not(.rd-q), select, textarea) {
  border-radius: var(--rd-radius-field) !important;
  border-color: var(--rd-border-strong) !important;
  transition: border-color .15s, box-shadow .15s;
}
main table :is(input, select) { border-radius: 10px !important; }
.rd-q::-webkit-search-cancel-button { display: none; }
main :is(input:not(.rd-q), select, textarea):focus {
  outline: none !important; border-color: var(--rd-brand) !important; box-shadow: 0 0 0 4px var(--rd-brand-ring) !important;
}
main :is(input, textarea)::placeholder { color: var(--rd-faint); }
main input:is([readonly], :disabled), main .bg-slate-100:is(input) { background-color: var(--rd-surface-2) !important; }
main label > span.block.text-xs, main label > span.text-xs.text-slate-500 { font-weight: 500; color: var(--rd-muted); }
main input[type="checkbox"], main input[type="radio"] { accent-color: var(--rd-ink); width: 16px; height: 16px; }
html.dark main input[type="checkbox"], html.dark main input[type="radio"] { accent-color: var(--rd-brand); }
main label.border:is(.rounded, .rounded-md, .rounded-lg) { border-radius: 14px !important; border-color: var(--rd-border) !important; }

/* ---------- 9. Tabelas ---------- */
main table { border-color: var(--rd-border) !important; }
main table :is(th, td) { border-color: var(--rd-border) !important; }
main table thead :is(th, td) {
  background-color: var(--rd-surface-2);
  color: var(--rd-muted) !important; font-weight: 600 !important; font-size: 12px; letter-spacing: .01em;
}
main table tbody tr:hover > td:not([class*="bg-"]) { background-color: var(--rd-surface-2); }
main table tbody td { color: var(--rd-text-2); }

/* ---------- 10. Badges, avisos e estados ---------- */
main span:is(.rounded, .rounded-md):not(:empty):not(.select-none) { border-radius: 999px !important; }
main :is(div, p).rounded-lg.border.bg-blue-50, main :is(div, p).border-blue-200.bg-blue-50 {
  background: var(--rd-brand-soft) !important; border-color: transparent !important; border-radius: 14px !important; color: var(--rd-text-2);
}
main button.border-red-200.bg-red-50 { background: var(--rd-danger-soft) !important; border-color: transparent !important; color: var(--rd-danger) !important; padding: 7px 14px !important; }

/* ---------- 11. Modo escuro (substitui a paleta antiga roxa/azul-marinho) ---------- */
html.dark .bg-white { background-color: var(--rd-surface) !important; color: var(--rd-text-2); }
html.dark .bg-\[\#f8f7fa\] { background-color: var(--rd-side-bg) !important; }
html.dark :is(.bg-slate-50, .bg-slate-50\/50, .bg-slate-50\/60) { background-color: var(--rd-surface-2) !important; }
html.dark :is(.bg-slate-100, .bg-slate-200) { background-color: var(--rd-surface-3) !important; color: var(--rd-text-2); }
html.dark .text-slate-900 { color: var(--rd-text) !important; }
html.dark .text-slate-800 { color: #dde2ea !important; }
html.dark .text-slate-700 { color: var(--rd-text-2) !important; }
html.dark .text-slate-600 { color: #aab2c0 !important; }
html.dark .text-slate-500 { color: var(--rd-muted) !important; }
html.dark .text-slate-400 { color: var(--rd-faint) !important; }
html.dark :is(.border-slate-100, .border-slate-200, .border-slate-200\/80, .border-slate-300) { border-color: var(--rd-border) !important; }
html.dark :is(input, select, textarea) { background-color: var(--rd-surface-2); color: var(--rd-text); border-color: var(--rd-border-strong); }
html.dark select option { background-color: var(--rd-surface); color: var(--rd-text); }
html.dark :not(button, a).bg-blue-600 { background-color: var(--rd-brand) !important; }
html.dark main :is(button, a).bg-blue-600 { background-color: var(--rd-ink) !important; color: var(--rd-on-ink) !important; }
html.dark :is(.bg-blue-100, .bg-blue-50) { background-color: rgba(129, 4, 252, .14) !important; }
html.dark :is(.text-blue-800, .text-blue-900) { color: #cf9ffe !important; }
html.dark :is(.bg-cyan-50, .bg-fuchsia-50, .bg-indigo-50, .bg-rose-50, .bg-violet-50) { background-color: rgba(129, 4, 252, .1) !important; }
html.dark :is(.hover\:bg-slate-50, .hover\:bg-slate-100):hover { background-color: rgba(255, 255, 255, .04) !important; }
html.dark ::-webkit-scrollbar-thumb:hover { background-color: rgba(129, 4, 252, .6); }
html.dark main table thead :is(th, td) { background-color: var(--rd-surface-2) !important; }

/* =====================================================================
   12. Gráfico "Evolução por semana" (estilo receita)
   ===================================================================== */
.rd-evo-card { background: var(--rd-surface) !important; padding: 24px 24px 18px !important; }
.rd-evo__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rd-evo__title { display: flex; align-items: center; gap: 10px; }
.rd-evo__title h3 { margin: 0; font: 600 15px var(--rd-font); color: var(--rd-text); }
.rd-chip-icon { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--rd-surface-2); border: 1px solid var(--rd-border); color: var(--rd-text-2); flex-shrink: 0; }
.rd-chip-icon svg { width: 17px; height: 17px; }
.rd-evo__desc { margin: 8px 0 0; max-width: 640px; font-size: 12.5px; color: var(--rd-muted); line-height: 1.5; }
.rd-evo__legend { display: flex; gap: 6px; flex-wrap: wrap; }
.rd-legend { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--rd-surface-2); border: 1px solid var(--rd-border); font-size: 12.5px; font-weight: 500; color: var(--rd-text-2); }
.rd-legend i { width: 18px; height: 0; border-top: 2.5px solid var(--rd-brand); border-radius: 2px; }
.rd-legend i.is-dashed { border-top: 2px dashed #8fa4c8; }
html.dark .rd-legend i.is-dashed { border-top-color: #7d8aa3; }
.rd-evo__kpis { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; }
.rd-evo__big { font: 300 3rem/1 var(--rd-display); letter-spacing: -.03em; color: var(--rd-text); }
.rd-evo__big small { font: 400 15px var(--rd-font); color: var(--rd-muted); letter-spacing: 0; margin-left: 6px; }
.rd-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 600 12px var(--rd-font); }
.rd-pill--brand { background: var(--rd-brand-soft); color: var(--rd-brand); }
html.dark .rd-pill--brand { color: #cf9ffe; }
.rd-evo__sub { font-size: 13px; color: var(--rd-muted); }
.rd-evo__chart { position: relative; margin-top: 10px; height: 300px; }
.rd-evo__chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rd-evo .g-grid line { stroke: var(--rd-grid); stroke-dasharray: 3 5; }
.rd-evo .g-ylab { fill: var(--rd-faint); font: 500 11px var(--rd-font); }
.rd-evo .g-xlab { fill: var(--rd-muted); font: 500 11.5px var(--rd-font); }
.rd-evo .g-xlab.is-current { fill: var(--rd-text); font-weight: 700; }
.rd-evo .g-xpill { fill: var(--rd-surface-2); stroke: var(--rd-border); }
.rd-evo .l-prog { fill: none; stroke: #8fa4c8; stroke-width: 2; stroke-dasharray: 5 6; stroke-linecap: round; }
html.dark .rd-evo .l-prog { stroke: #7d8aa3; }
.rd-evo .l-exec { fill: none; stroke: var(--rd-brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 6px 10px rgba(129, 4, 252, .35)); }
.rd-evo .guide { stroke: url(#rdGuide); stroke-width: 1.5; }
.rd-evo .dot-exec { fill: var(--rd-surface); stroke: var(--rd-brand); stroke-width: 3; }
.rd-evo .dot-prog { fill: var(--rd-surface); stroke: #8fa4c8; stroke-width: 2.5; }
.rd-evo .hit { fill: transparent; cursor: crosshair; }
.rd-tip {
  position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 14px)); pointer-events: none;
  background: var(--rd-ink); color: var(--rd-on-ink); border-radius: 14px; padding: 9px 12px; min-width: 150px;
  box-shadow: var(--rd-shadow-pop); font-size: 12px; transition: left .12s ease-out, top .12s ease-out;
}
.rd-tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.rd-tip b { display: block; font-size: 12.5px; margin-bottom: 5px; }
.rd-tip b small { font-weight: 400; opacity: .65; margin-left: 4px; }
.rd-tip div { display: flex; align-items: center; justify-content: space-between; gap: 14px; opacity: .92; }
.rd-tip div span { display: inline-flex; align-items: center; gap: 6px; }
.rd-tip div span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rd-brand); }
.rd-tip div.is-prog span::before { background: #8fa4c8; }
.rd-tip strong { font-variant-numeric: tabular-nums; }

/* =====================================================================
   13. Página Equipe
   ===================================================================== */
.rd-page { padding: 8px 32px 40px; max-width: 1320px; margin: 0 auto; }
@media (max-width: 640px) { .rd-page { padding: 8px 16px 32px; } }
.rd-page__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 22px; }
.rd-page__head h1 { margin: 0; font: 400 clamp(2rem, 1.5rem + 1.4vw, 2.75rem)/1.05 var(--rd-display) !important; letter-spacing: -.03em; color: var(--rd-text); }
.rd-page__head p { margin: 8px 0 0; color: var(--rd-muted); font-size: 14px; }
.rd-page__actions { display: flex; align-items: center; gap: 8px; }
.rd-preview-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; vertical-align: middle; padding: 4px 10px; border-radius: 999px; background: var(--rd-warn-soft); color: var(--rd-warn); font: 600 11px var(--rd-font); letter-spacing: .02em; }

.rd-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.rd-span-6 { grid-column: span 6; } .rd-span-3 { grid-column: span 3; } .rd-span-8 { grid-column: span 8; } .rd-span-4 { grid-column: span 4; }
@media (max-width: 1180px) { .rd-span-6 { grid-column: span 12; } .rd-span-3 { grid-column: span 6; } .rd-span-8, .rd-span-4 { grid-column: span 12; } }
@media (max-width: 640px) { .rd-span-3 { grid-column: span 12; } }

.rd-card { position: relative; background: var(--rd-surface); border: 1px solid var(--rd-border); border-radius: 24px; box-shadow: var(--rd-shadow-card); padding: 22px; min-width: 0; }
.rd-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rd-card__title { display: flex; align-items: center; gap: 10px; font: 600 14.5px var(--rd-font); color: var(--rd-text); }
.rd-arrow { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--rd-surface-2); border: 1px solid var(--rd-border); color: var(--rd-text); cursor: pointer; }
.rd-arrow svg { width: 16px; height: 16px; }
.rd-num { font: 300 3.6rem/1 var(--rd-display); letter-spacing: -.04em; color: var(--rd-text); }

.rd-hero { color: #fff; background: var(--rd-grad-hero); border: 0; overflow: hidden; box-shadow: 0 24px 48px -26px rgba(129, 4, 252, .6); }
.rd-hero .rd-num { color: #fff; font-size: 4.4rem; }
.rd-hero__label { font-size: 13px; opacity: .85; }
.rd-hero__body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 10px; }
.rd-hero::after { content: ""; position: absolute; width: 340px; height: 340px; right: -110px; top: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); pointer-events: none; }
.rd-stack { display: flex; align-items: center; margin-top: 18px; }
.rd-stack .rd-avatar { width: 34px; height: 34px; font-size: 11.5px; margin-left: -8px; border: 2px solid #3d7aff; background: rgba(255, 255, 255, .92); color: #6d32a8; }
.rd-stack .rd-avatar:first-child { margin-left: 0; }
.rd-stack small { margin-left: 12px; font-size: 12.5px; opacity: .9; }
.rd-split { flex: 1; min-width: 260px; max-width: 360px; }
.rd-split__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 11.5px; opacity: .85; }
.rd-split__nums b { display: block; font: 500 15px var(--rd-display); opacity: 1; margin-top: 2px; }
.rd-split__bar { display: grid; gap: 6px; margin-top: 10px; }
.rd-split__bar span { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .35); }
.rd-split__bar span:first-child { background: #fff; }

.rd-mini-avatars { display: flex; }
.rd-mini-avatars .rd-avatar { width: 30px; height: 30px; font-size: 10.5px; margin-left: -7px; border: 2px solid var(--rd-surface); background: var(--rd-surface-3); color: var(--rd-text-2); }
.rd-mini-avatars .rd-avatar:first-child { margin-left: 0; }
.rd-stat-foot { margin-top: 14px; font-size: 12.5px; color: var(--rd-muted); }
.rd-soft { background: var(--rd-grad-soft); border-color: #cbdafe; }
html.dark .rd-soft { border-color: rgba(129, 4, 252, .3); }
.rd-soft .rd-num { color: var(--rd-brand); }
html.dark .rd-soft .rd-num { color: #cf9ffe; }
.rd-soft::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(129, 4, 252, .35), transparent 65%); pointer-events: none; }

.rd-count { padding: 3px 9px; border-radius: 999px; background: var(--rd-surface-2); border: 1px solid var(--rd-border); font: 600 11.5px var(--rd-font); color: var(--rd-muted); }
.rd-members { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin-top: 10px; }
.rd-members th { text-align: left; font: 500 12px/1.25 var(--rd-font); color: var(--rd-muted); padding: 6px 8px; vertical-align: bottom; }
.rd-members th.c, .rd-members td.c { text-align: center; }
.rd-members th.c { width: 82px; }
.rd-members th:last-child { width: 44px; }
.rd-members td { padding: 10px 8px; font-size: 13.5px; color: var(--rd-text-2); background: transparent; vertical-align: middle; }
.rd-members td:first-child { padding-left: 12px; }
.rd-members tbody tr:nth-child(odd) td { background: var(--rd-surface-2); }
.rd-members tbody tr td:first-child { border-radius: 16px 0 0 16px; }
.rd-members tbody tr td:last-child { border-radius: 0 16px 16px 0; }
.rd-member { display: flex; align-items: center; gap: 12px; min-width: 170px; }
.rd-member .rd-avatar { width: 38px; height: 38px; font-size: 12px; background: var(--rd-surface-3); color: var(--rd-text-2); border: 1px solid var(--rd-border); }
.rd-member .rd-avatar.is-me { background: linear-gradient(135deg, #8104fc, #af60fd); color: #fff; border: 0; }
.rd-member b { display: block; font-weight: 600; color: var(--rd-text); font-size: 13.5px; }
.rd-member small { display: block; color: var(--rd-muted); font-size: 12px; margin-top: 1px; }
.rd-role-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font: 600 11.5px var(--rd-font); white-space: nowrap; }
.rd-role-tag.is-admin { background: var(--rd-ink); color: var(--rd-on-ink); }
.rd-role-tag.is-insp { background: var(--rd-brand-soft); color: var(--rd-brand); }
html.dark .rd-role-tag.is-insp { color: #cf9ffe; }
.rd-role-tag.is-insp::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.rd-role-tag.is-view { background: var(--rd-surface-3); color: var(--rd-text-2); }
.rd-role-tag.is-pending { background: var(--rd-warn-soft); color: var(--rd-warn); }

.rd-switch { position: relative; display: inline-block; width: 42px; height: 24px; border: 0; padding: 0; border-radius: 999px; background: var(--rd-surface-3); cursor: pointer; transition: background .2s; vertical-align: middle; box-shadow: inset 0 0 0 1px var(--rd-border); }
.rd-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.rd-switch[aria-checked="true"] { background: var(--rd-ink); box-shadow: none; }
.rd-switch[aria-checked="true"]::after { transform: translateX(18px); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e1116' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-size: 11px; background-position: center; background-repeat: no-repeat; }
html.dark .rd-switch::after { background-color: #fff; }
html.dark .rd-switch[aria-checked="true"] { background: var(--rd-brand); }
.rd-switch:disabled { opacity: .45; cursor: not-allowed; }
.rd-switch[data-locked] { cursor: not-allowed; }
.rd-more { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--rd-border); background: var(--rd-surface); color: var(--rd-text-2); display: grid; place-items: center; cursor: pointer; }
.rd-more svg { width: 16px; height: 16px; }
.rd-resend { padding: 5px 10px; border-radius: 999px; border: 0; background: var(--rd-warn-soft); color: var(--rd-warn); font: 600 11.5px var(--rd-font); cursor: pointer; white-space: nowrap; }
.rd-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--rd-muted); }
.rd-note svg { width: 15px; height: 15px; }
.rd-table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }

.rd-roles { background: var(--rd-grad-soft); border-color: #cbdafe; }
html.dark .rd-roles { border-color: rgba(129, 4, 252, .25); }
.rd-roles__list { display: grid; gap: 10px; margin-top: 14px; }
.rd-rolecard { border-radius: 18px; padding: 14px; background: var(--rd-surface); border: 1px solid var(--rd-border); }
.rd-rolecard.is-ink { background: #0e1116; border-color: #0e1116; color: #fff; }
.rd-rolecard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rd-rolecard__top small { font-size: 12px; color: var(--rd-muted); display: flex; align-items: center; gap: 8px; }
.rd-rolecard.is-ink .rd-rolecard__top small { color: #a3abba; }
.rd-rolecard p { margin: 10px 0 12px; font-size: 13px; line-height: 1.45; color: var(--rd-text-2); }
.rd-rolecard.is-ink p { color: #e3e7ee; }
.rd-rolecard .rd-role-tag.is-admin { background: #fff; color: #0e1116; }
.rd-perm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-perm { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font: 500 11.5px var(--rd-font); background: var(--rd-surface-2); color: var(--rd-faint); }
.rd-perm.is-on { background: var(--rd-brand-soft); color: var(--rd-brand); }
html.dark .rd-perm.is-on { color: #cf9ffe; }
.rd-rolecard.is-ink .rd-perm { background: rgba(255, 255, 255, .1); color: #e3e7ee; }
.rd-perm svg { width: 12px; height: 12px; }
.rd-create-role { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; margin-top: 12px; border-radius: 16px; border: 1.5px dashed var(--rd-brand-300); background: color-mix(in srgb, var(--rd-surface) 70%, transparent); color: var(--rd-brand); font: 600 13.5px var(--rd-font); cursor: pointer; }
html.dark .rd-create-role { color: #cf9ffe; border-color: rgba(157, 187, 255, .4); }
.rd-create-role svg { width: 16px; height: 16px; }


/* ---------- Roxo do sistema também nas barras de medidores (antes #2a78d6) ---------- */
main [style*="background:#2a78d6"] { background: var(--rd-brand) !important; }
main [style*="color:#2a78d6"] { color: var(--rd-brand) !important; }

/* ---------- Gráficos "Evolução por semana" e "Produção por semana": painéis fixos com fundo roxo (igual nos dois temas) ---------- */
.rd-flip {
  --rd-brand: #ffffff; --rd-brand-soft: rgba(255, 255, 255, .18); --rd-brand-ring: rgba(255, 255, 255, .3);
  --rd-surface: #7a0ce8; --rd-surface-2: rgba(255, 255, 255, .14); --rd-surface-3: rgba(255, 255, 255, .22);
  --rd-border: rgba(255, 255, 255, .22); --rd-border-strong: rgba(255, 255, 255, .34);
  --rd-text: #ffffff; --rd-text-2: rgba(255, 255, 255, .88); --rd-muted: rgba(255, 255, 255, .72); --rd-faint: rgba(255, 255, 255, .55);
  --rd-grid: rgba(255, 255, 255, .18);
  --rd-ink: #2b1245; --rd-ink-hover: #411b67; --rd-on-ink: #ffffff;
  --color-slate-50: rgba(255, 255, 255, .14); --color-slate-100: rgba(255, 255, 255, .18); --color-slate-200: rgba(255, 255, 255, .24); --color-slate-300: rgba(255, 255, 255, .34);
  --color-slate-400: rgba(255, 255, 255, .55); --color-slate-500: rgba(255, 255, 255, .72); --color-slate-600: rgba(255, 255, 255, .82); --color-slate-700: rgba(255, 255, 255, .9);
  --color-slate-800: #ffffff; --color-slate-900: #ffffff;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(255, 255, 255, .20), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(88, 4, 172, .45), transparent 65%),
    linear-gradient(135deg, #8d1dfd 0%, #7a0ce8 48%, #7219ca 100%) !important;
  color: var(--rd-text); border-color: transparent !important;
  box-shadow: 0 24px 50px -26px rgba(122, 2, 241, .75) !important;
  color-scheme: dark;
}
.rd-flip .rd-evo__title h3, .rd-flip h3 { color: #fff !important; }
.rd-flip .rd-pill--brand { color: #fff; background: rgba(255, 255, 255, .2); }
.rd-flip .rd-legend, .rd-flip .rd-pill { border-color: rgba(255, 255, 255, .3); }
.rd-flip .rd-legend i { border-top-color: #fff; }
.rd-flip .rd-legend i.is-dashed { border-top-color: rgba(255, 255, 255, .7); }
.rd-flip .rd-evo__big, .rd-flip .rd-evo__big small { color: #fff; }
.rd-flip .rd-evo__big small { opacity: .75; }
/* Evolução por semana: linha branca, área e guia em branco translúcido */
.rd-flip .l-exec { stroke: #fff; filter: drop-shadow(0 6px 12px rgba(77, 2, 153, .45)); }
.rd-flip .l-prog { stroke: rgba(255, 255, 255, .62); }
.rd-flip .dot-exec { fill: #8d1dfd; stroke: #fff; }
.rd-flip .dot-prog { fill: #8d1dfd; stroke: rgba(255, 255, 255, .75); }
.rd-flip #rdAreaE stop { stop-color: #ffffff; }
.rd-flip #rdAreaP stop { stop-color: #ffffff; }
.rd-flip #rdGuide stop { stop-color: #ffffff; }
.rd-flip .g-xpill { fill: rgba(255, 255, 255, .2); stroke: rgba(255, 255, 255, .35); }
.rd-flip .g-xlab.is-current { fill: #fff; }
/* Produção por semana (gráfico original): barras e rótulos claros sobre o roxo */
main .rd-flip .recharts-rectangle { fill: #ffffff !important; fill-opacity: .94; }
main .rd-flip .recharts-line-curve, main .rd-flip .recharts-line .recharts-curve { stroke: #ffffff !important; }
main .rd-flip .recharts-dot { fill: #7a0ce8 !important; stroke: #ffffff !important; }
main .rd-flip .recharts-label-list text { fill: #ffffff !important; font-weight: 600; }
main .rd-flip .recharts-cartesian-axis-tick text, main .rd-flip .recharts-cartesian-axis text { fill: rgba(255, 255, 255, .78) !important; }
main .rd-flip .recharts-cartesian-grid line { stroke: rgba(255, 255, 255, .18) !important; }
main .rd-flip .recharts-cartesian-axis-line, main .rd-flip .recharts-cartesian-axis-tick-line { stroke: rgba(255, 255, 255, .3) !important; }
.rd-flip button { color: #fff; }
.rd-flip .inline-flex.rounded-lg.border { background: rgba(255, 255, 255, .14) !important; border-color: rgba(255, 255, 255, .25) !important; }
main .rd-flip .inline-flex.rounded-lg.border > button.bg-blue-600, .rd-flip .inline-flex button:is(.bg-blue-600, .bg-\[\#7367f0\]) { background: #fff !important; color: #7219ca !important; box-shadow: 0 6px 16px -8px rgba(59, 1, 117, .6) !important; }
.rd-flip .text-slate-500, .rd-flip .text-slate-400 { color: rgba(255, 255, 255, .72) !important; }
.rd-flip .text-slate-700, .rd-flip .text-slate-600, .rd-flip .text-slate-900, .rd-flip .text-slate-800 { color: #fff !important; }
.rd-flip a { color: #fff; }

/* legendas e marcas dos gráficos originais (antes azul #3b82f6) no roxo do sistema */
main .recharts-legend-item :is(path, rect, svg)[fill="#3b82f6"], main .recharts-legend-icon[fill="#3b82f6"] { fill: var(--rd-brand) !important; }
main .recharts-legend-item [stroke="#3b82f6"], main .recharts-line-curve[stroke="#3b82f6"] { stroke: var(--rd-brand) !important; }
main .recharts-dot[stroke="#3b82f6"] { stroke: var(--rd-brand) !important; }

/* modo escuro: trilha das barras de medidores (antes branca) */
html.dark main [style*="background:#eef2f7"] { background: rgba(255, 255, 255, .1) !important; }


/* ---------- Soldadores qualificados: desempenho (barras + rosca) ---------- */
.rd-qa { --rd-ok: #14b8a6; --rd-bad: #ec4899; margin: 0 0 22px !important; }
.rd-qa .grid { gap: 18px; }
.rd-qa-card { background: var(--rd-surface) !important; padding: 22px 24px 20px !important; }
.rd-qa__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rd-qa__head h3 { margin: 0 !important; font: 600 16px var(--rd-font) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--rd-text) !important; }
.rd-qa__head p { margin: 4px 0 0; font-size: 12.5px; color: var(--rd-muted); }
.rd-qa__legend { display: flex; gap: 8px; }
.rd-qa__legend span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--rd-surface-2); border: 1px solid var(--rd-border); font-size: 12px; font-weight: 500; color: var(--rd-text-2); }
.rd-qa__legend i, .rd-ring__leg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rd-qa__bars { position: relative; height: 300px; margin-top: 8px; }
.rd-qa__bars svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rd-qa .g-grid line { stroke: var(--rd-grid); stroke-dasharray: 3 5; }
.rd-qa .g-ylab { fill: var(--rd-faint); font: 500 11px var(--rd-font); }
.rd-qa .g-xlab { fill: var(--rd-muted); font: 600 12px var(--rd-font); }
.rd-qa .qa-hit { fill: transparent; cursor: pointer; }
.rd-qa .qa-track { fill: var(--rd-surface-3); opacity: .7; }
.rd-qa .qa-bar { transition: opacity .2s; }
.rd-qa .qa-bars-dim .qa-bar { opacity: .5; }
.rd-qa .qa-pill rect { fill: color-mix(in srgb, var(--rd-ok) 16%, var(--rd-surface)); stroke: color-mix(in srgb, var(--rd-ok) 40%, transparent); }
.rd-qa .qa-pill text { fill: #0e8a79; font: 700 11px var(--rd-font); }
html.dark .rd-qa .qa-pill text { fill: #5eead4; }
.rd-qa .qa-pill.is-bad rect { fill: color-mix(in srgb, var(--rd-bad) 16%, var(--rd-surface)); stroke: color-mix(in srgb, var(--rd-bad) 45%, transparent); }
.rd-qa .qa-pill.is-bad text { fill: #c42478; font-size: 10px; }
html.dark .rd-qa .qa-pill.is-bad text { fill: #ff9ccb; }
.rd-qa .qa-bar.is-hot .qa-track { opacity: 1; }
.rd-qa-tip { opacity: 0; transition: opacity .15s; }
.rd-qa-tip.is-on { opacity: 1; }
/* rosca */
.rd-ring { position: relative; width: min(100%, 250px); aspect-ratio: 1; margin: 14px auto 6px; }
.rd-ring svg { width: 100%; height: 100%; display: block; }
.rd-ring .ring-track { fill: none; stroke: var(--rd-surface-3); stroke-width: 24; }
.rd-ring .seg-ok, .rd-ring .seg-bad { fill: none; stroke-width: 24; stroke-linecap: round; }
.rd-ring .seg-ok { stroke: url(#rdRingOk); filter: drop-shadow(0 6px 10px rgba(20, 184, 166, .28)); }
.rd-ring .seg-bad { stroke: url(#rdRingBad); filter: drop-shadow(0 4px 8px rgba(236, 72, 153, .3)); }
.rd-ring__c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.rd-ring__c small { font-size: 12px; color: var(--rd-muted); }
.rd-ring__c strong { font: 500 2.35rem/1.1 var(--rd-display); letter-spacing: -.03em; color: var(--rd-text); }
.rd-ring__c span { font-size: 11.5px; color: var(--rd-faint); }
.rd-ring__leg { list-style: none; margin: 10px 0 0; padding: 14px 4px 0; border-top: 1px solid var(--rd-border); display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.rd-ring__leg li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--rd-text-2); }
.rd-ring__leg b { margin-left: auto; color: var(--rd-text); font-weight: 700; }


/* ---------- logo no menu lateral ---------- */
.rd-brandlogo { display: block; padding: 2px 0; }
.rd-brandlogo .rd-logo-svg, .rd-brandlogo .rd-logo-img { display: block; height: 46px; width: auto; max-width: 100%; }
main .rd-flip .recharts-cartesian-axis-tick-labels text, main .rd-flip .recharts-xAxis-tick-labels text, main .rd-flip .recharts-yAxis-tick-labels text, main .rd-flip text.recharts-cartesian-axis-tick-value { fill: rgba(255, 255, 255, .82) !important; }


/* =====================================================================
   v2 · cores com propósito, andamento por ensaio, Pipe Shop, Documentos, movimento
   ===================================================================== */
:root { --rd-ease: cubic-bezier(.2, .7, .2, 1); --rd-ok: #14b8a6; --rd-bad: #ec4899; }

/* ----- US/RX com fundo roxo: Soldado em branco, Reprovado em âmbar ----- */
main .rd-flip .recharts-rectangle[fill="#f59e0b"] { fill: #ffd166 !important; fill-opacity: 1; }
.rd-flip .recharts-legend-item-text { color: #fff !important; }
.rd-flip .recharts-legend-item path[fill="#f59e0b"] { fill: #ffd166 !important; }

/* ----- cards de resumo: cada um com seu acento, sem poluir ----- */
.rd-kpi { --ac: #8104fc; position: relative; overflow: hidden; transition: transform .25s var(--rd-ease), box-shadow .25s, border-color .25s;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ac) 11%, var(--rd-surface)) 0%, var(--rd-surface) 62%) !important;
  border-color: color-mix(in srgb, var(--ac) 24%, var(--rd-border)) !important; }
.rd-kpi[data-ac="1"] { --ac: #8104fc; } .rd-kpi[data-ac="2"] { --ac: #10b981; } .rd-kpi[data-ac="3"] { --ac: #0ea5e9; }
.rd-kpi[data-ac="4"] { --ac: #f59e0b; } .rd-kpi[data-ac="5"] { --ac: #f43f5e; }
.rd-kpi:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -20px color-mix(in srgb, var(--ac) 70%, transparent) !important; }
.rd-kpi__chip { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center;
  color: var(--ac); background: color-mix(in srgb, var(--ac) 16%, transparent); }
.rd-kpi__chip svg { width: 17px; height: 17px; }
.rd-kpi .tabular-nums { color: color-mix(in srgb, var(--ac) 82%, var(--rd-text)) !important; }

/* ----- Andamento por ensaio: três visões ----- */
.rd-andleg { display: flex; gap: 8px; margin: 4px 0 14px; }
.rd-andleg span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--rd-surface-2); border: 1px solid var(--rd-border); font-size: 12px; color: var(--rd-text-2); }
.rd-andleg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rd-andleg i.is-ok, .rd-hb i.is-ok, .rd-col span.is-ok { background: linear-gradient(90deg, #9936fd, #8104fc); }
.rd-andleg i.is-in, .rd-hb i.is-in, .rd-col span.is-in { background: linear-gradient(90deg, #34d399, #10b981); }
.rd-andv[hidden], .rd-prodline[hidden] { display: none !important; }
.rd-view-in { animation: rd-up .45s var(--rd-ease) both; }
.rd-hb { display: grid; grid-template-columns: minmax(110px, 190px) 1fr; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rd-border); }
.rd-hb:last-child { border-bottom: 0; }
.rd-hb__n { font-size: 13.5px; font-weight: 600; color: var(--rd-text); }
.rd-hb__t { display: grid; gap: 6px; }
.rd-hb__r { display: flex; align-items: center; gap: 10px; }
.rd-hb__r i { display: block; height: 10px; width: var(--w); min-width: 4px; max-width: calc(100% - 50px); border-radius: 999px; transform-origin: 0 50%; animation: rd-grow .9s var(--rd-ease) both; }
.rd-hb__r b { font-size: 12px; font-weight: 700; color: var(--rd-text-2); font-variant-numeric: tabular-nums; }
.rd-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 12px; align-items: end; padding: 26px 0 0;
  background: repeating-linear-gradient(0deg, transparent 0 calc(25% - 1px), var(--rd-grid) calc(25% - 1px) 25%); background-size: 100% 220px; background-repeat: no-repeat; background-position: 0 26px; }
.rd-col { display: grid; gap: 10px; justify-items: center; }
.rd-col__bars { height: 220px; display: flex; align-items: flex-end; justify-content: center; gap: 6px; width: 100%; }
.rd-col__bars span { position: relative; width: min(26px, 38%); height: var(--h); min-height: 3px; border-radius: 9px 9px 4px 4px; transform-origin: 50% 100%; animation: rd-rise .8s var(--rd-ease) both; }
.rd-col__bars span b { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font-size: 10.5px; font-weight: 700; color: var(--rd-text-2); white-space: nowrap; }
.rd-col label { font-size: 11.5px; line-height: 1.25; text-align: center; color: var(--rd-muted); max-width: 90px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rd-andnotes { margin-top: 14px; border-top: 1px solid var(--rd-border); padding-top: 12px; font-size: 12px; color: var(--rd-muted); }
.rd-andnotes summary { cursor: pointer; font-weight: 600; color: var(--rd-brand); list-style: none; }
.rd-andnotes summary::-webkit-details-marker { display: none; }
.rd-andnotes[open] summary { margin-bottom: 10px; }
.rd-prodline { position: relative; height: 280px; }
.rd-prodline svg { width: 100%; height: 100%; display: block; overflow: visible; }
.rd-prodline .g-grid line { stroke: rgba(255, 255, 255, .18); stroke-dasharray: 3 5; }
.rd-prodline .g-ylab, .rd-prodline .g-xlab { fill: rgba(255, 255, 255, .8); font: 500 11px var(--rd-font); }
.rd-prodline .pl-line { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: rd-draw 1.2s var(--rd-ease) forwards; filter: drop-shadow(0 6px 10px rgba(77, 2, 153, .45)); }
.rd-prodline .pl-pt circle { fill: #7a0ce8; stroke: #fff; stroke-width: 2.5; }
.rd-prodline .pl-v { fill: #fff; font: 700 11px var(--rd-font); }

/* ----- Pipe Shop: cabeçalho e grade de blocos ----- */
.rd-ps-head { display: flex !important; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px !important; }
.rd-ps-title h1 { margin-bottom: 4px; }
.rd-ps-fs { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; background: var(--rd-surface) !important; border: 1px solid var(--rd-border-strong) !important; color: var(--rd-text) !important; box-shadow: var(--rd-shadow-card); transition: transform .2s var(--rd-ease), box-shadow .2s, border-color .2s; }
.rd-ps-fs:hover { transform: translateY(-1px); border-color: var(--rd-brand) !important; color: var(--rd-brand) !important; }
.rd-ps { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px !important; }
.rd-ps > * { margin: 0 !important; min-width: 0; }
.rd-ps-nav, .rd-ps-sum, .rd-ps-main { grid-column: 1 / -1; }
.rd-ps-search { grid-column: span 7; } .rd-ps-actions { grid-column: span 5; }
.rd-ps-cols, .rd-ps-people { grid-column: span 6; }
.rd-ps-nav { padding: 14px 18px !important; }
.rd-ps-sum { padding: 0 4px; }
.rd-ps-sum__in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--rd-muted); }
.rd-ps-sum__in b { color: var(--rd-text); }
.rd-ps-prog { flex: 1; min-width: 160px; max-width: 420px; height: 8px; border-radius: 999px; background: var(--rd-surface-3); overflow: hidden; }
.rd-ps-prog i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #9936fd, #8104fc); transform-origin: 0 50%; animation: rd-grow 1s var(--rd-ease) both; }
.rd-ps-actions { display: flex !important; flex-wrap: wrap; align-items: center !important; justify-content: flex-end !important; gap: 8px !important; align-content: center; }
.rd-ps-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.rd-ps-panel__body { padding: 4px 18px 16px; }
.rd-ps-cols.is-open, .rd-ps-people.is-open { box-shadow: 0 18px 34px -24px rgba(129, 4, 252, .55) !important; }
.rd-ps-panel__body[hidden] { display: none; }
.rd-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rd-chips li { padding: 6px 12px; border-radius: 999px; background: var(--rd-brand-soft); color: var(--rd-brand); font-size: 12.5px; font-weight: 600; animation: rd-up .35s var(--rd-ease) both; }
.rd-ps-hint { margin: 12px 0 0; font-size: 12px; color: var(--rd-faint); }
.rd-ps-main > div:nth-child(2) { max-height: min(72vh, 780px); overflow: auto !important; }
.rd-ps-main thead th { position: sticky; top: 0; z-index: 2; background: var(--rd-surface-2) !important; box-shadow: 0 1px 0 var(--rd-border); }
.rd-ps-main select.is-filled { background-color: color-mix(in srgb, #10b981 15%, var(--rd-surface)) !important; border-color: color-mix(in srgb, #10b981 45%, var(--rd-border)) !important; color: #0b8a63 !important; font-weight: 600; }
html.dark .rd-ps-main select.is-filled { color: #6ee7b7 !important; }
.rd-row-in { animation: rd-up .4s var(--rd-ease) both; }
.rd-row-out { opacity: 0; transform: translateX(14px); transition: .26s var(--rd-ease); }
@media (max-width: 980px) { .rd-ps-search, .rd-ps-actions, .rd-ps-cols, .rd-ps-people { grid-column: 1 / -1; } .rd-ps-actions { justify-content: flex-start !important; } }

/* ----- botão roxo (CTA) e variações ----- */
.rd-btn-brand { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer; color: #fff !important;
  font: 600 14.5px var(--rd-font); background: linear-gradient(180deg, #9022fd, #7a0ce8) !important; box-shadow: 0 14px 26px -14px rgba(129, 4, 252, .9), inset 0 1px 0 rgba(255, 255, 255, .25) !important; transition: transform .2s var(--rd-ease), box-shadow .2s, filter .2s; }
.rd-btn-brand:hover { transform: translateY(-1px); filter: brightness(1.06); }
.rd-btn-ghost { height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer; border: 1px solid var(--rd-border-strong); background: transparent; color: var(--rd-text-2); font: 600 14px var(--rd-font); }
.rd-btn-ghost:hover { background: var(--rd-surface-2); }

/* ----- modal (Novo documento) ----- */
.rd-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.rd-modal[hidden] { display: none; }
.rd-modal__scrim { position: absolute; inset: 0; background: rgba(20, 8, 32, .55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.rd-modal__card { position: relative; width: min(100%, 520px); max-height: 92vh; overflow: auto; padding: 26px; border-radius: 26px; background: var(--rd-surface); color: var(--rd-text); box-shadow: var(--rd-shadow-pop);
  display: grid; gap: 16px; transform: translateY(14px) scale(.98); opacity: 0; transition: transform .25s var(--rd-ease), opacity .2s; }
.rd-modal.is-on .rd-modal__scrim { opacity: 1; } .rd-modal.is-on .rd-modal__card { transform: none; opacity: 1; }
.rd-modal__head { display: flex; align-items: center; justify-content: space-between; }
.rd-modal__head h3 { margin: 0; font: 500 22px var(--rd-display); letter-spacing: -.02em; }
.rd-modal__x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--rd-surface-2); color: var(--rd-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.rd-modal__card label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--rd-muted); }
.rd-modal__card input[type=text], .rd-modal__card select { height: 46px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--rd-border-strong); background: var(--rd-surface); color: var(--rd-text); font: 500 15px var(--rd-font); outline: none; transition: border-color .15s, box-shadow .15s; }
.rd-modal__card input:focus, .rd-modal__card select:focus { border-color: var(--rd-brand); box-shadow: 0 0 0 4px var(--rd-brand-ring); }
.rd-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rd-drop__box { position: relative; display: grid; place-items: center; gap: 2px; padding: 22px; border: 1.5px dashed var(--rd-border-strong); border-radius: 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.rd-drop__box:hover { border-color: var(--rd-brand); background: var(--rd-brand-soft); }
.rd-drop__box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rd-drop__box b { color: var(--rd-brand); font-size: 14px; } .rd-drop__box small { color: var(--rd-faint); font-weight: 400; }
.rd-modal__act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
main td small { display: block; color: var(--rd-faint); font-size: 12px; }
@media (max-width: 560px) { .rd-modal__row { grid-template-columns: 1fr; } }

/* ----- aviso com ação (desfazer) ----- */
.rd-toast2 { position: fixed; left: 50%; bottom: 26px; z-index: 300; display: flex; align-items: center; gap: 14px; max-width: min(92vw, 560px); padding: 13px 18px; border-radius: 16px; background: #1f0e31; color: #fff; font-size: 13.5px;
  box-shadow: 0 18px 40px -12px rgba(23, 2, 44, .6); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: transform .3s var(--rd-ease), opacity .25s; }
.rd-toast2.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.rd-toast2 button { border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; padding: 7px 12px; border-radius: 10px; cursor: pointer; }

/* ----- movimento ----- */
@keyframes rd-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rd-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rd-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rd-draw { to { stroke-dashoffset: 0; } }
.rd-enter { animation: rd-up .6s var(--rd-ease) both; animation-delay: calc(var(--rd-i, 0) * 60ms); }
.rd-evo .l-exec.is-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: rd-draw 1.5s .25s var(--rd-ease) forwards; }
main .recharts-rectangle { transform-box: fill-box; transform-origin: 50% 100%; animation: rd-rise .8s var(--rd-ease) both; }
main [role=img] > div.absolute { transform-origin: 0 50%; animation: rd-grow .9s var(--rd-ease) both; }
html.rd-theming *, html.rd-theming *::before, html.rd-theming *::after { transition: background-color .7s ease, color .7s ease, border-color .7s ease, fill .7s ease, stroke .7s ease !important; }
main button, main a { transition: transform .15s var(--rd-ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
main button:active:not(:disabled), main a.rounded-md:active { transform: scale(.97); }
main tbody tr { transition: background-color .15s; }
main tbody tr:hover { background: color-mix(in srgb, var(--rd-brand) 6%, transparent); }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--rd-brand); outline-offset: 2px; border-radius: inherit; }
::selection { background: color-mix(in srgb, var(--rd-brand) 30%, transparent); }
html { scroll-behavior: smooth; }
main { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--rd-brand) 35%, transparent) transparent; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.rd-ps-title { flex: 1 1 520px; min-width: 0; }
.rd-ps-title p { max-width: 760px; }
.rd-ps-fs { flex: none; margin-left: auto; }
.rd-ps-search { display: flex !important; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rd-ps-search > label { flex: 1 1 260px; }
.rd-ps-actions { background: var(--rd-surface); border: 1px solid var(--rd-border); border-radius: 18px; padding: 14px 16px !important; box-shadow: var(--rd-shadow-card); }
.rd-ps-actions > div { justify-content: flex-end; }

main button.rd-btn-brand.rd-btn-brand, .rd-modal button.rd-btn-brand.rd-btn-brand {
  background: linear-gradient(180deg, #9022fd, #7a0ce8) !important; color: #fff !important;
  box-shadow: 0 14px 26px -14px rgba(129, 4, 252, .9), inset 0 1px 0 rgba(255, 255, 255, .25) !important; border: 0 !important;
}
main button.rd-btn-brand.rd-btn-brand:hover { filter: brightness(1.07); transform: translateY(-1px); }
.rd-ps-search { align-items: center !important; }


/* ---------- identidade: roxo da logo (#8104fc) e ícone da marca no banner ---------- */
main header.bg-gradient-to-r > .absolute.rounded-full { display: none !important; }
main header.bg-gradient-to-r { position: relative; }
main header.bg-gradient-to-r::before {
  content: ""; position: absolute; right: 150px; top: 50%; width: 150px; height: 140px; transform: translateY(-50%) rotate(-6deg);
  background: url(logo/icone-branco.png?v=zg) center / contain no-repeat; opacity: .22; pointer-events: none; animation: rd-float 7s ease-in-out infinite alternate;
}
@keyframes rd-float { from { transform: translateY(-52%) rotate(-8deg); } to { transform: translateY(-48%) rotate(-3deg); } }
@media (max-width: 760px) { main header.bg-gradient-to-r::before { right: 16px; opacity: .14; width: 110px; } }


/* ---------- celular: tema e filtro continuam na barra; quinto card ocupa a linha inteira ---------- */
@media (max-width: 860px) {
  .rd-topbar__center { min-width: 0; gap: 6px; }
  .rd-topbar__center > .rd-search { flex: 1 1 auto; min-width: 0; width: auto; }
  .rd-topbar__center > div:not(.rd-search) { flex: none; }
  .rd-topbar__right { gap: 6px; }
  .rd-icon-btn { width: 40px; height: 40px; }
  .rd-theme-btn { display: grid; }
  .rd-search input { min-width: 0; }
}
@media (max-width: 460px) {
  .rd-topbar { gap: 6px; padding: 0 10px; }
  .rd-search__field { padding-left: 12px; padding-right: 8px; gap: 6px; }
  .rd-icon-btn { width: 38px; height: 38px; }
}
@media (max-width: 1023px) {
  .rd-kpi:nth-child(5):last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding-right: 64px; }
  .rd-kpi:nth-child(5):last-child > .tabular-nums { grid-column: 2; grid-row: 1 / span 2; font-size: 2rem; }
}

/* celular: gráficos originais encolhem para caber na tela (em vez de rolar para o lado) */
@media (max-width: 700px) {
  main .recharts-responsive-container, main .recharts-responsive-container > div { width: 100% !important; overflow: visible !important; max-width: 100% !important; }
  main .recharts-wrapper { width: 100% !important; height: auto !important; }
  main .recharts-wrapper > svg.recharts-surface { width: 100% !important; height: auto !important; }
  main .recharts-legend-wrapper { position: static !important; width: 100% !important; left: 0 !important; margin-top: 6px; }
  main .recharts-default-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
  main .recharts-default-legend .recharts-legend-item { margin-right: 0 !important; }
}

main header.bg-gradient-to-r::after { display: none !important; }
@media (max-width: 700px) { main .recharts-responsive-container { height: auto !important; } }


/* ---------- painéis roxos com elementos em preto (roxo + preto) ---------- */
.rd-flip { --rd-ink: #0b0716; --rd-ink-hover: #1a1030; --rd-on-ink: #ffffff; --rd-bar: #0b0716; }
.rd-flip .l-exec { stroke: #0b0716; filter: drop-shadow(0 6px 12px rgba(255, 255, 255, .22)); }
.rd-flip .l-prog { stroke: rgba(11, 7, 22, .62); }
.rd-flip .dot-exec { fill: #8104fc; stroke: #0b0716; }
.rd-flip .dot-prog { fill: #8104fc; stroke: rgba(11, 7, 22, .7); }
.rd-flip #rdAreaE stop, .rd-flip #rdAreaP stop, .rd-flip #rdGuide stop { stop-color: #0b0716; }
.rd-flip .g-xpill { fill: rgba(11, 7, 22, .38); stroke: rgba(11, 7, 22, .55); }
.rd-flip .rd-legend i { border-top-color: #0b0716; }
.rd-flip .rd-legend i.is-dashed { border-top-color: rgba(11, 7, 22, .62); }
.rd-flip .rd-pill--brand { color: #fff; background: rgba(11, 7, 22, .34); }
main .rd-flip .recharts-rectangle { fill: #0b0716 !important; fill-opacity: .93; }
main .rd-flip .recharts-legend-item path[fill="#3b82f6"] { fill: #0b0716 !important; }
main .rd-flip .recharts-cartesian-grid line { stroke: rgba(11, 7, 22, .24) !important; }
main .rd-flip .recharts-cartesian-axis-line, main .rd-flip .recharts-cartesian-axis-tick-line { stroke: rgba(11, 7, 22, .4) !important; }
main .rd-flip .recharts-line-curve, main .rd-flip .recharts-line .recharts-curve { stroke: #0b0716 !important; }
main .rd-flip .recharts-dot { fill: #8104fc !important; stroke: #0b0716 !important; }
.rd-flip .g-grid line { stroke: rgba(11, 7, 22, .24); }
.rd-prodline .g-grid line { stroke: rgba(11, 7, 22, .24); }
.rd-prodline .pl-line { stroke: #0b0716; filter: drop-shadow(0 6px 10px rgba(255, 255, 255, .2)); }
.rd-prodline .pl-pt circle { fill: #8104fc; stroke: #0b0716; }
#rdPl stop { stop-color: #0b0716; }
main .rd-flip .inline-flex.rounded-lg.border > button.bg-blue-600,
.rd-flip .inline-flex button:is(.bg-blue-600, .bg-\[\#7367f0\]) { background: #0b0716 !important; color: #fff !important; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .7) !important; }
.rd-flip .rd-tip { background: #0b0716; color: #fff; }


/* ---------- painéis dos gráficos: fundo preto com detalhes roxos (igual nos dois temas) ---------- */
.rd-flip {
  --rd-surface: #0b0716; --rd-surface-2: rgba(255, 255, 255, .07); --rd-surface-3: rgba(255, 255, 255, .12);
  --rd-border: rgba(255, 255, 255, .12); --rd-border-strong: rgba(255, 255, 255, .22);
  --rd-grid: rgba(255, 255, 255, .1); --rd-brand: #a35bff; --rd-brand-soft: rgba(129, 4, 252, .28);
  --rd-ink: #8104fc; --rd-ink-hover: #9433ff; --rd-on-ink: #ffffff;
  background:
    radial-gradient(75% 90% at 100% 0%, rgba(129, 4, 252, .30), transparent 62%),
    radial-gradient(60% 80% at 0% 100%, rgba(129, 4, 252, .16), transparent 66%),
    linear-gradient(160deg, #130a26 0%, #08050f 100%) !important;
  border: 1px solid rgba(129, 4, 252, .28) !important;
  box-shadow: 0 24px 50px -28px rgba(129, 4, 252, .65) !important;
}
.rd-flip .l-exec { stroke: #a35bff; stroke-width: 3.2; filter: drop-shadow(0 0 12px rgba(163, 91, 255, .65)); }
.rd-flip .l-prog { stroke: rgba(255, 255, 255, .42); }
.rd-flip .dot-exec { fill: #0b0716; stroke: #b98bff; }
.rd-flip .dot-prog { fill: #0b0716; stroke: rgba(255, 255, 255, .6); }
.rd-flip #rdAreaE stop { stop-color: #8104fc; }
.rd-flip #rdAreaP stop { stop-color: #ffffff; }
.rd-flip #rdGuide stop { stop-color: #a35bff; }
.rd-flip .g-xpill { fill: rgba(129, 4, 252, .38); stroke: rgba(163, 91, 255, .65); }
.rd-flip .rd-legend { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.rd-flip .rd-legend i { border-top-color: #a35bff; }
.rd-flip .rd-legend i.is-dashed { border-top-color: rgba(255, 255, 255, .5); }
.rd-flip .rd-pill--brand { color: #d9bcff; background: rgba(129, 4, 252, .3); }
main .rd-flip .recharts-rectangle { fill: #9433ff !important; fill-opacity: 1; }
main .rd-flip .recharts-legend-item path[fill="#3b82f6"] { fill: #9433ff !important; }
main .rd-flip .recharts-cartesian-grid line { stroke: rgba(255, 255, 255, .1) !important; }
main .rd-flip .recharts-cartesian-axis-line, main .rd-flip .recharts-cartesian-axis-tick-line { stroke: rgba(255, 255, 255, .22) !important; }
main .rd-flip .recharts-line-curve, main .rd-flip .recharts-line .recharts-curve { stroke: #a35bff !important; }
main .rd-flip .recharts-dot { fill: #0b0716 !important; stroke: #b98bff !important; }
.rd-flip .g-grid line, .rd-prodline .g-grid line { stroke: rgba(255, 255, 255, .1); }
.rd-prodline .pl-line { stroke: #a35bff; filter: drop-shadow(0 0 12px rgba(163, 91, 255, .65)); }
.rd-prodline .pl-pt circle { fill: #0b0716; stroke: #b98bff; }
#rdPl stop { stop-color: #8104fc; }
main .rd-flip .inline-flex.rounded-lg.border { background: rgba(255, 255, 255, .06) !important; border-color: rgba(255, 255, 255, .16) !important; }
main .rd-flip .inline-flex.rounded-lg.border > button.bg-blue-600,
.rd-flip .inline-flex button:is(.bg-blue-600, .bg-\[\#7367f0\]) { background: #8104fc !important; color: #fff !important; box-shadow: 0 10px 22px -10px rgba(129, 4, 252, .9) !important; }
.rd-flip .rd-tip { background: #1a0f33; color: #fff; border: 1px solid rgba(163, 91, 255, .5); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); }
.rd-flip .rd-tip::after { background: #1a0f33; }


/* =====================================================================
   Vidro, auroras e luz que segue o mouse (linguagem do SenaAI, no roxo do InspControl)
   Sem backdrop-filter nos cartões: ele cria camadas que cortam menus e tooltips abertos.
   ===================================================================== */
main.flex-1 {
  background:
    radial-gradient(900px 620px at 92% -8%, rgba(129, 4, 252, .17), transparent 70%),
    radial-gradient(780px 560px at 8% 106%, rgba(168, 85, 247, .14), transparent 70%),
    radial-gradient(520px 520px at 52% 42%, rgba(129, 4, 252, .05), transparent 70%),
    var(--rd-bg) !important;
  background-attachment: fixed !important;
}
html.dark main.flex-1 {
  background:
    radial-gradient(900px 640px at 92% -8%, rgba(129, 4, 252, .30), transparent 70%),
    radial-gradient(800px 600px at 8% 106%, rgba(110, 40, 220, .24), transparent 70%),
    radial-gradient(520px 520px at 52% 42%, rgba(129, 4, 252, .08), transparent 70%),
    var(--rd-bg) !important;
  background-attachment: fixed !important;
}
aside { background-image: radial-gradient(300px 240px at 0% 0%, rgba(129, 4, 252, .30), transparent 70%), radial-gradient(320px 320px at 100% 100%, rgba(129, 4, 252, .20), transparent 70%) !important; }

.rd-glass {
  position: relative;
  background:
    radial-gradient(280px circle at var(--mx, 50%) var(--my, -80%), rgba(129, 4, 252, .11), transparent 65%),
    radial-gradient(80% 55% at 50% -14%, rgba(129, 4, 252, .08), transparent 70%),
    linear-gradient(150deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .64)) !important;
  border: 1px solid rgba(255, 255, 255, .75) !important;
  box-shadow: inset 0 1px 0 #fff, inset 0 -36px 56px -48px rgba(129, 4, 252, .30), 0 16px 42px -24px rgba(40, 10, 90, .28) !important;
  transition: box-shadow .3s, border-color .3s, transform .3s var(--rd-ease);
}
.rd-glass:hover { border-color: rgba(129, 4, 252, .35) !important; box-shadow: inset 0 1px 0 #fff, inset 0 -36px 56px -44px rgba(129, 4, 252, .4), 0 22px 54px -24px rgba(129, 4, 252, .35) !important; }
html.dark .rd-glass {
  background:
    radial-gradient(280px circle at var(--mx, 50%) var(--my, -80%), rgba(255, 255, 255, .09), transparent 65%),
    radial-gradient(80% 55% at 50% -14%, rgba(129, 4, 252, .20), transparent 70%),
    linear-gradient(150deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .02) 42%, rgba(129, 4, 252, .09)),
    rgba(18, 13, 36, .62) !important;
  border: 1px solid rgba(255, 255, 255, .11) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -44px 64px -50px rgba(129, 4, 252, .38), 0 20px 50px -24px rgba(0, 0, 0, .65) !important;
}
html.dark .rd-glass:hover { border-color: rgba(163, 91, 255, .45) !important; }

/* cards de resumo: a luz do mouse na cor de cada um */
.rd-kpi.rd-glass {
  background:
    radial-gradient(240px circle at var(--mx, 50%) var(--my, -80%), color-mix(in srgb, var(--ac) 22%, transparent), transparent 65%),
    linear-gradient(160deg, color-mix(in srgb, var(--ac) 13%, rgba(255, 255, 255, .92)) 0%, rgba(255, 255, 255, .66) 66%) !important;
  border-color: color-mix(in srgb, var(--ac) 28%, rgba(255, 255, 255, .7)) !important;
}
html.dark .rd-kpi.rd-glass {
  background:
    radial-gradient(240px circle at var(--mx, 50%) var(--my, -80%), color-mix(in srgb, var(--ac) 26%, transparent), transparent 65%),
    linear-gradient(160deg, color-mix(in srgb, var(--ac) 16%, rgba(18, 13, 36, .7)) 0%, rgba(18, 13, 36, .62) 70%) !important;
  border-color: color-mix(in srgb, var(--ac) 30%, rgba(255, 255, 255, .1)) !important;
}

/* painéis pretos dos gráficos: a luz do mouse em roxo */
.rd-flip {
  background:
    radial-gradient(320px circle at var(--mx, 50%) var(--my, -90%), rgba(163, 91, 255, .24), transparent 65%),
    radial-gradient(75% 90% at 100% 0%, rgba(129, 4, 252, .30), transparent 62%),
    radial-gradient(60% 80% at 0% 100%, rgba(129, 4, 252, .16), transparent 66%),
    linear-gradient(160deg, #130a26 0%, #08050f 100%) !important;
}

/* janela de "Novo documento": vidro */
.rd-modal__card {
  background:
    radial-gradient(300px circle at var(--mx, 50%) var(--my, -80%), rgba(129, 4, 252, .10), transparent 65%),
    radial-gradient(80% 40% at 50% -10%, rgba(129, 4, 252, .10), transparent 70%),
    linear-gradient(150deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .86)) !important;
  box-shadow: inset 0 1px 0 #fff, 0 30px 90px -20px rgba(20, 0, 60, .55), 0 0 80px -30px rgba(129, 4, 252, .5) !important;
}
html.dark .rd-modal__card {
  background:
    radial-gradient(300px circle at var(--mx, 50%) var(--my, -80%), rgba(255, 255, 255, .08), transparent 65%),
    radial-gradient(80% 40% at 50% -10%, rgba(129, 4, 252, .22), transparent 70%),
    rgba(20, 14, 40, .94) !important;
}
@media (hover: none) { .rd-glass { --mx: 50%; --my: -80%; } }
@media (prefers-reduced-motion: reduce) { main.flex-1, html.dark main.flex-1 { background-attachment: scroll !important; } }


/* ---------- Produção por semana no estilo do fluxo de caixa do SenaAI ---------- */
.rd-pb[hidden], .rd-pb__tip:empty { display: none; }
.rd-pb__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.rd-pb__head small { display: block; font-size: 12px; color: rgba(255, 255, 255, .62); }
.rd-pb__head strong { font: 500 2.1rem/1.1 var(--rd-display); letter-spacing: -.03em; color: #fff; margin-right: 8px; }
.rd-pb__head span { color: rgba(255, 255, 255, .7); font-size: 13px; }
.rd-pb__leg span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); font-size: 12px; color: rgba(255, 255, 255, .85); }
.rd-pb__leg i { width: 9px; height: 9px; border-radius: 50%; background: #a35bff; box-shadow: 0 0 10px rgba(163, 91, 255, .8); }
.rd-pb__tip { min-height: 32px; margin: 10px 0 2px; display: flex; align-items: center; }
.rd-pb__tip .is-hint { color: rgba(255, 255, 255, .45); font-size: 12px; }
.pb-chip { display: inline-flex; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(129, 4, 252, .32); border: 1px solid rgba(163, 91, 255, .5); color: #fff; font-size: 12.5px; animation: rd-up .25s var(--rd-ease) both; }
.rd-prodbars { position: relative; }
.rd-prodbars svg { display: block; width: 100%; height: auto; overflow: visible; }
.pb-base { stroke: rgba(255, 255, 255, .18); }
.pb-hit { fill: transparent; cursor: default; }
.pb-col { outline: none; }
.pb-col.is-on .pb-hit { fill: rgba(255, 255, 255, .06); }
.pb-bar { fill: url(#rdPb); transform-box: fill-box; transform-origin: 50% 100%; animation: rd-rise .8s var(--rd-ease) both; animation-delay: var(--d, 0ms); transition: opacity .2s, filter .2s; }
.has-hover .pb-bar { opacity: .5; }
.has-hover .pb-col.is-on .pb-bar { opacity: 1; filter: drop-shadow(0 0 12px rgba(163, 91, 255, .8)); }
.pb-x { fill: rgba(255, 255, 255, .6); font: 500 11px var(--rd-font); }
.pb-col.is-on .pb-x { fill: #fff; font-weight: 700; }

/* ---------- US/RX Raiz: painel roxo (o Enchimento continua preto) ---------- */
.rd-flip.rd-purple {
  --rd-surface: #7a0df0; --rd-border: rgba(255, 255, 255, .24); --rd-grid: rgba(255, 255, 255, .22);
  background:
    radial-gradient(320px circle at var(--mx, 50%) var(--my, -90%), rgba(255, 255, 255, .24), transparent 65%),
    radial-gradient(70% 90% at 100% 0%, rgba(255, 255, 255, .20), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(40, 0, 130, .5), transparent 66%),
    linear-gradient(135deg, #9a3cff 0%, #8104fc 48%, #6500d6 100%) !important;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  box-shadow: 0 24px 50px -26px rgba(129, 4, 252, .85) !important;
}
main .rd-flip.rd-purple .recharts-rectangle { fill: #ffffff !important; fill-opacity: .95; }
main .rd-flip.rd-purple .recharts-rectangle[fill="#f59e0b"] { fill: #ffd166 !important; fill-opacity: 1; }
main .rd-flip.rd-purple .recharts-legend-item path[fill="#3b82f6"] { fill: #fff !important; }
main .rd-flip.rd-purple .recharts-cartesian-grid line { stroke: rgba(255, 255, 255, .22) !important; }
main .rd-flip.rd-purple .recharts-cartesian-axis-line, main .rd-flip.rd-purple .recharts-cartesian-axis-tick-line { stroke: rgba(255, 255, 255, .32) !important; }
.rd-flip.rd-purple .rd-legend, .rd-flip.rd-purple .rd-pill { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); }


/* ---------- Evolução por semana: pontos com números ---------- */
.rd-evo .ev-dot-e { fill: #0b0716; stroke: #b98bff; stroke-width: 2; }
.rd-evo .ev-dot-p { fill: #0b0716; stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; }
.rd-evo .ev-l { pointer-events: none; font-family: var(--rd-font); paint-order: stroke; stroke: #0b0716; stroke-width: 3px; stroke-linejoin: round; }
.rd-evo .ev-l-e { fill: #fff; font-weight: 700; font-size: 10.5px; }
.rd-evo .ev-l-p { fill: rgba(255, 255, 255, .58); font-weight: 500; font-size: 10px; }

/* ---------- tema claro: "Bom dia" em preto, degradê roxo no final e a logo roxa ---------- */
html:not(.dark) main header.bg-gradient-to-r {
  background: linear-gradient(100deg, #06030d 0%, #0b0716 52%, #2c0a66 76%, #6a05d8 90%, #8104fc 100%) !important;
  box-shadow: 0 24px 48px -26px rgba(129, 4, 252, .7) !important;
}
html:not(.dark) main header.bg-gradient-to-r::before {
  background-image: url(logo/icone.png?v=zg); opacity: .95; right: 250px; width: 128px; height: 122px;
  filter: drop-shadow(0 0 18px rgba(129, 4, 252, .55));
}
@media (max-width: 760px) { html:not(.dark) main header.bg-gradient-to-r::before { right: 14px; width: 84px; height: 80px; opacity: .55; } }

/* ---------- US/RX Raiz: roxo escuro com roxo claro nos detalhes ---------- */
.rd-flip.rd-purple {
  --rd-grid: rgba(201, 163, 255, .2); --rd-border: rgba(201, 163, 255, .28);
  background:
    radial-gradient(320px circle at var(--mx, 50%) var(--my, -90%), rgba(201, 163, 255, .24), transparent 65%),
    radial-gradient(70% 90% at 100% 0%, rgba(181, 123, 255, .26), transparent 62%),
    radial-gradient(60% 80% at 0% 100%, rgba(129, 4, 252, .30), transparent 66%),
    linear-gradient(150deg, #3d1088 0%, #290a63 52%, #190540 100%) !important;
  border: 1px solid rgba(201, 163, 255, .28) !important;
  box-shadow: 0 24px 50px -26px rgba(95, 20, 190, .85) !important;
}
main .rd-flip.rd-purple .recharts-rectangle { fill: #c9a3ff !important; fill-opacity: 1; }
main .rd-flip.rd-purple .recharts-rectangle[fill="#f59e0b"] { fill: #ffd166 !important; }
main .rd-flip.rd-purple .recharts-legend-item path[fill="#3b82f6"] { fill: #c9a3ff !important; }
main .rd-flip.rd-purple .recharts-cartesian-grid line { stroke: rgba(201, 163, 255, .2) !important; }
main .rd-flip.rd-purple .recharts-cartesian-axis-line, main .rd-flip.rd-purple .recharts-cartesian-axis-tick-line { stroke: rgba(201, 163, 255, .34) !important; }
.rd-flip.rd-purple .rd-legend, .rd-flip.rd-purple .rd-pill { background: rgba(201, 163, 255, .12); border-color: rgba(201, 163, 255, .32); }


/* ---------- fundos dos painéis (especificidade maior que "main .rounded-2xl.bg-slate-900", que impunha cor lisa) ---------- */
main .rd-flip.rd-flip.rd-flip.rd-flip {
  background:
    radial-gradient(320px circle at var(--mx, 50%) var(--my, -90%), rgba(163, 91, 255, .24), transparent 65%),
    radial-gradient(75% 90% at 100% 0%, rgba(129, 4, 252, .30), transparent 62%),
    radial-gradient(60% 80% at 0% 100%, rgba(129, 4, 252, .16), transparent 66%),
    linear-gradient(160deg, #130a26 0%, #08050f 100%) !important;
}
main .rd-flip.rd-purple.rd-flip.rd-flip.rd-flip {
  background:
    radial-gradient(320px circle at var(--mx, 50%) var(--my, -90%), rgba(201, 163, 255, .26), transparent 65%),
    radial-gradient(70% 90% at 100% 0%, rgba(181, 123, 255, .28), transparent 62%),
    radial-gradient(60% 80% at 0% 100%, rgba(129, 4, 252, .32), transparent 66%),
    linear-gradient(150deg, #3d1088 0%, #290a63 52%, #190540 100%) !important;
}

.rd-prodbars { padding-bottom: 10px; }
.rd-pb { padding-bottom: 4px; }


/* =====================================================================
   PADRONIZAÇÃO DO ROXO: o CSS original do sistema fixa #7367f0 com !important em vários lugares.
   Aqui tudo passa para o roxo da logo (#8104fc) com especificidade maior.
   ===================================================================== */
html:root, html.dark:root {
  --rd-brand: #8104fc; --rd-brand-600: #6f00db; --rd-brand-300: #bd80ff;
  --color-blue-50: #f5ebff; --color-blue-100: #ead2ff; --color-blue-200: #d7b0ff; --color-blue-300: #bd80ff;
  --color-blue-500: #9a33ff; --color-blue-600: #8104fc; --color-blue-700: #6f00db; --color-blue-800: #5d00b8; --color-blue-900: #480091;
}
html main .text-blue-600, html main .text-blue-700, html main a.text-blue-600, html main a.text-blue-700,
html main table td:last-child a.text-blue-600, html main table td:last-child a.text-blue-700 { color: var(--rd-brand) !important; }
html.dark main .text-blue-600, html.dark main .text-blue-700, html.dark main a.text-blue-600, html.dark main a.text-blue-700,
html.dark main table td:last-child a.text-blue-600, html.dark main table td:last-child a.text-blue-700 { color: #bd80ff !important; }
html main table td:last-child a.text-blue-600, html main table td:last-child a.text-blue-700 { background-color: rgba(129, 4, 252, .10) !important; border-radius: 8px; }
html.dark main table td:last-child a.text-blue-600, html.dark main table td:last-child a.text-blue-700 { background-color: rgba(129, 4, 252, .22) !important; }
html main :is(div, span, i, li):is(.bg-blue-600, .bg-\[\#7367f0\]) { background-color: var(--rd-brand) !important; }
html main :is(div, span, i):is(.bg-blue-100, .bg-blue-50) { background-color: rgba(129, 4, 252, .10) !important; }
html.dark :is(.bg-blue-100, .bg-blue-50, .bg-cyan-50, .bg-fuchsia-50, .bg-indigo-50, .bg-rose-50, .bg-violet-50) { background-color: rgba(129, 4, 252, .18) !important; }
html main .shadow-\[0_0_8px_rgba\(115\,103\,240\,0\.7\)\] { --tw-shadow: 0 0 8px rgba(129, 4, 252, .7); box-shadow: 0 0 8px rgba(129, 4, 252, .7); }
html main :is(input, select, textarea):focus, html main :is(input, select, textarea):focus-visible {
  border-color: var(--rd-brand) !important; --tw-ring-color: rgba(129, 4, 252, .35) !important; box-shadow: 0 0 0 3px rgba(129, 4, 252, .22) !important; outline: none;
}
html main input[type=checkbox], html main input[type=radio] { accent-color: var(--rd-brand); }
html, html * { scrollbar-color: rgba(129, 4, 252, .45) transparent; }
html ::-webkit-scrollbar-thumb { background: rgba(129, 4, 252, .42); }
html ::selection { background: rgba(129, 4, 252, .28); }


/* ---------- card roxo de vencimentos (barra lateral) ---------- */
.rd-side-card {
  position: relative; overflow: hidden; margin: auto 14px 12px; padding: 18px 16px 16px; border-radius: 20px; text-align: center; color: #fff;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, .34), transparent 62%),
    radial-gradient(90% 60% at 100% 100%, rgba(60, 0, 150, .55), transparent 70%),
    linear-gradient(160deg, #9a3cff 0%, #8104fc 52%, #6500d6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 18px 40px -18px rgba(129, 4, 252, .85);
}
.rd-side-card__ic { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 13px; display: grid; place-items: center; color: #8104fc; background: #fff; box-shadow: 0 8px 18px -8px rgba(30, 0, 90, .6); }
.rd-side-card__ic svg { width: 21px; height: 21px; }
.rd-side-card strong { display: block; font: 500 17px/1.2 var(--rd-display); letter-spacing: -.01em; }
.rd-side-card p { margin: 8px 0 14px; font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
.rd-side-card p b { color: #fff; font-weight: 700; }
.rd-side-card__btn { width: 100%; height: 42px; border: 0; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: #5d00b8; font: 700 13.5px var(--rd-font); box-shadow: 0 10px 22px -12px rgba(20, 0, 70, .7); transition: transform .15s var(--rd-ease), box-shadow .2s; }
.rd-side-card__btn svg { width: 15px; height: 15px; }
.rd-side-card__btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(20, 0, 70, .8); }
.rd-side-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); animation: rd-float 7s ease-in-out infinite alternate; pointer-events: none; }
@media (max-height: 640px) { .rd-side-card p { display: none; } .rd-side-card { padding-bottom: 12px; } }

/* ---------- Pipe Shop: exportar / importar / mover como antes (uma linha: 3 botões à esquerda, Mover semana à direita) ---------- */
.rd-ps-search { grid-column: 1 / -1 !important; }
.rd-ps-actions {
  grid-column: 1 / -1 !important; display: flex !important; flex-wrap: wrap; align-items: flex-start !important; justify-content: space-between !important; gap: 10px !important;
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 2px !important;
}
.rd-ps-actions > div { display: flex !important; flex-wrap: wrap; justify-content: flex-start !important; gap: 8px !important; }
.rd-ps-actions .space-y-2 > * + * { margin-top: 0 !important; }

/* ---------- roxo: últimas barras de progresso do sistema original (sem exigir <main>) ---------- */
html :is(div, span).bg-\[\#7367f0\] { background-color: var(--rd-brand) !important; }
html :is(div, span).shadow-\[0_0_8px_rgba\(115\,103\,240\,0\.7\)\] { box-shadow: 0 0 8px rgba(129, 4, 252, .7) !important; }


/* ---------- botões de criar em roxo (também links) ---------- */
main a.rd-btn-brand.rd-btn-brand { background: linear-gradient(180deg, #8f2bff, #6f00db) !important; color: #fff !important; border: 0 !important; text-decoration: none; box-shadow: 0 14px 26px -14px rgba(129, 4, 252, .9), inset 0 1px 0 rgba(255, 255, 255, .25) !important; }
main .rd-btn-brand--sm.rd-btn-brand { height: 40px; padding: 0 18px; font-size: 14px; }
main button.rd-btn-brand.rd-btn-brand { background: linear-gradient(180deg, #8f2bff, #6f00db) !important; }

/* ---------- Soldadores qualificados: Desempenho mensal e Visão geral em roxo escuro (aprovado) e roxo claro (reprovado) ---------- */
.rd-qa { --rd-ok: #6d0ad6; --rd-bad: #cfa5ff; }
.rd-qa #rdOk stop:first-child, .rd-qa #rdRingOk stop:first-child { stop-color: #9a33ff; }
.rd-qa #rdOk stop:last-child, .rd-qa #rdRingOk stop:last-child { stop-color: #5a00b4; }
.rd-qa #rdBad stop:first-child, .rd-qa #rdRingBad stop:first-child { stop-color: #e6d2ff; }
.rd-qa #rdBad stop:last-child, .rd-qa #rdRingBad stop:last-child { stop-color: #bd80ff; }
.rd-qa .qa-pill rect { fill: color-mix(in srgb, #8104fc 12%, var(--rd-surface)); stroke: color-mix(in srgb, #8104fc 38%, transparent); }
.rd-qa .qa-pill text { fill: #5d00b8; }
.rd-qa .qa-pill.is-bad rect { fill: color-mix(in srgb, #cfa5ff 30%, var(--rd-surface)); stroke: color-mix(in srgb, #bd80ff 60%, transparent); }
.rd-qa .qa-pill.is-bad text { fill: #7a30d8; }
.rd-ring .seg-ok { filter: drop-shadow(0 6px 10px rgba(129, 4, 252, .32)); }
.rd-ring .seg-bad { filter: drop-shadow(0 4px 8px rgba(189, 128, 255, .45)); }
html.dark .rd-qa { --rd-ok: #9a33ff; --rd-bad: #d9b8ff; }
html.dark .rd-qa #rdOk stop:first-child, html.dark .rd-qa #rdRingOk stop:first-child { stop-color: #b57bff; }
html.dark .rd-qa #rdOk stop:last-child, html.dark .rd-qa #rdRingOk stop:last-child { stop-color: #8104fc; }
html.dark .rd-qa .qa-pill text { fill: #d9b8ff; }
html.dark .rd-qa .qa-pill.is-bad text { fill: #e6d2ff; }

/* ---------- celular: nada passa da largura da tela; alvos de toque maiores ---------- */
@media (max-width: 860px) {
  main.flex-1 { overflow-x: clip; }
  main .ml-auto.flex, main form.ml-auto { flex-wrap: wrap; margin-left: 0 !important; width: 100%; }
  main :is(select, input:not([type=checkbox]):not([type=radio])) { max-width: 100%; min-width: 0; }
  .rd-ps-nav form { flex-wrap: wrap; width: 100%; margin-left: 0; }
  main .mx-auto.bg-white.shadow-sm { overflow-x: auto; max-width: 100%; }
}
@media (max-width: 700px) {
  main :is(button, a.rounded-md, a.rounded-lg, a.rounded-full, select) { min-height: 38px; }
  main :is(.inline-flex.rounded-lg.border) > button { min-height: 36px; }
}
main table td:last-child a { white-space: nowrap; }


.rd-img-missing { display: none !important; }
.rd-badge { font-size: 11px; }
@media (max-width: 860px) {
  .rd-nav__subitem { min-height: 42px; display: flex !important; align-items: center; }
  .rd-nav__item { min-height: 44px; }
  .rd-notif__foot a, .rd-notif__foot button { min-height: 40px; display: inline-flex; align-items: center; padding: 0 6px; }
  main summary, main a.hover\:underline, main a.text-xs, main a.text-sm.text-blue-600 { min-height: 36px; display: inline-flex; align-items: center; }
  main details > summary { padding: 6px 0; }
}


/* ---------- saudação com entrada e saída ---------- */
main header.rd-greet {
  opacity: 0; transform: translateY(-14px) scale(.985); max-height: 400px;
  transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1),
    max-height .7s cubic-bezier(.4,0,.2,1) .1s, margin .7s cubic-bezier(.4,0,.2,1) .1s, padding .7s cubic-bezier(.4,0,.2,1) .1s;
}
main header.rd-greet.rd-greet--in { opacity: 1; transform: none; }
main header.rd-greet.rd-greet--out { opacity: 0; transform: translateY(-16px) scale(.98); max-height: 0 !important; margin-top: 0; margin-bottom: 0 !important; padding-top: 0; padding-bottom: 0; }
@media (prefers-reduced-motion: reduce) { main header.rd-greet { transition: opacity .2s; transform: none !important; } }


/* ---------- ícone de tema em voo ---------- */
.rd-flyicon { position: fixed; z-index: 100000; display: grid; place-items: center; border-radius: 50%; pointer-events: none;
  color: #fff; background: linear-gradient(145deg, #a35bff, #8104fc); box-shadow: 0 10px 40px -6px rgba(129, 4, 252, .8), 0 0 0 1px rgba(255, 255, 255, .25) inset; will-change: transform; }
.rd-flyicon svg { width: 20px; height: 20px; }
.rd-theme-btn.rd-flying svg { opacity: 0; }


/* ---------- mobile: notificações e filtros centralizados e sem corte; card de vencimentos compacto ---------- */
@media (max-width: 860px) {
  .rd-pop.rd-pop.rd-notif, .rd-pop.rd-pop.rd-filter {
    position: fixed; left: 12px; right: 12px; top: 72px; width: auto; min-width: 0; max-width: 420px; margin-inline: auto;
    max-height: calc(100dvh - 92px); overflow-y: auto; overscroll-behavior: contain;
  }
  .rd-side-card { margin: 10px 12px; padding: 12px 14px; text-align: left; border-radius: 16px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
  .rd-side-card__ic { grid-row: 1 / span 2; width: 34px; height: 34px; margin: 0; border-radius: 11px; }
  .rd-side-card__ic svg { width: 18px; height: 18px; }
  .rd-side-card strong { font-size: 14.5px; }
  .rd-side-card p { margin: 2px 0 0; font-size: 11.5px; line-height: 1.35; }
  .rd-side-card__btn { grid-column: 1 / -1; height: 36px; margin-top: 10px; font-size: 12.5px; }
}
