/* Radar-X UI rx.css copiado de /root/public/assets/rx/rx.css em 23/10/2026; fontes apontam para static/rx/fonts. */
/*
 * Radar-X UI · design system unificado (base Notion DESIGN.md)
 * Tokens, shell (sidebar + topbar), componentes e utilitários.
 * Fonte: /root/public/assets/rx/rx.css · documentação: life Trabalho/PycodeBR/Infraestrutura/radarx-design-system.md
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin-ext.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Cores estruturais */
  --rx-primary: #0075de;
  --rx-primary-active: #005bab;
  --rx-primary-tint: #e8f2fc;
  --rx-secondary: #213183;
  --rx-on-primary: #ffffff;
  --rx-canvas: #ffffff;
  --rx-canvas-soft: #f6f5f4;
  --rx-canvas-sunken: #efeeec;
  --rx-surface: #ffffff;
  --rx-ink: rgba(0, 0, 0, 0.92);
  --rx-ink-secondary: #31302e;
  --rx-ink-muted: #615d59;
  --rx-ink-faint: #75716b;
  --rx-ink-ghost: #a39e98;
  --rx-hairline: #e6e6e6;
  --rx-hairline-strong: #d9d8d6;
  --rx-hover: rgba(55, 53, 47, 0.06);
  --rx-hover-strong: rgba(55, 53, 47, 0.1);

  /* Paleta decorativa (stickers, ícones, categorias) */
  --rx-sky: #62aef0;
  --rx-purple: #d6b6f6;
  --rx-purple-deep: #391c57;
  --rx-pink: #ff64c8;
  --rx-orange: #dd5b00;
  --rx-orange-deep: #793400;
  --rx-teal: #2a9d99;
  --rx-green: #1aae39;
  --rx-brown: #523410;

  /* Estados (derivados da paleta) */
  --rx-success: #1a8a35;
  --rx-success-tint: #e7f5ea;
  --rx-warning: #b45000;
  --rx-warning-tint: #fdf0e6;
  --rx-danger: #c4352b;
  --rx-danger-tint: #fbeceb;

  /* Tipografia */
  --rx-font: "Inter", -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --rx-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Raios */
  --rx-r-xs: 4px;
  --rx-r-sm: 5px;
  --rx-r-md: 8px;
  --rx-r-lg: 12px;
  --rx-r-xl: 16px;
  --rx-r-full: 9999px;

  /* Espaçamento (base 8) */
  --rx-s-1: 4px;
  --rx-s-2: 8px;
  --rx-s-3: 12px;
  --rx-s-4: 16px;
  --rx-s-5: 24px;
  --rx-s-6: 32px;
  --rx-s-7: 48px;
  --rx-s-8: 64px;

  /* Elevação */
  --rx-shadow-1: rgba(0, 0, 0, 0.01) 0 0.175px 1.041px, rgba(0, 0, 0, 0.02) 0 0.8px 2.925px, rgba(0, 0, 0, 0.027) 0 2.025px 7.847px, rgba(0, 0, 0, 0.04) 0 4px 18px;
  --rx-shadow-2: rgba(0, 0, 0, 0.01) 0 1px 3px, rgba(0, 0, 0, 0.02) 0 3px 7px, rgba(0, 0, 0, 0.02) 0 7px 15px, rgba(0, 0, 0, 0.04) 0 14px 28px, rgba(0, 0, 0, 0.05) 0 23px 52px;

  /* Shell */
  --rx-sidebar-w: 256px;
  --rx-topbar-h: 52px;
  --rx-content-max: 1120px;
  --rx-reading-max: 860px;
}

/* ───────────── Base (somente páginas nativas: html.rx-native) ───────────── */
html.rx-native { -webkit-text-size-adjust: 100%; }
html.rx-native *, html.rx-native *::before, html.rx-native *::after { box-sizing: border-box; }
html.rx-native body {
  margin: 0;
  background: var(--rx-canvas-soft);
  color: var(--rx-ink);
  font: 400 16px/1.5 var(--rx-font);
  font-feature-settings: "lnum", "locl";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.rx-native h1, html.rx-native h2, html.rx-native h3, html.rx-native h4 { margin: 0; color: var(--rx-ink); }
html.rx-native p { margin: 0; }
html.rx-native a { color: var(--rx-primary); text-decoration: none; }
html.rx-native a:hover { text-decoration: underline; text-underline-offset: 3px; }
html.rx-native img { max-width: 100%; }
html.rx-native :focus-visible { outline: 2px solid var(--rx-primary); outline-offset: 2px; }
html.rx-native ::selection { background: rgba(0, 117, 222, 0.18); }

/* ───────────── Shell ───────────── */
.rx-sidebar, .rx-topbar, .rx-palette, .rx-scrim { font-family: var(--rx-font); -webkit-font-smoothing: antialiased; box-sizing: border-box; }
.rx-sidebar *, .rx-topbar *, .rx-palette * { box-sizing: border-box; }

html.rx-shell body { padding-left: var(--rx-sidebar-w) !important; }

.rx-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 9000;
  width: var(--rx-sidebar-w);
  display: flex; flex-direction: column;
  background: #fbfbfa;
  border-right: 1px solid var(--rx-hairline);
  color: var(--rx-ink-secondary);
  font-size: 14px; line-height: 1.43;
}
.rx-sidebar__head { padding: 0 12px 6px; }
.rx-sidebar__brandrow { height: var(--rx-topbar-h); display: flex; align-items: center; margin: 0 -12px 10px; padding: 0 12px; border-bottom: 1px solid var(--rx-hairline); }
.rx-sidebar__brandrow .rx-brand { flex: 1; }
.rx-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 8px; border-radius: var(--rx-r-md);
  color: var(--rx-ink) !important; text-decoration: none !important;
}
.rx-brand:hover { background: var(--rx-hover); }
.rx-brand__mark {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: grid; place-items: center;
  border-radius: 7px; background: var(--rx-secondary); color: #fff;
  font-weight: 700; font-size: 14px; letter-spacing: -0.3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.rx-brand__mark span { position: relative; }
.rx-brand__text { display: flex; flex-direction: column; min-width: 0; }
.rx-brand__name { font-weight: 700; font-size: 15px; letter-spacing: -0.2px; line-height: 1.2; }
.rx-brand__sub { font-size: 12px; color: var(--rx-ink-faint); line-height: 1.2; }

.rx-search-btn {
  margin: 0; width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--rx-r-md);
  border: 1px solid var(--rx-hairline); background: #fff;
  color: var(--rx-ink-faint); font: 400 14px/1.4 var(--rx-font); cursor: pointer; text-align: left;
}
.rx-search-btn:hover { border-color: var(--rx-hairline-strong); color: var(--rx-ink-muted); }
.rx-search-btn kbd, .rx-kbd {
  margin-left: auto; font: 500 11px/1 var(--rx-font); color: var(--rx-ink-faint);
  border: 1px solid var(--rx-hairline); border-radius: 4px; padding: 3px 5px; background: var(--rx-canvas-soft);
}

.rx-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; }
.rx-nav__section { margin-top: 14px; }
.rx-nav__label {
  padding: 4px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.125px;
  color: #706c67;
}
.rx-nav__item {
  display: flex; align-items: center; gap: 10px;
  min-height: 32px; padding: 5px 8px; margin: 1px 0;
  border-radius: var(--rx-r-sm);
  color: var(--rx-ink-secondary) !important; text-decoration: none !important;
  font-weight: 500; font-size: 14px;
  position: relative;
}
.rx-nav__item:hover { background: var(--rx-hover); }
.rx-nav__item.is-active { background: var(--rx-hover-strong); color: var(--rx-ink) !important; font-weight: 600; }
.rx-nav__icon {
  width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center;
  border-radius: 6px;
}
.rx-nav__icon svg { width: 17px; height: 17px; }
.rx-palette__item .rx-nav__icon svg { width: 13px; height: 13px; }
.rx-nav__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-nav__lock { width: 14px; height: 14px; color: #8a857f; flex: 0 0 14px; }
.rx-sidebar__foot { padding: 10px 20px 14px; border-top: 1px solid var(--rx-hairline); font-size: 12px; color: #706c67; }
.rx-sidebar__foot a { color: var(--rx-ink-muted) !important; }

/* Ícones com cor de sticker: tom em --tone; .rx-nav__icon usa fundo suave, .rx-solid usa fundo cheio */
.rx-tone-blue { --tone: #0075de; }
.rx-tone-sky { --tone: #3d8fd6; }
.rx-tone-teal { --tone: #2a9d99; }
.rx-tone-green { --tone: #1a8a35; }
.rx-tone-orange { --tone: #dd5b00; }
.rx-tone-pink { --tone: #d23fa0; }
.rx-tone-purple { --tone: #8a55cc; }
.rx-tone-indigo { --tone: #213183; }
.rx-tone-brown { --tone: #8a5a2b; }
.rx-tone-ink { --tone: #55534e; }
.rx-nav__icon { color: #8a857f; }
.rx-nav__item:hover .rx-nav__icon { color: var(--rx-ink-muted); }
.rx-nav__item.is-active .rx-nav__icon { color: var(--rx-primary); }
.rx-palette__item .rx-nav__icon { background: color-mix(in srgb, var(--tone, #55534e) 13%, #fff); color: var(--tone, #55534e); }
.rx-solid { background: var(--tone, #55534e) !important; color: #fff !important; }

/* Topbar */
.rx-topbar {
  position: sticky; top: 0; z-index: 8000;
  height: var(--rx-topbar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px;
  background: rgba(246, 245, 244, 0.86);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rx-hairline);
  color: var(--rx-ink-muted); font-size: 14px; line-height: 1.43;
}
.rx-topbar__menu {
  display: none; width: 36px; height: 36px; margin-left: -8px;
  border: 0; border-radius: var(--rx-r-md); background: transparent; color: var(--rx-ink-secondary); cursor: pointer;
  align-items: center; justify-content: center;
}
.rx-topbar__menu:hover { background: var(--rx-hover); }
.rx-topbar__menu svg { width: 20px; height: 20px; }
.rx-crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; overflow: hidden; }
.rx-crumbs a, .rx-crumbs span { white-space: nowrap; }
.rx-crumbs a { color: var(--rx-ink-muted) !important; text-decoration: none !important; padding: 3px 6px; border-radius: var(--rx-r-sm); }
.rx-crumbs a:hover { background: var(--rx-hover); color: var(--rx-ink) !important; }
.rx-crumbs__sep { color: var(--rx-ink-ghost); }
.rx-crumbs__current { color: var(--rx-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; padding: 3px 6px; }
.rx-topbar__actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.rx-topbar__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--rx-r-md); background: transparent;
  color: var(--rx-ink-muted) !important; font: 500 14px/1 var(--rx-font); cursor: pointer; text-decoration: none !important;
}
.rx-topbar__btn:hover { background: var(--rx-hover); color: var(--rx-ink) !important; }
.rx-topbar__btn svg { width: 16px; height: 16px; }
.rx-topbar__actions .rx-search-trigger { display: none; }
.rx-chip-private {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border-radius: var(--rx-r-full); background: var(--rx-canvas-sunken); color: var(--rx-ink-muted);
  font: 600 12px/1 var(--rx-font);
}
.rx-chip-private svg { width: 12px; height: 12px; }

.rx-scrim { display: none; }

/* Paleta de busca (Ctrl+K) */
.rx-palette {
  position: fixed; inset: 0; z-index: 9500; display: none;
  background: rgba(15, 15, 15, 0.32); padding: 12vh 16px 16px;
}
.rx-palette.is-open { display: block; }
.rx-palette__box {
  max-width: 620px; margin: 0 auto; background: #fff; border-radius: var(--rx-r-lg);
  box-shadow: var(--rx-shadow-2), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden;
}
.rx-palette__input {
  width: 100%; border: 0; border-bottom: 1px solid var(--rx-hairline); outline: none;
  padding: 16px 18px; font: 400 17px/1.4 var(--rx-font); color: var(--rx-ink); background: #fff;
}
.rx-palette__list { max-height: 56vh; overflow-y: auto; padding: 6px; margin: 0; list-style: none; }
.rx-palette__group { padding: 10px 12px 4px; font: 600 12px/1.3 var(--rx-font); color: var(--rx-ink-faint); }
.rx-palette__item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--rx-r-sm);
  color: var(--rx-ink-secondary) !important; text-decoration: none !important; font-size: 14px;
}
.rx-palette__item .rx-nav__icon { width: 20px; height: 20px; flex-basis: 20px; }
.rx-palette__item small { margin-left: auto; color: var(--rx-ink-faint); font-size: 12px; white-space: nowrap; }
.rx-palette__item.is-sel { background: var(--rx-hover-strong); color: var(--rx-ink) !important; }
.rx-palette__empty { padding: 18px; color: var(--rx-ink-faint); font-size: 14px; }
.rx-palette__foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--rx-hairline); font: 400 12px/1.4 var(--rx-font); color: var(--rx-ink-faint); background: var(--rx-canvas-soft); }

/* Modo página pública (link direto sem login): sem navegação interna */
html.rx-public body { padding-left: 0 !important; }
html.rx-public .rx-sidebar, html.rx-public .rx-topbar__menu, html.rx-public .rx-topbar__actions .rx-search-trigger { display: none !important; }

@media (max-width: 1023px) {
  html.rx-shell body { padding-left: 0 !important; }
  .rx-sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: none; width: min(300px, 86vw); }
  html.rx-nav-open .rx-sidebar { transform: none; box-shadow: var(--rx-shadow-2); }
  html.rx-nav-open .rx-scrim { display: block; position: fixed; inset: 0; z-index: 8900; background: rgba(15,15,15,.28); }
  .rx-topbar__menu { display: inline-flex; }
  .rx-topbar__actions .rx-search-trigger { display: inline-flex; }
  .rx-topbar { padding: 0 14px; }
  .rx-topbar__btn .rx-label-wide { display: none; }
}
@media (max-width: 600px) {
  .rx-crumbs > :not(:last-child) { display: none; }
  .rx-chip-private .rx-label-wide { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-sidebar { transition: none; }
  .rx-native * { animation: none !important; transition: none !important; }
}
@media print {
  .rx-sidebar, .rx-topbar, .rx-palette { display: none !important; }
  html.rx-shell body { padding-left: 0 !important; }
}

/* ───────────── Layout de página nativa ───────────── */
.rx-main { min-height: calc(100vh - var(--rx-topbar-h)); }
.rx-page { max-width: var(--rx-content-max); margin: 0 auto; padding: 40px 32px 64px; }
.rx-page--reading { max-width: var(--rx-reading-max); }
.rx-page--wide { max-width: 1320px; }
@media (max-width: 600px) { .rx-page { padding: 24px 16px 48px; } }

.rx-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.rx-page-head__main { min-width: 0; max-width: 760px; }
.rx-page-head__icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--tone, #55534e); color: #fff; margin-bottom: 14px; }
.rx-page-head__icon svg { width: 24px; height: 24px; }
.rx-eyebrow { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1.33 var(--rx-font); letter-spacing: 0.125px; color: var(--rx-ink-muted); margin-bottom: 8px; }
.rx-h1 { font: 700 40px/1.1 var(--rx-font); letter-spacing: -1px; color: var(--rx-ink); }
.rx-h2 { font: 700 26px/1.23 var(--rx-font); letter-spacing: -0.625px; color: var(--rx-ink); }
.rx-h3 { font: 700 22px/1.27 var(--rx-font); letter-spacing: -0.25px; color: var(--rx-ink); }
.rx-title { font: 600 20px/1.4 var(--rx-font); letter-spacing: -0.125px; color: var(--rx-ink); }
.rx-lead { margin-top: 14px; font-size: 17px; line-height: 1.55; color: var(--rx-ink-muted); text-wrap: pretty; }
.rx-muted { color: var(--rx-ink-muted); }
.rx-faint { color: var(--rx-ink-faint); }
.rx-caption { font-size: 14px; line-height: 1.43; color: var(--rx-ink-muted); }
@media (max-width: 600px) { .rx-h1 { font-size: 30px; letter-spacing: -0.6px; } .rx-h2 { font-size: 22px; } .rx-lead { font-size: 16px; } }

.rx-section { margin-top: 40px; }
.rx-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.rx-section__title { font: 700 20px/1.3 var(--rx-font); letter-spacing: -0.3px; color: var(--rx-ink); }
.rx-section__meta { font-size: 14px; color: var(--rx-ink-faint); }

/* Hero noturno (uma única faixa por página, como no DESIGN.md) */
.rx-night {
  position: relative; overflow: hidden; border-radius: var(--rx-r-xl);
  background: var(--rx-secondary); color: #fff; padding: 40px;
}
.rx-night::before, .rx-night::after { content: ""; position: absolute; border-radius: 50%; filter: blur(40px); opacity: .85; pointer-events: none; }
.rx-night::before { width: 360px; height: 300px; right: -80px; top: -120px; background: radial-gradient(closest-side, rgba(98,174,240,.55), transparent); }
.rx-night::after { width: 420px; height: 300px; right: 12%; bottom: -200px; background: radial-gradient(closest-side, rgba(214,182,246,.45), transparent); }
.rx-night .rx-h1, .rx-night h1 { color: #fff; font-size: 48px; letter-spacing: -1.6px; line-height: 1.05; margin-top: 2px; }
.rx-night .rx-lead { margin-top: 14px; text-wrap: balance; }
.rx-night .rx-lead { color: rgba(255,255,255,.78); max-width: 620px; }
.rx-night .rx-eyebrow { color: rgba(255,255,255,.86); }
.rx-night__stars { position: absolute; inset: 0; pointer-events: none; }
.rx-night__stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .55; }
.rx-night__content { position: relative; z-index: 1; }
@media (max-width: 600px) { .rx-night { padding: 28px 22px; } .rx-night .rx-h1, .rx-night h1 { font-size: 32px; letter-spacing: -0.8px; } }

/* Botões */
.rx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 16px; border-radius: var(--rx-r-md);
  font: 500 15px/1.4 var(--rx-font); text-decoration: none !important; cursor: pointer;
  border: 1px solid transparent; transition: transform .08s ease, background .15s ease;
}
.rx-btn:active { transform: scale(.97); }
.rx-btn svg { width: 16px; height: 16px; }
.rx-btn--primary { background: var(--rx-primary); color: #fff !important; }
.rx-btn--primary:hover { background: var(--rx-primary-active); }
.rx-btn--secondary { background: #fff; color: var(--rx-ink) !important; box-shadow: var(--rx-shadow-1); border-color: var(--rx-hairline); }
.rx-btn--secondary:hover { background: var(--rx-canvas-soft); }
.rx-btn--utility { border-radius: var(--rx-r-md); min-height: 34px; padding: 4px 14px; background: #fff; color: var(--rx-ink) !important; border-color: var(--rx-hairline); font-size: 14px; }
.rx-btn--utility:hover { background: var(--rx-canvas-soft); }
.rx-btn--ghost { background: transparent; color: var(--rx-ink-muted) !important; border-radius: var(--rx-r-md); min-height: 34px; padding: 4px 10px; font-size: 14px; }
.rx-btn--ghost:hover { background: var(--rx-hover); color: var(--rx-ink) !important; }
.rx-night .rx-btn { border-radius: var(--rx-r-full); min-height: 42px; padding: 8px 20px; }
.rx-btn--on-night { background: #fff; color: var(--rx-ink) !important; box-shadow: var(--rx-shadow-2); }
.rx-btn--night-ghost { background: rgba(255,255,255,.08); color: #fff !important; border-color: rgba(255,255,255,.28); }
.rx-btn--night-ghost:hover { background: rgba(255,255,255,.16); }
.rx-btn--night-ghost .rx-kbd { background: transparent; color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.3); }

/* Cartões */
.rx-card {
  background: var(--rx-surface); border: 1px solid var(--rx-hairline); border-radius: var(--rx-r-lg);
  padding: 24px; color: var(--rx-ink);
}
.rx-card--elevated { box-shadow: var(--rx-shadow-1); }
.rx-card--soft { background: var(--rx-canvas-soft); }
.rx-card--link { display: block; color: inherit !important; text-decoration: none !important; transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease; }
.rx-card--link:hover { box-shadow: var(--rx-shadow-2); border-color: var(--rx-hairline-strong); transform: translateY(-1px); }
.rx-card__title { font: 600 17px/1.35 var(--rx-font); letter-spacing: -0.2px; color: var(--rx-ink); }
.rx-card__text { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--rx-ink-muted); }
.rx-card__meta { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--rx-ink-faint); }

.rx-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rx-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .rx-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rx-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .rx-grid--2, .rx-grid--3, .rx-grid--4 { grid-template-columns: 1fr; } }

/* Cartão de módulo (home) */
.rx-module {
  display: flex; flex-direction: column; gap: 0; overflow: hidden; padding: 0;
}
.rx-module__band { height: 64px; position: relative; }
.rx-module__icon {
  position: absolute; left: 20px; bottom: -18px; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; color: #fff; background: var(--tone, #55534e); box-shadow: 0 0 0 4px #fff;
}
.rx-module__icon svg { width: 20px; height: 20px; }
.rx-module__body { padding: 28px 20px 18px; display: flex; flex-direction: column; flex: 1; }
.rx-module__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--rx-ink-faint); }
.rx-module__latest { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rx-hairline); font-size: 13.5px; color: var(--rx-ink-secondary); line-height: 1.45; }
.rx-module__latest b { display: block; font-size: 12px; font-weight: 600; color: var(--rx-ink-faint); margin-bottom: 2px; }

/* Faixas de cor das bandas (sticker) */
.rx-band-blue { background: linear-gradient(135deg, #dcebfb, #c5dff8); }
.rx-band-sky { background: linear-gradient(135deg, #e4f1fd, #cfe5fa); }
.rx-band-teal { background: linear-gradient(135deg, #dcf1f0, #c3e6e4); }
.rx-band-green { background: linear-gradient(135deg, #e0f4e4, #c9ebd0); }
.rx-band-orange { background: linear-gradient(135deg, #fdebdc, #fad7bd); }
.rx-band-pink { background: linear-gradient(135deg, #ffe5f5, #ffd0ee); }
.rx-band-purple { background: linear-gradient(135deg, #f1e7fc, #e5d3f8); }
.rx-band-indigo { background: linear-gradient(135deg, #e1e4f5, #c9cfee); }
.rx-band-brown { background: linear-gradient(135deg, #f3ebe2, #e6d6c4); }
.rx-band-ink { background: linear-gradient(135deg, #ecebe9, #dddbd8); }

/* Estatísticas */
.rx-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rx-stat { background: #fff; border: 1px solid var(--rx-hairline); border-radius: var(--rx-r-lg); padding: 16px 18px; }
.rx-stat__label { font: 500 13px/1.35 var(--rx-font); color: var(--rx-ink-muted); }
.rx-stat__value { margin-top: 6px; font: 700 26px/1.15 var(--rx-font); letter-spacing: -0.6px; color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-stat__hint { margin-top: 4px; font-size: 12.5px; color: var(--rx-ink-faint); }
.rx-stat--accent { border-color: #bcd8f5; background: linear-gradient(180deg, #f3f8fe, #fff); }
.rx-stat--accent .rx-stat__label { color: var(--rx-primary-active); }

/* Badges, tags, pontos */
.rx-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--rx-r-full); background: #fff; color: var(--rx-primary); border: 1px solid #cfe3f8; font: 600 12px/1.33 var(--rx-font); letter-spacing: .125px; white-space: nowrap; }
.rx-badge--neutral { color: var(--rx-ink-muted); border-color: var(--rx-hairline); background: var(--rx-canvas-soft); }
.rx-badge--success { color: var(--rx-success); border-color: #c4e6cc; background: var(--rx-success-tint); }
.rx-badge--warning { color: var(--rx-warning); border-color: #f5d3b8; background: var(--rx-warning-tint); }
.rx-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--rx-r-xs); background: var(--rx-canvas-sunken); color: var(--rx-ink-secondary); font-size: 12.5px; line-height: 1.5; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }

/* Lista de documentos (estilo Notion database list) */
.rx-list { background: #fff; border: 1px solid var(--rx-hairline); border-radius: var(--rx-r-lg); overflow: hidden; }
.rx-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 56px;
  border-top: 1px solid var(--rx-hairline); color: var(--rx-ink) !important; text-decoration: none !important;
  transition: background .12s ease;
}
.rx-row:first-child { border-top: 0; }
a.rx-row:hover { background: #fafaf9; }
.rx-row__date { flex: 0 0 52px; text-align: center; line-height: 1.1; }
.rx-row__day { display: block; font: 700 20px/1.1 var(--rx-font); letter-spacing: -0.4px; color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-row__dow { display: block; font-size: 12px; color: var(--rx-ink-faint); margin-top: 2px; }
.rx-row__icon { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, #55534e) 13%, #fff); color: var(--tone, #55534e); }
.rx-row__icon svg { width: 16px; height: 16px; }
.rx-row__main { flex: 1; min-width: 0; }
.rx-row__title { font: 600 15px/1.4 var(--rx-font); color: var(--rx-ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rx-row__sub { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 13px; color: var(--rx-ink-faint); }
.rx-row__stats { display: flex; gap: 18px; flex: 0 0 auto; }
.rx-row__stat { text-align: right; min-width: 44px; }
.rx-row__stat b { display: block; font: 700 16px/1.2 var(--rx-font); color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-row__stat span { font-size: 11.5px; color: var(--rx-ink-faint); }
.rx-row__chev { color: var(--rx-ink-ghost); flex: 0 0 auto; }
.rx-row__chev svg { width: 16px; height: 16px; display: block; }
@media (max-width: 680px) {
  .rx-row { flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; padding: 12px 14px; }
  .rx-row__main { flex-basis: calc(100% - 66px); }
  .rx-row__stats { width: 100%; padding-left: 66px; gap: 14px; }
  .rx-row__stat { text-align: left; }
  .rx-row__chev { display: none; }
}

/* Agrupamento do arquivo (mês/semana) */
.rx-archive-month { margin-top: 36px; }
.rx-archive-month:first-child { margin-top: 8px; }
.rx-archive-month__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.rx-archive-month__title { font: 600 17px/1.3 var(--rx-font); letter-spacing: -0.2px; color: var(--rx-ink); }
.rx-archive-week { margin: 18px 0 8px; font: 600 12px/1.33 var(--rx-font); color: var(--rx-ink-faint); letter-spacing: .125px; text-transform: uppercase; }

/* Barra de ferramentas e campos */
.rx-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.rx-input, .rx-select {
  height: 36px; padding: 6px 10px; border: 1px solid #dddddd; border-radius: var(--rx-r-xs);
  background: #fff; color: var(--rx-ink); font: 400 15px/1.33 var(--rx-font); outline: none;
}
.rx-input:focus, .rx-select:focus { border-color: var(--rx-primary); box-shadow: var(--rx-shadow-1), 0 0 0 3px rgba(0,117,222,.12); }
.rx-toolbar .rx-input--search { flex: 1 1 280px; max-width: 440px; }
.rx-input--search { padding-left: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a39e98' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px 50% / 16px; min-width: min(320px, 100%); }
.rx-field { display: flex; flex-direction: column; gap: 4px; }
.rx-field label { font: 500 13px/1.3 var(--rx-font); color: var(--rx-ink-muted); }
@media (max-width: 600px) { .rx-input, .rx-select { font-size: 16px; } .rx-input--search { width: 100%; } }

.rx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--rx-r-full);
  border: 1px solid var(--rx-hairline); background: #fff; color: var(--rx-ink-secondary); font: 500 13.5px/1 var(--rx-font); cursor: pointer;
}
.rx-chip:hover { background: var(--rx-canvas-soft); }
.rx-chip.is-active { background: var(--rx-ink-secondary); border-color: var(--rx-ink-secondary); color: #fff; }

/* Tabelas */
.rx-table-wrap { overflow-x: auto; border: 1px solid var(--rx-hairline); border-radius: var(--rx-r-lg); background: #fff; }
.rx-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.4; }
.rx-table th { background: var(--rx-canvas-soft); text-align: left; font: 600 12px/1.33 var(--rx-font); letter-spacing: .125px; color: var(--rx-ink-muted); padding: 10px 14px; border-bottom: 1px solid var(--rx-hairline); white-space: nowrap; position: sticky; top: 0; }
.rx-table td { padding: 11px 14px; border-top: 1px solid var(--rx-hairline); color: var(--rx-ink-secondary); vertical-align: top; }
.rx-table tr:first-child td { border-top: 0; }
.rx-table tbody tr:hover td { background: #fafaf9; }
.rx-table td.num, .rx-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Callouts */
.rx-callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--rx-r-md); background: var(--rx-canvas-soft); color: var(--rx-ink-secondary); font-size: 15px; line-height: 1.55; }
.rx-callout__icon { flex: 0 0 auto; font-size: 18px; line-height: 1.3; }
.rx-callout--info { background: #eef5fd; }
.rx-callout--warning { background: var(--rx-warning-tint); color: #5c2c00; }
.rx-callout--danger { background: var(--rx-danger-tint); color: #6b1d17; }

/* Estado vazio e carregamento */
.rx-empty { background: var(--rx-canvas-soft); border: 1px dashed var(--rx-hairline-strong); border-radius: var(--rx-r-xl); padding: 32px; text-align: center; color: var(--rx-ink-muted); }
.rx-empty b { display: block; color: var(--rx-ink); font-size: 16px; margin-bottom: 4px; }
.rx-skeleton { border-radius: var(--rx-r-lg); background: linear-gradient(90deg, #f0efed 0%, #f7f6f5 50%, #f0efed 100%); background-size: 200% 100%; animation: rx-shimmer 1.4s infinite linear; height: 64px; }
@keyframes rx-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Abas (subnavegação de módulo) */
.rx-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--rx-hairline); margin-bottom: 24px; scrollbar-width: none; }
.rx-tabs::-webkit-scrollbar { display: none; }
.rx-tab:first-child { padding-left: 0; }
.rx-tab { padding: 10px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--rx-ink-muted) !important; text-decoration: none !important; font: 500 14px/1.3 var(--rx-font); white-space: nowrap; }
.rx-tab:hover { color: var(--rx-ink) !important; }
.rx-tab.is-active { color: var(--rx-ink) !important; border-bottom-color: var(--rx-primary); font-weight: 600; }

/* Rodapé */
.rx-footer { margin-top: 56px; padding: 24px 0 0; border-top: 1px solid var(--rx-hairline); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--rx-ink-faint); }
.rx-footer a { color: var(--rx-ink-muted); }

/* Utilitários */
.rx-hide { display: none !important; }
.rx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.rx-stack > * + * { margin-top: 12px; }
.rx-row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rx-mt-1 { margin-top: 8px; } .rx-mt-2 { margin-top: 16px; } .rx-mt-3 { margin-top: 24px; } .rx-mt-4 { margin-top: 32px; }
.rx-num { font-variant-numeric: tabular-nums; }
.rx-fade-in { animation: rx-fade .28s ease both; }
@keyframes rx-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Arquivo, hubs e home */
.rx-latest .rx-h3 { max-width: 820px; }
.rx-latest__open { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--rx-primary); font-weight: 500; font-size: 14px; }
.rx-latest__open svg { width: 15px; height: 15px; }
.rx-hub-item { display: flex; flex-direction: column; padding: 18px 20px; }
.rx-hub-item .rx-card__title { font-size: 16px; }
.rx-hub-item .rx-card__meta { margin-top: auto; padding-top: 12px; }
.rx-hub-item__url { font-family: var(--rx-mono); font-size: 11.5px; color: var(--rx-ink-ghost); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rx-home-hero { margin-bottom: 8px; padding-bottom: 44px; }
.rx-home-hero .rx-h1 { font-size: 56px; letter-spacing: -1.9px; }
.rx-btn .rx-kbd { margin-left: 4px; }
.rx-btn--on-night:hover { background: #f6f5f4; }
@media (max-width: 600px) { .rx-home-hero .rx-h1 { font-size: 38px; letter-spacing: -1px; } .rx-btn .rx-kbd { display: none; } }

/* Destaque do mais recente (faixa compacta) */
.rx-pinned { display: flex; align-items: center; gap: 14px; padding: 14px 18px; flex-wrap: wrap; }
.rx-pinned__main { flex: 1; min-width: 240px; }
.rx-pinned__title { font: 600 16px/1.4 var(--rx-font); color: var(--rx-ink); }
.rx-pinned__meta { margin-top: 2px; font-size: 13px; color: var(--rx-ink-faint); }

/* Ajustes de leitura e mobile */
.rx-h1 { text-wrap: balance; }
.rx-page-head__main .rx-h1 { overflow-wrap: break-word; }
@media (max-width: 600px) {
  .rx-toolbar { gap: 8px; }
  .rx-toolbar .rx-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .rx-toolbar .rx-chips::-webkit-scrollbar { display: none; }
  .rx-chip { flex: 0 0 auto; }
  .rx-tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .rx-stats > :first-child:nth-last-child(2n+1) { grid-column: 1 / -1; }
  .rx-night__stars { display: none; }
  .rx-night .rx-row-flex > .rx-btn { flex: 1 1 100%; }
  .rx-stat__value { font-size: 22px; }
  .rx-page-head { margin-bottom: 20px; }
}
.rx-public-brand { display: inline-flex; align-items: center; gap: 8px; }
.rx-public-brand .rx-brand__mark { width: 22px; height: 22px; flex-basis: 22px; font-size: 12px; border-radius: 6px; }
