/* Interface do aplicativo. O documento e seu PDF mantêm seus próprios estilos. */
@media screen {
  :root { --bg: #f3f5f8; --mse-bg: #f3f5f8; --line: #e0e6ee; --muted: #64748b; --radius: 12px; --ui-balloon-radius: 10px; --ui-control-radius: 8px; }
  .mse-tooltip { position: fixed; z-index: 10000; pointer-events: none; max-width: min(280px,calc(100vw - 16px)); padding: 9px 12px; border: 1px solid #ffffff20; border-radius: var(--ui-balloon-radius); background: #192b45; color: #fff; box-shadow: 0 6px 18px #142b4926; font: 500 12px/1.5 'IBM Plex Sans',sans-serif; overflow-wrap: anywhere; }
  .mse-tooltip[hidden] { display: none; }
  .ed-command-menu, .document-bottom .ed-card-menu, .notice, .ed-error, .ed-discard { border-radius: var(--ui-balloon-radius); }
  .ed-dialog { border-radius: 14px; }
  .ed-dialog .ed-head, .ed-dialog .ed-body, .ed-dialog .ed-foot { padding-left: 24px; padding-right: 24px; }
  .ed-dialog .ed-error, .ed-dialog .ed-discard { margin-left: 24px; margin-right: 24px; }
  .document-bottom { align-items: center; }
  .document-bottom .ed-card-menu button { min-height: 40px; }
  .library-layout { grid-template-columns: clamp(240px,22vw,320px) minmax(0,1fr); align-items: start; transition: grid-template-columns .22s ease; }
  .library-layout.sidebar-collapsed { grid-template-columns: 76px minmax(0,1fr); }
  .sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
  .sidebar-toggle { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid #dce3ed; border-radius: var(--ui-control-radius); background: #fff; color: #34465e; font: 22px/1 'IBM Plex Sans',sans-serif; cursor: pointer; }
  .sidebar-toggle:hover { background: #edf3ff; border-color: #bdcde5; }
  .sidebar-collapsed .sidebar-heading { justify-content: center; }
  .sidebar-collapsed .sidebar-heading > span, .sidebar-collapsed .portfolio-link > span:nth-child(2), .sidebar-collapsed .portfolio-link > b, .sidebar-collapsed .work-search, .sidebar-collapsed .sidebar-label, .sidebar-collapsed .sidebar-note, .sidebar-collapsed .work-menu-item > span:nth-child(2), .sidebar-collapsed .work-menu-item > b { display: none; }
  .sidebar-collapsed .work-sidebar { padding: 10px; }
  .sidebar-collapsed .portfolio-link, .sidebar-collapsed .work-menu-item { justify-content: center; padding: 8px 0; }
  .dk-outline-head { grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px; }
  .dk-outline-head small { grid-column: 1/-1; }
  #detail-view.dk-editing { grid-template-columns: minmax(260px,300px) minmax(0,1fr); transition: grid-template-columns .22s ease; }
  #detail-view.dk-editing.dk-outline-wide { grid-template-columns: minmax(320px,390px) minmax(0,1fr); }
  .dk-outline { border-radius: var(--radius); }
  #detail-view.dk-editing > .dk-outline { margin: 0; min-width: 0; }
  #detail-view.dk-editing > :is([data-deck-root], [data-monthly-root]) { align-self: start; width: 100%; margin: 0; }
  #detail-view.dk-editing .mm .page { max-width: none; width: 100%; margin: 0; }
  #detail-view.dk-editing .wd-frame:hover { transform: none; }
  body { background: var(--bg); }
  .topbar { margin: 0; border-radius: 0; min-height: 64px; box-shadow: 0 1px 8px #142b4914; }
  .topbar:before { opacity: .055; }
  .brand .brand-reports { font-family: 'IBM Plex Sans', sans-serif; font-size: 21px; font-weight: 500; }
  .portal-back { min-height: 36px; display: inline-flex; align-items: center; border-radius: 8px; }
  button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
  button:focus-visible, a:focus-visible { outline: 3px solid #2563eb70; outline-offset: 3px; }
  button:disabled { cursor: not-allowed; }
  .library-toolbar.toolbar { padding: 8px 0 20px; gap: 16px; }
  .library-toolbar h2 { font-size: 24px; letter-spacing: -.025em; }
  .library-toolbar .filters { gap: 8px; flex-wrap: wrap; }
  .library-toolbar .filters button { min-height: 40px; border-radius: 8px; padding: 9px 14px; font-size: 12px; }
  .work-sidebar { align-self: stretch; height: auto; min-height: 0; max-height: calc(100dvh - 36px); border-radius: 12px; padding: 14px; box-shadow: 0 3px 14px #142b4905; }
  .library-main { min-width: 0; }
  .portfolio-link { min-height: 42px; border-radius: 8px; }
  .work-search { min-height: 42px; border-radius: 8px; background: #f7f9fc; }
  .work-search input { font-size: 12px; min-width: 0; }
  .work-search:focus-within { outline: 3px solid #2563eb22; border-color: #2563eb; }
  .work-menu-item { min-height: 56px; padding: 10px; }
  .work-menu-item strong { font-size: 12px; }
  .work-menu-item small { font-size: 10px; color: #63738b; }
  .work-menu-item[aria-current="page"] { background: #edf3ff; border-color: #d6e3ff; box-shadow: inset 3px 0 #2563eb; }
  .sidebar-label { font-size: 10px; letter-spacing: .08em; }
  .library-hero { border-radius: 12px; padding: 24px 28px; }
  .library-metrics { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin: 16px 0 24px; }
  .library-metric { border-radius: 10px; padding: 15px; }
  .library-metric small { font-size: 11px; color: #627187; }
  .work-grid, .document-grid { gap: 16px; align-items: stretch; }
  .work-card, .document-card { min-width: 0; height: 100%; }
  .work-card, .document-card { border-radius: 12px; box-shadow: 0 2px 8px #142b4905; transition: border-color .16s, box-shadow .16s; }
  .work-card:hover, .document-card:hover { border-color: #bdcde5; box-shadow: 0 6px 18px #142b4910; transform: none; }
  .work-card-body, .document-body { padding: 18px; }
  .work-card-body h3 { font-size: 16px; line-height: 1.4; }
  .library-work-logo { object-fit: contain; opacity: 0; }
  .has-work-logo > .library-work-logo { opacity: 1; }
  .work-card-visual > .library-work-logo { position: absolute; left: 50%; top: 34px; width: min(140px,calc(100% - 80px)); height: calc(100% - 42px); transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: #fff; }
  .work-card-visual.has-work-logo > svg { visibility: hidden; }
  .work-menu-item > .has-work-logo:first-child { position: relative; background: #fff; }
  .work-menu-item > .has-work-logo > svg { visibility: hidden; }
  .work-menu-item .library-work-logo { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
  @media (max-width: 520px) { .work-card-visual > .library-work-logo { top: 48px; width: calc(100% - 12px); height: calc(100% - 64px); padding: 4px; } }
  .document-body h3 { font-size: 15px; line-height: 1.4; }
  .document-body p { font-size: 11px; line-height: 1.6; color: #627187; }
  .document-bottom button { min-height: 36px; font-size: 12px; }
  .document-bottom .ed-card-more { min-width: 36px; height: 36px; }
  .report-types { grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 10px; }
  .report-type { border-radius: 10px; min-height: 72px; padding: 14px; }
  .report-type strong { font-size: 12px; }
  .report-controls { gap: 12px; margin: 18px 0; }
  .report-controls select { min-height: 38px; border-radius: 8px; padding: 8px 12px; font-size: 12px; }
  .detail-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 14px; padding: 12px 16px; overflow: visible; }
  .detail-head > div:first-child { min-width: 0; display: block; }
  body.report-open .detail-head h2 { font-size: 21px; line-height: 1.3; margin-top: 12px; overflow-wrap: anywhere; }
  body.report-open .detail-head p { font: 12px/1.6 'IBM Plex Sans', sans-serif; overflow-wrap: anywhere; }
  .detail-head #back { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: #53657d; padding: 7px 12px; min-height: 34px; font-size: 12px; line-height: 1.4; white-space: nowrap; }
  .detail-head > .status { align-self: start; margin-top: 5px; }
  .detail-head > .detail-identity:first-child { display: flex; align-items: center; gap: 16px; }
  .detail-identity #back { flex: none; }
  .detail-work-logo { flex: none; width: 56px; height: 36px; object-fit: contain; object-position: center; }
  .detail-title-block { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px 12px; min-width: 0; flex: 1; }
  .detail-type { grid-column: 2; grid-row: 1; color: #61728a; font: 500 10px/1.5 'IBM Plex Sans',sans-serif; }
  body.report-open .detail-head .detail-title-block h2 { grid-column: 1; grid-row: 1; margin: 0; font: 600 18px/1.3 'IBM Plex Sans',sans-serif; letter-spacing: -.02em; }
  body.report-open .detail-head .detail-work { grid-column: 1; grid-row: 2; font-size: 11px; line-height: 1.4; color: #53657d; }
  .detail-meta { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
  .detail-meta > span { padding: 0; color: #61728a; font-size: 10px; }
  .detail-meta strong { color: #34465e; font-weight: 500; margin-left: 4px; }
  .detail-head > .ed-presence { grid-column: 2; grid-row: 3; justify-content: flex-end; }
  .detail-head > .ed-save-status { grid-column: 1; grid-row: 3; min-width: 0; }
  .ed-floating-actions { position: fixed; bottom: max(16px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 4px; width: max-content; max-width: calc(100vw - 16px); padding: 6px; background: #fff; border: 1px solid #dce3ed; border-radius: 12px; box-shadow: 0 6px 24px #142b4924; }
  .ed-quick-action { display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: #34465e; cursor: pointer; }
  .ed-quick-action svg { width: 18px; height: 18px; }
  .ed-quick-action:hover, .ed-quick-action[aria-pressed="true"] { background: #edf3ff; color: #194caf; }
  .ed-quick-action:disabled { opacity: .45; }
  #detail-view { padding-bottom: 84px; }
  .dk-chapter-head { list-style: none; cursor: pointer; }
  .dk-chapter-head::-webkit-details-marker { display: none; }
  .dk-chapter:not([open]) > :not(summary) { display: none; }
  .dk-chapter-head:before { content: '›'; color: #61728a; font-size: 16px; transition: transform .15s; }
  .dk-chapter[open] > .dk-chapter-head:before { transform: rotate(90deg); }
  .dk-chapter-head { grid-template-columns: auto auto minmax(0,1fr) auto; gap: 5px; padding: 8px; }
  .dk-chapter-head .dk-chapter-tools { display: flex; align-items: center; gap: 1px; padding: 0; }
  .dk-chapter-head .dk-chapter-tools .ed-icon { width: 26px; height: 30px; min-width: 26px; min-height: 30px; padding: 3px; }
  .dk-slide { grid-template-columns: minmax(0,1fr) auto; }
  .dk-fixed { grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px; }
  .dk-fixed-edit { display: grid; gap: 1px; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .dk-slide[aria-expanded="true"] { background: #edf3ff; }
  .dk-slide-menu { position: fixed; z-index: 1000; width: 216px; max-width: calc(100vw - 16px); padding: 6px; border: 1px solid #dce3ed; border-radius: var(--ui-balloon-radius); background: #fff; box-shadow: 0 12px 40px #142b4926; }
  .dk-slide-menu button:disabled { opacity: .45; }
  .dk-tools button[aria-label^="Excluir"] { margin-left: auto; color: #a23c48; }
  .dk-slide-go { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 6px; background: transparent; color: #64748b; cursor: pointer; }
  .dk-slide-go:hover, .dk-slide-go:focus-visible { background: #e7efff; color: #2453b5; }
  @media (pointer: coarse) { .dk-slide-go { width: 36px; height: 36px; } }
  .dk-slide-current { box-shadow: inset 3px 0 #2563eb; background: #edf3ff; }
  .ed-command-bar { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid #e3e9f1; }
  .ed-command-bar > button, .ed-command-more > button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 7px 10px; border-radius: 8px; font-size: 11px; font-weight: 600; }
  .ed-command-bar > .back-button { background: #fff; color: #34465e; border: 1px solid #dce3ed; }
  .ed-command-bar > .back-button:hover { background: #f5f8fc; border-color: #afc1d9; }
  .ed-command-bar > .open-button { order: -1; background: #2563eb; border: 1px solid #2563eb; box-shadow: 0 2px 4px #2563eb18; }
  .ed-command-bar > .open-button:hover { background: #1d4ed8; }
  .ed-command-bar button[aria-pressed="true"] { background: #eaf1ff; color: #194caf; border-color: #a9c2fa; }
  .ed-command-bar svg { width: 17px; height: 17px; flex: none; }
  .ed-command-more { position: relative; margin-left: auto; }
  .ed-command-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 100; min-width: 240px; max-width: calc(100vw - 48px); padding: 6px; border: 1px solid #dce3ed; border-radius: 10px; background: #fff; box-shadow: 0 12px 40px #142b4926; }
  .ed-command-menu[hidden] { display: none; }
  .ed-menu-item { display: block; width: 100%; min-height: 40px; border: 0; border-radius: 6px; background: transparent; padding: 10px 12px; text-align: left; color: #34465e; font-size: 12px; cursor: pointer; }
  .ed-menu-item:hover, .ed-menu-item:focus-visible { background: #edf3ff; outline-offset: -2px; }
  .ed-menu-danger { color: #b42332; border-top: 1px solid #edf0f5; border-radius: 0 0 6px 6px; margin-top: 4px; }
  .ed-menu-danger:hover { background: #fff1f2; }
  #detail-view { padding-bottom: 84px; }
  .dk-outline-controls { display: flex; gap: 6px; }
  .dk-outline-controls .ed-btn { flex: 1; min-width: 0; min-height: 30px; padding: 5px 6px; font-size: 10px; }
  @media (max-width: 520px) { .ed-floating-actions { gap: 2px; padding: 4px; } .ed-quick-action { width: 32px; height: 34px; padding: 6px; } .ed-floating-actions .wd-navigation { padding-right: 3px; margin-right: 0; } }
  .ed-dialog .ed-field input, .ed-dialog .ed-field select { min-height: 40px; }
  .ed-dialog .ed-btn { min-height: 40px; }
  .ed-revision-list { display: grid; gap: 8px; margin-bottom: 12px; }
  .ed-revision-row { display: grid; gap: 5px; width: 100%; padding: 12px; border: 1px solid #dce3ed; border-radius: 8px; background: #fff; color: #34465e; text-align: left; cursor: pointer; }
  .ed-revision-row span { font-size: 12px; overflow-wrap: anywhere; }
  .ed-revision-row[aria-pressed="true"] { background: #edf3ff; border-color: #a9c2fa; }
  .ed-revision-consent { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; font-size: 13px; line-height: 1.5; }
  .ed-revision-consent input { flex: none; margin-top: 3px; }
  .ed-revision-preview { min-width: 0; margin-top: 16px; }
  .ed-revision-preview .mm .page { width: 100%; max-width: none; margin: 0; }
  .ed-save-status { flex-wrap: wrap; line-height: 1.5; }
  .ed-save-status button { min-height: 32px; }
  .dk-slide-edit { min-width: 0; border: 0; background: transparent; padding: 4px 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
  .dk-slide-edit:focus-visible { outline-offset: 2px; border-radius: 4px; }
  .dk-tools .ed-icon { width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 5px; }
  .dk-slide { border-radius: 8px; }
  .ed-dialog .ed-head h2 { color: #192b45; letter-spacing: -.02em; }
  .ed-dialog::backdrop { background: #14243b80; backdrop-filter: blur(4px); }
  @media (min-width: 851px) and (max-width: 1150px) {
    .library-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  }
  @media (max-width: 850px) {
    .detail-head > .detail-identity:first-child { align-items: flex-start; gap: 10px; }
    .detail-title-block { grid-template-columns: minmax(0,1fr); }
    .detail-type { display: none; }
    .detail-meta { grid-column: 1; grid-row: 3; }
    .library-layout, .library-layout.sidebar-collapsed { grid-template-columns: minmax(0,1fr); }
    .sidebar-heading { grid-column: 1/-1; margin-bottom: 0; }
    .sidebar-collapsed .sidebar-heading { justify-content: space-between; }
    .sidebar-collapsed .sidebar-heading > span, .sidebar-collapsed .portfolio-link > span:nth-child(2), .sidebar-collapsed .portfolio-link > b { display: initial; }
    .sidebar-collapsed .portfolio-link { justify-content: flex-start; grid-column: 1/-1; padding: 8px; }
    .sidebar-collapsed #work-menu { display: none; }
    .library-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .library-metric:first-child { grid-column: auto; }
    .work-sidebar { padding: 12px; height: auto; }
    .library-toolbar.toolbar { gap: 12px; }
    .report-types { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .report-type:last-child:nth-child(odd) { grid-column: 1/-1; }
    .report-type strong { white-space: normal; }
    .report-type small { display: block; }
  }
  @media (max-width: 1000px) {
    #detail-view.dk-editing, #detail-view.dk-editing.dk-outline-wide { grid-template-columns: minmax(0,1fr); }
    .dk-outline-toggle { display: none; }
  }
  @media (max-width: 520px) {
    .topbar { padding: 10px 12px; gap: 8px; }
    .brand .brand-reports { font-size: 18px; }
    .portal-back { padding: 7px 9px; font-size: 10px; }
    .library-toolbar h2 { font-size: 22px; }
    .library-toolbar .filters { display: flex; }
    .library-toolbar .filters button { width: auto; flex: 1 1 auto; padding: 9px 10px; font-size: 11px; }
    .library-metric { padding: 12px 6px; }
    .library-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .library-metric:first-child { justify-content: center; padding: 12px 6px; }
    .library-metric:first-child > div { display: block; }
    .library-metric small { font-size: 10px; }
    .library-hero { padding: 22px; }
    .work-card-body, .document-body { padding: 14px; }
    .report-type { min-height: 66px; padding: 12px; }
    .report-type strong { font-size: 12px; }
    .report-controls { flex-wrap: wrap; }
    .detail-head { padding: 10px 12px; gap: 8px; }
    .detail-head > .detail-identity:first-child { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px 10px; align-items: center; }
    .detail-identity #back { grid-column: 1/-1; justify-self: start; }
    .detail-title-block { grid-column: 2; }
    .detail-identity:not(:has(.detail-work-logo)) .detail-title-block { grid-column: 1/-1; }
    .detail-work-logo { width: 44px; height: 32px; }
    body.report-open .detail-head .detail-title-block h2 { font-size: 16px; }
    body.report-open .detail-head h2 { font-size: 18px; }
    .ed-command-bar { gap: 6px; padding-top: 8px; }
    .ed-command-bar > button { flex: 1 1 calc(50% - 7px); padding: 9px; }
    .ed-command-more { flex: 1 1 100%; margin: 0; }
    .ed-command-more > button { width: 100%; }
    .ed-command-menu { width: 100%; min-width: 0; }
    .ed-foot { flex-wrap: wrap; }
    .ed-foot .ed-hint { flex: 1 1 100%; }
    .ed-dialog { max-height: calc(100dvh - 24px); }
    .ed-shell { max-height: calc(100dvh - 24px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .work-card, .document-card, .ed-dialog[open], .library-layout, #detail-view.dk-editing { transition: none; animation: none; }
  }
}
@media print { .ed-floating-actions { display: none !important; } }

/* ==========================================================================
   Cabeçalho alinhado ao módulo Produtividade (identidade do Briefing MSE):
   barra navy cheia com fio tricolor e ações em pílula. A marca do Relatórios não muda. Só CSS sobre a marcação existente (ui.ts), para valer sem
   reiniciar o servidor. Fica por último para prevalecer sobre os estilos antigos.
   ========================================================================== */
@media screen {
  .topbar {
    --tb-navy: #002f6c; --tb-cyan: #00c8d7; --tb-teal: #1fb5a0;
    position: relative; isolation: isolate; overflow: visible;
    min-height: 56px; height: 56px; margin: 0; padding: 0 max(20px, calc((100vw - 1360px) / 2)); gap: 14px;
    border: 0; border-radius: 0; background: var(--tb-navy); box-shadow: 0 4px 18px rgba(0, 20, 50, .22);
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
  }
  .topbar:before { display: none; }
  /* fio tricolor na base, que se desenha ao abrir */
  .topbar:after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; pointer-events: none;
    background: linear-gradient(90deg, var(--tb-navy) 0 58%, var(--tb-cyan) 58% 76%, var(--tb-teal) 76% 100%);
    transform: scaleX(0); transform-origin: left; animation: tb-fio 1.1s cubic-bezier(.2, .7, .2, 1) .2s forwards;
  }
  @keyframes tb-fio { to { transform: scaleX(1); } }

  /* A marca do Relatórios (logo "mse" + divisor + "Relatórios") continua a original. */

  /* Ações em pílula */
  .topbar .top-actions { gap: 8px; }
  .topbar .top-actions button, .topbar .portal-back {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, .32); border-radius: 999px; background: none; color: #fff;
    font: 600 11px/1 'Open Sans', 'Segoe UI', sans-serif; letter-spacing: 0; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background .2s, border-color .2s, transform .25s cubic-bezier(.3, 1.5, .5, 1);
  }
  .topbar .top-actions button:hover, .topbar .portal-back:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .65); }
  .topbar .top-actions button:focus-visible, .topbar .portal-back:focus-visible, .topbar .brand:focus-visible { outline: 2px solid var(--tb-cyan); outline-offset: 2px; }
  /* Produtividade em destaque (o atalho continua controlando a visibilidade pelo style inline) */
  .topbar #produtividade-link { border-color: transparent; background: rgba(0, 200, 215, .16); }
  .topbar #produtividade-link:hover { background: rgba(0, 200, 215, .28); border-color: rgba(0, 200, 215, .5); }
  /* Ícones (máscara SVG na cor do texto) */
  .topbar #produtividade-link:before, .topbar #manage-users:before, .topbar #manuals-trigger:before {
    content: ''; width: 13px; height: 13px; flex: none; background: currentColor;
    -webkit-mask: var(--tb-ic) center / contain no-repeat; mask: var(--tb-ic) center / contain no-repeat;
  }
  .topbar #produtividade-link { --tb-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 13.5h12M4 11V8M7.3 11V5M10.6 11V7M13.5 11V3.5'/%3E%3C/svg%3E"); }
  .topbar #manage-users { --tb-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='5.5' r='2.5'/%3E%3Cpath d='M1.5 13.5c.6-2.4 2.3-3.6 4.5-3.6s3.9 1.2 4.5 3.6M11 4.5h4M13 2.5v4'/%3E%3C/svg%3E"); }
  .topbar #manuals-trigger { --tb-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4c-1.6-1.1-3.6-1.3-5.5-1v9.5c1.9-.3 3.9-.1 5.5 1 1.6-1.1 3.6-1.3 5.5-1V3C11.6 2.7 9.6 2.9 8 4zM8 4v9.5'/%3E%3C/svg%3E"); }

  @media (max-width: 768px) {
    .topbar { height: 52px; min-height: 52px; padding: 0 12px; gap: 8px; }
    .topbar .top-actions button, .topbar .portal-back { padding: 6px 10px; font-size: 10.5px; }
  }
  /* Celular: ações só com ícone (o texto vira dica no title/aria) */
  @media (max-width: 600px) {
    .topbar .top-actions { gap: 6px; }
    .topbar .top-actions button, .topbar .portal-back { font-size: 0 !important; gap: 0; padding: 0; width: 34px; min-height: 34px; justify-content: center; }
    .topbar .top-actions button:before, .topbar .portal-back:before { width: 15px; height: 15px; }
    .topbar .portal-back:not(#produtividade-link):before {
      content: ''; flex: none; background: currentColor;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 8H3M7 4L3 8l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 8H3M7 4L3 8l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .topbar:after { animation: none; transform: scaleX(1); }
  }
}

/* ==========================================================================
   Remodelagem 12/2026 — linguagem do módulo Produtividade (Briefing MSE):
   fundo claro azulado, Open Sans, navy/ciano/teal, painéis brancos com fio
   ciano→teal no topo, botões em pílula, faixa navy com mosaico e fio tricolor,
   entradas suaves. Só a interface: os documentos (slides, mensal, PDF) mantêm
   seus estilos; nada aqui vale para impressão. Tokens próprios (--rm-*) para
   não mexer nas variáveis que os documentos usam.
   ========================================================================== */
@media screen {
  :root {
    --rm-navy: #002f6c; --rm-navy2: #0a3d85; --rm-blue: #2d5fa8; --rm-cyan: #00c8d7; --rm-teal: #1fb5a0; --rm-green: #0d8a74;
    --rm-ink: #17223a; --rm-ink2: #58647a; --rm-muted: #8a94a6; --rm-grid: #e2e7ee; --rm-ground: #f0f3f7; --rm-fundo: #eef2f6;
    --rm-suave: cubic-bezier(.2, .7, .2, 1); --rm-mola: cubic-bezier(.3, 1.5, .5, 1);
    --rm-sombra: 0 1px 2px rgba(0, 30, 70, .05), 0 8px 26px rgba(0, 30, 70, .07);
    --rm-sombra-alta: 0 4px 10px rgba(0, 30, 70, .08), 0 18px 40px rgba(0, 30, 70, .12);
  }
  body { background: var(--rm-fundo); }
  .shell { padding-top: 28px; }

  /* Tipografia da interface (os documentos definem a própria) */
  #list-view, .intro, #login-view, .detail-head, .create-report-panel, .ed-dialog, .ed-command-bar, .ed-floating-actions, footer,
  #list-view :is(input, select, textarea, button), .create-report-panel :is(input, select, textarea, button), .ed-dialog :is(input, select, textarea, button) {
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
  }
  #list-view :is(.eyebrow, .mono-label, .report-meta, .work-code, .work-card-bottom, .work-type-counts, .document-preview small, .document-month, .document-bottom small, .badge, .sidebar-label, .hero-footnote),
  .library-toolbar .muted, .report-controls, .detail-meta, footer { font-family: 'Open Sans', 'Segoe UI', sans-serif; }

  /* Rótulo "kicker": maiúsculas espaçadas com fio ciano */
  #list-view .eyebrow, .intro .eyebrow { display: flex; align-items: center; gap: 10px; color: var(--rm-ink2); font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
  #list-view .eyebrow::before, .intro .eyebrow::before { content: ''; width: 22px; height: 1.5px; background: var(--rm-cyan); transform-origin: left; animation: rm-fio .7s var(--rm-suave) .3s both; }
  @keyframes rm-fio { from { transform: scaleX(0); } }

  /* Título da página */
  .library-toolbar h2, .intro h1 { color: var(--rm-ink); font-weight: 300; letter-spacing: -.03em; }
  .library-toolbar h2 { font-size: clamp(22px, 2vw, 28px); }

  /* Botões: primário navy em pílula, secundário em pílula clara, criação em verde */
  #list-view .open-button, .create-report-panel .open-button, .detail-head .open-button, .ed-command-bar > .open-button {
    border-radius: 999px; border: 0; background: var(--rm-navy); color: #fff; font-weight: 700; padding-inline: 18px;
    box-shadow: 0 4px 14px rgba(0, 47, 108, .22); transition: transform .2s var(--rm-suave), box-shadow .2s, background .2s;
  }
  #list-view .open-button:hover, .create-report-panel .open-button:hover, .detail-head .open-button:hover, .ed-command-bar > .open-button:hover { background: var(--rm-navy2); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 47, 108, .28); }
  #list-view .create-report-trigger { background: var(--rm-green); box-shadow: 0 4px 14px rgba(13, 138, 116, .28); }
  #list-view .create-report-trigger:hover { background: #0b7864; box-shadow: 0 8px 20px rgba(13, 138, 116, .32); }
  #list-view .back-button, .create-report-panel .back-button, .ed-command-bar > .back-button, .detail-head #back {
    border-radius: 999px; border: 1px solid var(--rm-grid); background: #fff; color: var(--rm-navy); font-weight: 600; box-shadow: none;
    transition: border-color .2s, background .2s, transform .25s var(--rm-mola), box-shadow .2s;
  }
  #list-view .back-button:hover, .create-report-panel .back-button:hover, .ed-command-bar > .back-button:hover, .detail-head #back:hover {
    border-color: var(--rm-navy); background: var(--rm-ground); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 30, 70, .1);
  }
  #list-view .create-report-danger, .create-report-panel .create-report-danger { color: #c0392b; }
  #list-view .create-report-danger:hover, .create-report-panel .create-report-danger:hover { border-color: #c0392b; background: #fdecea; }
  .library-toolbar .filters button { border-radius: 999px; }
  #list-view .text-button, #list-view .back-works { color: var(--rm-blue); }

  /* Campos */
  #list-view :is(input, select, textarea), .create-report-panel :is(input, select, textarea), .ed-dialog .ed-field :is(input, select, textarea) {
    border-radius: 10px; border-color: var(--rm-grid); color: var(--rm-ink);
  }
  #list-view :is(input, select, textarea):focus, .create-report-panel :is(input, select, textarea):focus, .ed-dialog .ed-field :is(input, select, textarea):focus {
    outline: 3px solid rgba(0, 200, 215, .22); outline-offset: 1px; border-color: var(--rm-cyan);
  }
  #list-view .work-search { border-radius: 999px; background: var(--rm-ground); border-color: transparent; }
  #list-view .work-search:focus-within { outline: 3px solid rgba(0, 200, 215, .22); border-color: var(--rm-cyan); background: #fff; }

  /* Painéis: branco, raio 14, sombra suave e fio ciano→teal no topo */
  #list-view .work-sidebar, .create-report-panel, #login-view {
    position: relative; border: 1px solid var(--rm-grid); border-radius: 14px; background: #fff; box-shadow: var(--rm-sombra);
  }
  #list-view .work-sidebar::before, .create-report-panel::before {
    content: ''; position: absolute; left: 20px; right: 20px; top: -1px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--rm-cyan), var(--rm-teal)); transform-origin: left; animation: rm-fio .9s var(--rm-suave) .25s both;
  }
  #login-view::before { background: linear-gradient(90deg, var(--rm-cyan), var(--rm-teal)); width: 64px; }

  /* Menu lateral */
  #list-view .sidebar-heading { color: var(--rm-ink); font-weight: 700; }
  #list-view .sidebar-toggle { border-radius: 50%; border-color: var(--rm-grid); color: var(--rm-navy); transition: transform .25s var(--rm-mola), background .2s, border-color .2s; }
  #list-view .sidebar-toggle:hover { background: var(--rm-ground); border-color: var(--rm-navy); transform: scale(1.06); }
  #list-view .portfolio-link { color: var(--rm-ink2); border-radius: 10px; transition: background .2s, color .2s; }
  #list-view .portfolio-link:hover { background: var(--rm-ground); color: var(--rm-navy); }
  #list-view .portfolio-link[aria-current="page"] { background: rgba(0, 200, 215, .1); color: var(--rm-navy); box-shadow: inset 3px 0 var(--rm-cyan); }
  #list-view .portfolio-link b { color: var(--rm-muted); font-weight: 600; }
  #list-view .sidebar-label { color: var(--rm-muted); font-size: 9.5px; font-weight: 700; letter-spacing: .2em; }
  #list-view .work-menu-item { border-radius: 10px; transition: background .2s, border-color .2s, transform .25s var(--rm-suave); }
  #list-view .work-menu-item:hover { background: var(--rm-ground); transform: translateX(2px); }
  #list-view .work-menu-item[aria-current="page"] { background: rgba(0, 200, 215, .1); border-color: transparent; box-shadow: inset 3px 0 var(--rm-cyan); }
  #list-view .work-menu-item strong { color: var(--rm-ink); font-weight: 700; }
  #list-view .work-menu-item small { color: var(--rm-muted); }

  /* Faixa de destaque: navy com mosaico em movimento e fio tricolor que se desenha */
  #list-view .library-hero {
    border: 0; border-radius: 14px; background: linear-gradient(120deg, var(--rm-navy) 0%, var(--rm-navy2) 55%, #0d5a8f 100%);
    box-shadow: 0 10px 30px rgba(0, 47, 108, .25); animation: rm-desce .6s var(--rm-suave) both;
  }
  #list-view .library-hero::before {
    inset: -60%; z-index: -1; background: url('/assets/produtividade/mosaico.png') 0 0 / 340px 170px repeat; opacity: .07;
    mask-image: none; -webkit-mask-image: none; transform: rotate(-8deg); animation: rm-mosaico 90s linear infinite;
  }
  @keyframes rm-mosaico { to { transform: rotate(-8deg) translate(-340px, -170px); } }
  #list-view .library-hero::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: linear-gradient(90deg, var(--rm-navy) 0 58%, var(--rm-cyan) 58% 76%, var(--rm-teal) 76% 100%);
    transform-origin: left; animation: rm-fio 1.1s var(--rm-suave) .2s both;
  }
  #list-view .library-hero .eyebrow { color: rgba(255, 255, 255, .7); }
  #list-view .library-hero h1 { font-family: 'Open Sans', 'Segoe UI', sans-serif; font-weight: 300; letter-spacing: -.03em; }
  #list-view .library-hero h1 :is(strong, b, em, span) { font-family: inherit; }
  #list-view .library-hero p { color: rgba(255, 255, 255, .78); }
  #list-view .library-hero .hero-footnote { color: rgba(255, 255, 255, .55); letter-spacing: .14em; }
  #list-view .hero-blueprint { color: var(--rm-cyan); opacity: .55; }
  @keyframes rm-desce { from { opacity: 0; transform: translateY(-8px); } }

  /* Indicadores */
  #list-view .library-metric {
    position: relative; overflow: hidden; border: 1px solid var(--rm-grid); border-radius: 14px; background: #fff; box-shadow: var(--rm-sombra);
    transition: transform .35s var(--rm-suave), box-shadow .3s, border-color .3s; animation: rm-sobe .55s var(--rm-suave) both;
  }
  #list-view .library-metric:hover { transform: translateY(-3px); box-shadow: var(--rm-sombra-alta); border-color: rgba(0, 200, 215, .45); }
  #list-view .library-metric .metric-icon { border-radius: 50%; background: rgba(0, 200, 215, .12); color: var(--rm-navy); }
  #list-view .library-metric strong { font-family: 'Open Sans', 'Segoe UI', sans-serif; font-weight: 300; font-size: 26px; color: var(--rm-navy); letter-spacing: -.03em; }
  #list-view .library-metric small { color: var(--rm-ink2); font-weight: 600; }
  #list-view .library-metric:first-child { background: linear-gradient(120deg, var(--rm-navy), var(--rm-navy2)); border-color: transparent; }
  #list-view .library-metric:first-child strong, #list-view .library-metric:first-child small { color: #fff; }
  #list-view .library-metric:first-child .metric-icon { background: rgba(255, 255, 255, .14); color: var(--rm-cyan); }

  /* Seções */
  #list-view .collection-heading h2, #list-view .collection-heading h3 { color: var(--rm-ink); font-weight: 300; letter-spacing: -.02em; }

  /* Cartões de obra */
  #list-view .work-card {
    border: 1px solid var(--rm-grid); border-radius: 14px; background: #fff; box-shadow: var(--rm-sombra); overflow: hidden;
    transition: transform .35s var(--rm-suave), box-shadow .35s, border-color .3s; animation: rm-sobe .55s var(--rm-suave) both;
  }
  #list-view .work-card:hover { transform: translateY(-4px); box-shadow: var(--rm-sombra-alta); border-color: rgba(0, 200, 215, .45); }
  #list-view .work-card-visual { background: linear-gradient(135deg, #eaf0f7, var(--rm-ground)); color: #9fb0c6; }
  #list-view .work-card-visual::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--rm-cyan), var(--rm-teal));
    transform: scaleX(0); transform-origin: left; transition: transform .5s var(--rm-suave);
  }
  #list-view .work-card:hover .work-card-visual::after { transform: scaleX(1); }
  #list-view .work-code { border-radius: 999px; background: var(--rm-navy); color: #fff; border: 0; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
  #list-view .work-card-arrow { border-radius: 50%; background: #fff; color: var(--rm-navy); transition: transform .3s var(--rm-mola), background .2s, color .2s; }
  #list-view .work-card:hover .work-card-arrow { transform: translateX(3px); background: var(--rm-cyan); color: #fff; }
  #list-view .work-card-body h3 { color: var(--rm-ink); font-weight: 700; letter-spacing: -.01em; }
  #list-view .work-client { color: var(--rm-muted); }
  #list-view .work-type-counts span { border-radius: 999px; border-color: var(--rm-grid); background: var(--rm-ground); color: var(--rm-ink2); font-size: 10px; }
  #list-view .work-type-counts b { color: var(--rm-navy); }
  #list-view .work-card-bottom { border-color: var(--rm-grid); color: var(--rm-muted); font-size: 10.5px; }

  /* Tipos de relatório: pílulas com contagem, em vez de blocos espremidos */
  #list-view .report-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  #list-view .report-type {
    flex: 0 0 auto; min-height: 0; padding: 7px 8px; gap: 9px; border: 1px solid var(--rm-grid); border-radius: 999px; background: #fff; color: var(--rm-ink2);
    box-shadow: none; transition: border-color .2s, background .2s, transform .25s var(--rm-mola), box-shadow .2s; animation: rm-sobe .45s var(--rm-suave) both;
  }
  #list-view .report-type:last-child:nth-child(odd) { grid-column: auto; }
  #list-view .report-type:hover { border-color: var(--rm-navy); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 30, 70, .1); }
  #list-view .report-type > span:first-child { width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 200, 215, .12); color: var(--rm-navy); }
  #list-view .report-type > span:first-child svg { width: 14px; height: 14px; }
  #list-view .report-type strong { font-size: 12px; font-weight: 700; color: inherit; white-space: nowrap; overflow: visible; text-overflow: clip; }
  #list-view .report-type small { display: none; }
  #list-view .report-type > b { min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--rm-ground); color: var(--rm-navy); font-size: 11px; font-weight: 700; text-align: center; }
  #list-view .report-type[aria-pressed="true"] { background: var(--rm-navy); border-color: var(--rm-navy); color: #fff; box-shadow: 0 6px 16px rgba(0, 47, 108, .25); }
  #list-view .report-type[aria-pressed="true"] > span:first-child { background: rgba(255, 255, 255, .14); color: var(--rm-cyan); }
  #list-view .report-type[aria-pressed="true"] > b { background: var(--rm-cyan); color: var(--rm-navy); }
  #list-view .report-controls { color: var(--rm-ink2); }

  /* Cartões de documento */
  #list-view .document-card {
    border: 1px solid var(--rm-grid); border-radius: 14px; background: #fff; box-shadow: var(--rm-sombra); overflow: hidden;
    transition: transform .35s var(--rm-suave), box-shadow .35s, border-color .3s; animation: rm-sobe .55s var(--rm-suave) both;
  }
  #list-view .document-card:hover { transform: translateY(-4px); box-shadow: var(--rm-sombra-alta); border-color: rgba(0, 200, 215, .45); }
  #list-view .document-preview { position: relative; background: linear-gradient(135deg, #eaf0f7, var(--rm-ground)); border-color: var(--rm-grid); color: var(--rm-navy); }
  #list-view .document-preview small { color: var(--rm-ink2); font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
  #list-view .document-day { font-family: 'Open Sans', 'Segoe UI', sans-serif; font-weight: 300; color: var(--rm-navy); letter-spacing: -.04em; }
  #list-view .document-month { color: var(--rm-ink2); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  #list-view .document-sheet { border-radius: 6px; border-color: var(--rm-grid); color: var(--rm-navy); transition: transform .45s var(--rm-mola); }
  #list-view .document-card:hover .document-sheet { transform: rotate(0deg) translateY(-3px); }
  #list-view .document-body h3 { color: var(--rm-ink); font-weight: 700; }
  #list-view .document-body p { color: var(--rm-ink2); }
  #list-view .document-bottom { border-color: var(--rm-grid); }
  #list-view .document-bottom small { color: var(--rm-muted); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; }
  #list-view .document-bottom button[data-open] { border-radius: 999px; color: var(--rm-navy); font-weight: 700; transition: background .2s, color .2s; }
  #list-view .document-bottom button[data-open]:hover { background: rgba(0, 200, 215, .12); }
  #list-view .document-bottom button[data-open] svg { transition: transform .3s var(--rm-mola); }
  #list-view .document-bottom button[data-open]:hover svg { transform: translateX(3px); }
  #list-view .document-bottom .ed-card-more { border-radius: 50%; border-color: var(--rm-grid); }

  /* Selos de situação */
  .badge.status { border-radius: 999px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; }
  .badge.status-DRAFT { background: #fdf6e7; color: #b7791f; }
  .badge.status-REVIEW { background: #e8f0fb; color: var(--rm-blue); }
  .badge.status-PUBLISHED { background: #e3f6f1; color: var(--rm-green); }
  .badge.status-ARCHIVED { background: var(--rm-ground); color: var(--rm-muted); }

  /* Diálogos e painel de criação */
  .create-report-panel h2, .ed-dialog .ed-head h2 { color: var(--rm-ink); font-weight: 300; font-size: 20px; letter-spacing: -.02em; }
  .ed-dialog { border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 30, 70, .28); }
  .ed-dialog .ed-btn { border-radius: 999px; }
  .ed-dialog::backdrop { background: rgba(0, 30, 70, .45); backdrop-filter: blur(5px); }

  /* Cabeçalho do relatório aberto */
  .detail-head { border-radius: 14px; border-color: var(--rm-grid); box-shadow: var(--rm-sombra); }
  body.report-open .detail-head .detail-title-block h2 { font-family: 'Open Sans', 'Segoe UI', sans-serif; color: var(--rm-ink); font-weight: 700; }
  .ed-floating-actions { border-radius: 999px; box-shadow: var(--rm-sombra-alta); }
  .ed-quick-action { border-radius: 50%; }
  .ed-quick-action:hover, .ed-quick-action[aria-pressed="true"] { background: rgba(0, 200, 215, .12); color: var(--rm-navy); }

  footer { color: var(--rm-muted); border-color: var(--rm-grid); }

  /* Entrada em cascata (sem JS: atraso pela posição) */
  @keyframes rm-sobe { from { opacity: 0; transform: translateY(12px); } }
  #list-view :is(.work-card, .document-card, .library-metric, .report-type):nth-child(2) { animation-delay: .04s; }
  #list-view :is(.work-card, .document-card, .library-metric, .report-type):nth-child(3) { animation-delay: .08s; }
  #list-view :is(.work-card, .document-card, .library-metric, .report-type):nth-child(4) { animation-delay: .12s; }
  #list-view :is(.work-card, .document-card, .library-metric, .report-type):nth-child(5) { animation-delay: .16s; }
  #list-view :is(.work-card, .document-card, .library-metric, .report-type):nth-child(6) { animation-delay: .2s; }
  #list-view :is(.work-card, .document-card, .library-metric, .report-type):nth-child(7) { animation-delay: .24s; }
  #list-view :is(.work-card, .document-card, .library-metric, .report-type):nth-child(n+8) { animation-delay: .28s; }

  /* Restos de fonte monoespaçada e quebras */
  #list-view :is(.work-type-counts span, .work-type-counts b, .work-menu-item small, .portfolio-link b, .document-bottom small, .work-card-bottom span, .report-controls *) { font-family: 'Open Sans', 'Segoe UI', sans-serif; }
  #list-view .work-type-counts span { letter-spacing: 0; }
  #list-view .document-bottom { gap: 4px; flex-wrap: nowrap; }
  #list-view .document-bottom .ed-card-more { flex: none; }
  #list-view .document-bottom small { white-space: nowrap; letter-spacing: .08em; }
  #list-view .document-bottom button[data-open] { white-space: nowrap; padding-inline: 8px; margin-left: auto; }
  #list-view .library-metric small { white-space: normal; line-height: 1.3; }

  @media (max-width: 520px) {
    #list-view .report-type { padding: 6px 7px; }
    #list-view .report-type strong { font-size: 11.5px; }
    #list-view .library-metric strong { font-size: 22px; }
  }
  @media (prefers-reduced-motion: reduce) {
    #list-view *, #list-view *::before, #list-view *::after { animation: none !important; transition: none !important; }
  }
}

/* ==========================================================================
   Remodelagem 12/2026 · camada artística: aurora no fundo, faixa com brilho e
   prédio em traço que se desenha, cartões com luz que segue o mouse (--mx/--my,
   do app-polish.js) e leve inclinação 3D, revelação ao rolar. Tudo some com
   "reduzir movimento". Só tela.
   ========================================================================== */
@property --rm-hx { syntax: '<percentage>'; inherits: false; initial-value: 82%; }
@media screen {
  /* Aurora: manchas de luz ciano/teal/azul que derivam devagar atrás de tudo */
  body { isolation: isolate; }
  body::before {
    content: ''; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
    background:
      radial-gradient(38vmax 28vmax at 12% 18%, rgba(0, 200, 215, .13), transparent 62%),
      radial-gradient(34vmax 30vmax at 88% 12%, rgba(45, 95, 168, .12), transparent 64%),
      radial-gradient(40vmax 30vmax at 70% 92%, rgba(31, 181, 160, .11), transparent 62%),
      radial-gradient(30vmax 26vmax at 18% 86%, rgba(0, 47, 108, .07), transparent 60%);
    animation: rm-aurora 38s ease-in-out infinite alternate;
  }
  body::after {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(0, 47, 108, .09) 1px, transparent 1.2px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%);
  }
  @keyframes rm-aurora {
    0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    50% { transform: translate3d(3vmax, -2vmax, 0) rotate(8deg) scale(1.06); }
    100% { transform: translate3d(-2vmax, 3vmax, 0) rotate(-6deg) scale(1.02); }
  }

  /* Título da página: fio de destaque que nasce sob a palavra */
  .library-toolbar h2 { position: relative; display: inline-block; }
  .library-toolbar h2::after {
    content: ''; position: absolute; left: 0; bottom: -6px; width: 44px; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--rm-cyan), var(--rm-teal)); transform-origin: left; animation: rm-fio .9s var(--rm-suave) .45s both;
  }

  /* Faixa: luz que respira + brilho que varre de tempos em tempos */
  #list-view .library-hero {
    background:
      radial-gradient(520px 260px at var(--rm-hx, 82%) -20%, rgba(0, 200, 215, .32), transparent 65%),
      radial-gradient(420px 240px at 8% 130%, rgba(31, 181, 160, .22), transparent 65%),
      linear-gradient(120deg, var(--rm-navy) 0%, var(--rm-navy2) 55%, #0d5a8f 100%);
    animation: rm-desce .6s var(--rm-suave) both, rm-respira 14s ease-in-out 1s infinite alternate;
  }
  @keyframes rm-respira { to { --rm-hx: 58%; } }
  #list-view .hero-copy { position: relative; }
  #list-view .hero-copy::after {
    content: ''; position: absolute; top: -40px; bottom: -40px; left: -60%; width: 40%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .09), transparent); transform: skewX(-18deg);
    animation: rm-varre 9s ease-in-out 2s infinite;
  }
  @keyframes rm-varre { 0%, 70% { left: -60%; } 100% { left: 160%; } }
  #list-view .library-hero h1 { text-shadow: 0 2px 18px rgba(0, 20, 50, .25); }

  /* Prédio em traço: as linhas se desenham ao abrir e depois o desenho flutua */
  #list-view .hero-blueprint { animation: rm-flutua 7s ease-in-out 1.6s infinite alternate; filter: drop-shadow(0 0 10px rgba(0, 200, 215, .35)); opacity: .8; }
  #list-view .hero-blueprint path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: rm-traca 2.6s var(--rm-suave) .4s forwards; }
  #list-view .hero-blueprint path:nth-child(2) { animation-delay: .9s; }
  #list-view .hero-blueprint path:nth-child(3) { animation-delay: 1.3s; }
  #list-view .hero-blueprint path:nth-child(n+4) { animation-delay: 1.6s; }
  @keyframes rm-traca { to { stroke-dashoffset: 0; } }
  @keyframes rm-flutua { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(-3deg) translateY(-8px); } }

  /* Luz que acompanha o mouse nos cartões (--mx/--my vêm do app-polish.js) */
  #list-view :is(.work-card, .document-card, .library-metric) { --mx: 50%; --my: 50%; }
  #list-view :is(.work-card, .document-card, .library-metric)::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
    background: radial-gradient(240px circle at var(--mx) var(--my), rgba(0, 200, 215, .1), transparent 60%);
  }
  #list-view :is(.work-card, .document-card) { position: relative; }
  #list-view .library-metric:first-child::after { background: radial-gradient(220px circle at var(--mx) var(--my), rgba(255, 255, 255, .16), transparent 60%); }
  @media (hover: hover) {
    #list-view :is(.work-card, .document-card, .library-metric):hover::after { opacity: 1; }
    /* Inclinação 3D sutil, na direção do mouse */
    #list-view :is(.work-card, .document-card) { transform-style: preserve-3d; }
    #list-view :is(.work-card, .document-card):hover {
      transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
    }
  }

  /* Cartão de obra: brilho que atravessa a faixa do logo e logo que "salta" */
  #list-view .work-card-visual::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 50%; z-index: 2; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg);
  }
  #list-view .work-card:hover .work-card-visual::before { animation: rm-brilho .9s var(--rm-suave); }
  @keyframes rm-brilho { to { left: 140%; } }
  #list-view .work-card .library-work-logo { transition: transform .5s var(--rm-mola), box-shadow .4s; }
  #list-view .work-card:hover .library-work-logo { transform: translateX(-50%) translateY(-3px) scale(1.04); box-shadow: 0 10px 22px rgba(0, 30, 70, .14); }
  #list-view .work-card-visual > svg { transition: transform .8s var(--rm-suave), color .4s; }
  #list-view .work-card:hover .work-card-visual > svg { transform: translateY(-4px) rotate(-2deg); color: var(--rm-cyan); }

  /* Cartão de documento: data em degradê e folhas em leque */
  #list-view .document-day {
    background: linear-gradient(135deg, var(--rm-navy), var(--rm-blue) 60%, var(--rm-teal));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  #list-view .document-card:hover .document-sheet { box-shadow: -6px 8px 0 -1px #fff, -6px 8px 0 0 var(--rm-grid), -12px 14px 0 -1px #fff, -12px 14px 0 0 var(--rm-grid); }

  /* Indicadores: ícone que gira de leve e anel ciano ao passar o mouse */
  #list-view .library-metric .metric-icon { transition: transform .5s var(--rm-mola), box-shadow .3s; }
  #list-view .library-metric:hover .metric-icon { transform: rotate(-10deg) scale(1.12); box-shadow: 0 0 0 6px rgba(0, 200, 215, .1); }
  #list-view .library-metric:first-child { background: linear-gradient(120deg, var(--rm-navy), var(--rm-navy2) 60%, #0d5a8f); background-size: 200% 100%; animation: rm-sobe .55s var(--rm-suave) both, rm-deriva 10s ease-in-out 1s infinite alternate; }
  @keyframes rm-deriva { to { background-position: 100% 0; } }

  /* Pílulas de tipo: a ativa tem degradê vivo; ícone balança ao passar o mouse */
  #list-view .report-type[aria-pressed="true"] { background: linear-gradient(120deg, var(--rm-navy), var(--rm-blue)); background-size: 180% 100%; animation: rm-sobe .45s var(--rm-suave) both, rm-deriva 6s ease-in-out infinite alternate; }
  #list-view .report-type > span:first-child { transition: transform .45s var(--rm-mola); }
  #list-view .report-type:hover > span:first-child { transform: rotate(-12deg) scale(1.1); }

  /* Menu lateral: código da obra ganha cor no item ativo; logos com leve zoom */
  #list-view .work-menu-item > :first-child { transition: transform .4s var(--rm-mola); }
  #list-view .work-menu-item:hover > :first-child { transform: scale(1.08) rotate(-3deg); }
  #list-view .work-menu-item[aria-current="page"] small { color: var(--rm-teal); font-weight: 700; }

  /* Botão de criação: halo pulsante discreto */
  #list-view .create-report-trigger { position: relative; }
  #list-view .create-report-trigger::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 0 rgba(13, 138, 116, .45); animation: rm-halo 2.8s ease-out 1.5s infinite;
  }
  @keyframes rm-halo { 0% { box-shadow: 0 0 0 0 rgba(13, 138, 116, .45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(13, 138, 116, 0); } }

  /* Revelação ao rolar (navegadores com scroll-driven animations; os demais mantêm a entrada em cascata) */
  @supports (animation-timeline: view()) {
    #list-view :is(.work-card, .document-card) {
      animation: rm-revela linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
    }
    @keyframes rm-revela { from { opacity: 0; transform: translateY(26px) scale(.97); } }
  }

  @media (prefers-reduced-motion: reduce) {
    body::before, #list-view .hero-copy::after, #list-view .create-report-trigger::after { animation: none !important; }
    #list-view .hero-blueprint path { stroke-dashoffset: 0; }
    #list-view :is(.work-card, .document-card):hover { transform: none; }
  }
}

/* ==========================================================================
   Remodelagem 12/2026 · organização (par do bloco "organização dos menus" do app-polish.js)
   ========================================================================== */
@media screen {
  /* Caminho no lugar do título repetido */
  #list-view .rm-titulo-antigo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #list-view .library-toolbar.toolbar { align-items: center; padding: 4px 0 18px; }
  .rm-caminho { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; font: 600 12px/1.4 'Open Sans', 'Segoe UI', sans-serif; color: var(--rm-ink2); }
  .rm-caminho > span { color: var(--rm-muted); font-weight: 800; letter-spacing: .14em; font-size: 10px; }
  .rm-caminho i { font-style: normal; color: var(--rm-grid); font-weight: 400; }
  .rm-caminho button { border: 0; background: none; padding: 4px 8px; margin: 0 -4px; border-radius: 999px; color: var(--rm-blue); font: inherit; cursor: pointer; transition: background .2s, color .2s; }
  .rm-caminho button:hover { background: rgba(0, 200, 215, .12); color: var(--rm-navy); }
  .rm-caminho b { color: var(--rm-ink); font-weight: 700; font-size: 14px; animation: rm-sobe .45s var(--rm-suave) both; }
  #list-view .library-toolbar .filters { margin-left: auto; }

  /* Originais que passaram para outro lugar (continuam no DOM recebendo o clique) */
  #list-view .library-toolbar .create-work-trigger, #list-view .library-toolbar .edit-work-trigger, #list-view #work-reports .ed-work-actions { display: none !important; }
  body.rm-menu-usuario .topbar #manage-users, body.rm-menu-usuario .topbar #manuals-trigger { display: none !important; }

  /* Ações da obra na faixa */
  #list-view .library-hero { flex-wrap: wrap; }
  .rm-hero-acoes { position: absolute; top: 16px; right: 18px; z-index: 3; display: flex; gap: 8px; }
  #list-view:not(.work-selected) .rm-hero-acoes { display: none; }
  .rm-acao { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; font: 600 11.5px 'Open Sans', 'Segoe UI', sans-serif; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, border-color .2s, transform .25s var(--rm-mola); }
  .rm-acao svg { width: 15px; height: 15px; }
  .rm-acao:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .6); transform: translateY(-1px); }
  .rm-acao[hidden] { display: none; }

  /* "+" de cadastro ao lado de "Cadastros" */
  #list-view .sidebar-heading { gap: 6px; }
  #list-view .sidebar-heading > span { flex: 1; }
  .rm-acao.rm-mais { width: 34px; height: 34px; min-height: 0; padding: 0; justify-content: center; border-color: transparent; background: var(--rm-green); box-shadow: 0 4px 12px rgba(13, 138, 116, .3); }
  .rm-acao.rm-mais span { display: none; }
  .rm-acao.rm-mais:hover { background: #0b7864; transform: rotate(90deg); }
  .sidebar-collapsed .rm-acao.rm-mais { display: none; }

  /* Menu lateral: fixo ao rolar, só a lista de obras rola; categorias em abas */
  @media (min-width: 851px) {
    #list-view .work-sidebar { position: sticky; top: 12px; display: flex; flex-direction: column; max-height: calc(100dvh - 24px); overflow: hidden; }
    #list-view #work-menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: var(--rm-grid) transparent; }
    #list-view .work-sidebar .sidebar-note { flex: none; }
    #list-view .library-layout:not(.sidebar-collapsed) .work-sidebar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; align-content: start; column-gap: 6px; }
    #list-view .library-layout:not(.sidebar-collapsed) .work-sidebar > :not(.portfolio-link) { grid-column: 1 / -1; }
    #list-view .library-layout:not(.sidebar-collapsed) .portfolio-link { flex-direction: column; justify-content: center; gap: 3px; min-height: 64px; padding: 8px 4px; text-align: center; font-size: 10.5px; line-height: 1.2; border: 1px solid var(--rm-grid); }
    #list-view .library-layout:not(.sidebar-collapsed) .portfolio-link > span:nth-child(2) { white-space: normal; }
    #list-view .library-layout:not(.sidebar-collapsed) .portfolio-link b { margin: 0; font-size: 10px; }
    #list-view .library-layout:not(.sidebar-collapsed) .portfolio-link[aria-current="page"] { border-color: rgba(0, 200, 215, .5); box-shadow: inset 0 -3px var(--rm-cyan); }
    #list-view .sidebar-label { margin-top: 12px; }
  }
  #list-view .portfolio-link.rm-zero { opacity: .45; }
  #list-view .portfolio-link.rm-zero:hover { opacity: .8; }

  /* Gaveta no celular/iPad em pé */
  .rm-abrir-menu { display: none; }
  @media (max-width: 850px) {
    .rm-abrir-menu { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--rm-grid); border-radius: 999px; background: #fff; color: var(--rm-navy); font: 700 12px 'Open Sans', 'Segoe UI', sans-serif; cursor: pointer; box-shadow: var(--rm-sombra); }
    .rm-abrir-menu svg { width: 16px; height: 16px; }
    #list-view .library-toolbar.toolbar { flex-direction: row; flex-wrap: wrap; align-items: center; }
    #list-view .rm-caminho { order: 2; flex: 1 1 100%; }
    #list-view .library-toolbar .filters { order: 1; margin-left: auto; width: auto; }
    #list-view .work-sidebar {
      position: fixed; z-index: 90; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); max-height: none; overflow-y: auto; border-radius: 0 16px 16px 0;
      transform: translateX(-104%); transition: transform .35s var(--rm-suave); display: block;
    }
    #list-view .work-sidebar #work-menu { display: block !important; max-height: none; overflow: visible; margin-top: 10px; }
    #list-view .work-sidebar #work-menu .work-menu-item { width: 100%; min-width: 0; }
    #list-view .work-sidebar .sidebar-label { display: block; margin-top: 12px; }
    #list-view .work-sidebar .portfolio-link { width: 100%; }
    #list-view .library-layout.rm-gaveta-aberta .work-sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 20, 50, .35); }
    #list-view .work-sidebar .sidebar-toggle { display: none; }
    .rm-gaveta-fundo { position: fixed; inset: 0; z-index: 89; background: rgba(0, 30, 70, .4); backdrop-filter: blur(3px); animation: rm-aparece .25s ease both; }
    body.rm-sem-rolagem { overflow: hidden; }
    .rm-hero-acoes { position: static; order: 3; width: 100%; margin-top: 12px; }
  }
  @keyframes rm-aparece { from { opacity: 0; } }

  /* Indicadores: uma faixa só, sem zeros, clicáveis */
  #list-view .library-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); gap: 8px; }
  #list-view .library-metric { min-width: 0; cursor: pointer; padding: 12px; gap: 10px; }
  #list-view .library-metric .metric-icon { width: 30px; height: 30px; flex: none; }
  #list-view .library-metric small { font-size: 10.5px; }
  #list-view .library-metric.rm-zero { display: none; }
  #list-view .library-metric.rm-ativo { border-color: var(--rm-cyan); box-shadow: 0 0 0 3px rgba(0, 200, 215, .2), var(--rm-sombra); }
  #list-view .library-metric:focus-visible { outline: 3px solid rgba(0, 200, 215, .4); outline-offset: 2px; }
  #list-view .library-metric strong { font-size: 24px; }
  .rm-filtro { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; padding: 6px 8px 6px 14px; border: 0; border-radius: 999px; background: var(--rm-navy); color: #fff; font: 700 11.5px 'Open Sans', 'Segoe UI', sans-serif; cursor: pointer; animation: rm-sobe .35s var(--rm-suave) both; }
  .rm-filtro svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
  #list-view .work-card.rm-fora { display: none; }

  /* Cartões de obra: só os tipos com relatório */
  #list-view .work-type-counts span.rm-zero { display: none; }
  #list-view .work-type-counts { min-height: 28px; }

  /* Tipos de relatório vazios: apagados e no fim */
  #list-view .report-type.rm-zero { opacity: .5; border-style: dashed; }
  #list-view .report-type.rm-zero:hover { opacity: .85; }
  #list-view .report-type.rm-zero > span:first-child { background: var(--rm-ground); color: var(--rm-muted); }

  /* Relatórios agrupados por mês */
  .rm-mes { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; margin: 10px 0 -2px; font: 300 20px/1.2 'Open Sans', 'Segoe UI', sans-serif; color: var(--rm-ink); text-transform: capitalize; letter-spacing: -.02em; }
  .rm-mes:first-child { margin-top: 0; }
  .rm-mes::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--rm-grid), transparent); align-self: center; }
  .rm-mes small { order: 2; font: 700 10px 'Open Sans', 'Segoe UI', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--rm-muted); }

  /* Menu do usuário */
  .rm-usuario { position: relative; }
  .rm-usuario[hidden] { display: none; }
  .rm-avatar { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 2px solid rgba(0, 200, 215, .7); border-radius: 50%; background: linear-gradient(135deg, var(--rm-cyan), var(--rm-teal)); color: var(--rm-navy); font: 800 12px 'Open Sans', 'Segoe UI', sans-serif; cursor: pointer; transition: transform .25s var(--rm-mola), box-shadow .2s; }
  .rm-avatar:hover, .rm-avatar[aria-expanded="true"] { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(0, 200, 215, .25); }
  .rm-usuario-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 200; min-width: 230px; padding: 6px; border: 1px solid var(--rm-grid); border-radius: 14px; background: #fff; box-shadow: var(--rm-sombra-alta); transform-origin: top right; animation: rm-menu .22s var(--rm-suave) both; }
  .rm-usuario-menu[hidden] { display: none; }
  @keyframes rm-menu { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
  .rm-usuario-quem { display: grid; gap: 2px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--rm-grid); }
  .rm-usuario-quem b { color: var(--rm-ink); font: 700 13px 'Open Sans', 'Segoe UI', sans-serif; }
  .rm-usuario-quem small { color: var(--rm-muted); font: 11px 'Open Sans', 'Segoe UI', sans-serif; overflow: hidden; text-overflow: ellipsis; }
  .rm-usuario-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--rm-ink); font: 600 12.5px 'Open Sans', 'Segoe UI', sans-serif; text-align: left; cursor: pointer; }
  .rm-usuario-menu button[hidden] { display: none; }
  .rm-usuario-menu button svg { width: 17px; height: 17px; color: var(--rm-navy); }
  .rm-usuario-menu button:hover, .rm-usuario-menu button:focus-visible { background: rgba(0, 200, 215, .1); outline: none; }
  .rm-usuario-menu .rm-sair { margin-top: 4px; border-top: 1px solid var(--rm-grid); border-radius: 0 0 10px 10px; color: #c0392b; }
  .rm-usuario-menu .rm-sair svg { color: #c0392b; }
}

@media screen {
  /* Menu do usuário acima do conteúdo; iniciais visíveis mesmo no celular (onde os botões do topo viram só ícone) */
  .topbar { z-index: 60; }
  .topbar .top-actions .rm-avatar { display: grid; place-items: center; font: 800 12px/1 "Open Sans", "Segoe UI", sans-serif; width: 34px; height: 34px; min-height: 0; padding: 0; gap: 0; border: 2px solid rgba(0, 200, 215, .7); border-radius: 50%; background: linear-gradient(135deg, var(--rm-cyan), var(--rm-teal)); color: var(--rm-navy); }
  .topbar .top-actions .rm-avatar:hover, .topbar .top-actions .rm-avatar[aria-expanded="true"] { background: linear-gradient(135deg, var(--rm-cyan), var(--rm-teal)); border-color: #fff; }
  .topbar .top-actions .rm-usuario-menu button { font-size: 12.5px; width: 100%; height: auto; padding: 8px 12px; gap: 10px; justify-content: flex-start; border: 0; border-radius: 10px; color: var(--rm-ink); background: none; }
  .topbar .top-actions .rm-usuario-menu button:hover { background: rgba(0, 200, 215, .1); }
  .topbar .top-actions .rm-usuario-menu .rm-sair { color: #c0392b; border-top: 1px solid var(--rm-grid); border-radius: 0 0 10px 10px; }
  .topbar .top-actions .rm-usuario-menu button::before { display: none; }
}
@media screen {
  /* Faixa de indicadores: sem ícone nos tipos (o número e o nome bastam), rótulo inteiro */
  #list-view .library-metric .metric-icon { display: none; }
  #list-view .library-metric:first-child { padding-left: 16px; }
  #list-view .library-metric > div { min-width: 0; }
  #list-view .library-metric small { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: normal; }
  #list-view .library-metric:not(:first-child) { justify-content: flex-start; padding-left: 16px; }
}
@media screen and (max-width: 600px) {
  /* Celular: iniciais visíveis (a regra dos ícones do topo zera a fonte com !important) e indicadores centralizados */
  .topbar .top-actions .rm-avatar { font-size: 12px !important; }
  .topbar .top-actions .rm-usuario-menu button { font-size: 12.5px !important; width: 100%; min-height: 40px; padding: 8px 12px; gap: 10px; justify-content: flex-start; }
  #list-view .library-metric, #list-view .library-metric:first-child, #list-view .library-metric:not(:first-child) { justify-content: center; padding: 12px 6px; text-align: center; }
}

/* ==========================================================================
   Remodelagem 12/2026 · tela cheia sem rolagem da página (computador/notebook)
   e animações mais leves. A página ocupa a janela; só a lista de obras (menu)
   e a grade de cartões rolam por dentro. Telas pequenas/baixas seguem com a
   rolagem normal. Relatório aberto, manual e login não são afetados.
   ========================================================================== */

/* ---------- Desempenho: só transform/opacity em animações contínuas ---------- */
@media screen {
  body::before { will-change: transform; animation-duration: 60s; }
  #list-view .library-hero::before { will-change: transform; }
  /* Faixa: brilho de fundo estático (animar o degradê repinta a faixa inteira a cada quadro) */
  #list-view .library-hero { animation: rm-desce .6s var(--rm-suave) both; }
  /* Reflexo que varre a faixa: transform em vez de "left" */
  #list-view .hero-copy::after { left: 0; width: 34%; transform: translateX(-180%) skewX(-18deg); animation: rm-varre-t 9s ease-in-out 2s infinite; will-change: transform; }
  @keyframes rm-varre-t { 0%, 70% { transform: translateX(-180%) skewX(-18deg); } 100% { transform: translateX(420%) skewX(-18deg); } }
  /* Brilho no logo da obra: transform em vez de "left" */
  #list-view .work-card-visual::before { left: 0; transform: translateX(-160%) skewX(-18deg); }
  #list-view .work-card:hover .work-card-visual::before { animation: rm-brilho-t .9s var(--rm-suave); }
  @keyframes rm-brilho-t { from { transform: translateX(-160%) skewX(-18deg); } to { transform: translateX(320%) skewX(-18deg); } }
  /* Degradês que "derivavam" (repintura contínua): agora estáticos */
  #list-view .library-metric:first-child { animation: rm-sobe .55s var(--rm-suave) both; }
  #list-view .report-type[aria-pressed="true"] { animation: rm-sobe .45s var(--rm-suave) both; }
  /* Halo do "Novo relatório": anel que cresce e some (transform/opacity, sem animar sombra) */
  #list-view .create-report-trigger::after { box-shadow: 0 0 0 2px rgba(13, 138, 116, .55); opacity: 0; animation: rm-halo-t 2.8s ease-out 1.5s infinite; will-change: transform, opacity; }
  @keyframes rm-halo-t { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.12, 1.45); opacity: 0; } }
  /* Hover: a camada sobe para a GPU só enquanto o mouse está em cima */
  @media (hover: hover) { #list-view :is(.work-card, .document-card, .library-metric, .report-type):hover { will-change: transform; } }
  /* Na página da obra os tipos já mostram as contagens: a faixa de indicadores sai (menos repetição, mais espaço) */
  #list-view.work-selected .library-metrics { display: none; }
}

/* ---------- Faixa compacta (vale para todas as telas) ---------- */
@media screen {
  #list-view .library-hero { min-height: 0; padding: 16px 24px; align-items: center; }
  #list-view .library-hero h1 { margin: 6px 0 4px; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.15; }
  #list-view #library-title br { display: none; }
  #list-view #library-title em::before { content: " "; }
  #list-view #hero-description { margin: 0; font-size: 12px; }
  #list-view .hero-footnote { display: none; }
  #list-view .hero-blueprint { flex: 0 0 120px; max-width: 120px; min-width: 0; margin: -6px 0; }
  #list-view .hero-blueprint > span { display: none; }
  #list-view.work-selected .hero-blueprint { display: none; }
  .rm-hero-acoes { top: 50%; transform: translateY(-50%); }
  #list-view .library-metrics { margin: 12px 0 14px; }
  #list-view .library-metric { padding-top: 9px; padding-bottom: 9px; }
  #list-view .library-metric strong { font-size: 22px; }
  #list-view .collection-heading { margin-bottom: 10px; }
  #list-view .collection-heading h2 { font-size: 20px; }
  @media (max-width: 850px) {
    .rm-hero-acoes { transform: none; }
    #list-view #hero-description { white-space: normal; }
  }
}

/* ---------- Sem rolagem da página: computador e notebook ---------- */
@media screen and (min-width: 1024px) and (min-height: 460px) {
  body.library-active:has(#list-view:not([hidden])) { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body.library-active:has(#list-view:not([hidden])) > footer { display: none; }
  body.library-active:has(#list-view:not([hidden])) .shell { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-top: 12px; padding-bottom: 14px; }
  body.library-active:has(#list-view:not([hidden])) #app-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  body.library-active #list-view:not([hidden]) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  #list-view .library-toolbar.toolbar { flex: none; padding: 0 0 12px; }
  #list-view > .notice { flex: none; }
  #list-view .library-layout { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  #list-view .work-sidebar { position: static; height: 100%; max-height: none; }
  #list-view .library-main { min-height: 0; display: flex; flex-direction: column; }
  #list-view .library-hero, #list-view .library-metrics { flex: none; }
  #list-view #portfolio-view:not([hidden]), #list-view #work-reports:not([hidden]) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  #list-view .collection-heading, #list-view .report-types, #list-view .report-controls, #list-view #more-reports { flex: none; }
  #list-view .report-controls { margin: 4px 0 10px; }
  #list-view #work-grid, #list-view #report-list {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; grid-auto-rows: max-content; grid-template-rows: none;
    margin: 0 -10px; padding: 6px 10px 10px; scrollbar-width: thin; scrollbar-color: #c9d3e0 transparent;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8px, #000 calc(100% - 10px), transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 8px, #000 calc(100% - 10px), transparent 100%);
  }
  #list-view #more-reports { margin-top: 10px; align-self: center; }
  /* Grade de obras: cartões mais baixos para caber mais por tela */
  #list-view .work-card-visual { height: 92px; }
  #list-view .work-card-visual > .library-work-logo { top: 26px; height: calc(100% - 34px); }
  #list-view .work-card-body { padding: 14px 16px; }
  #list-view .work-card-body h3 { margin: 0 0 2px; font-size: 15px; }
  #list-view .work-type-counts { margin: 8px 0; min-height: 0; }
  #list-view .document-preview { min-height: 104px; padding: 14px 18px; }
  #list-view .document-body { padding: 14px 16px; }
}
/* Notebooks baixos: tira a descrição da faixa e encolhe os indicadores */
@media screen and (min-width: 1024px) and (min-height: 460px) and (max-height: 780px) {
  #list-view #hero-description { display: none; }
  #list-view .library-hero { padding: 12px 22px; }
  #list-view .library-metrics { margin: 10px 0; }
  #list-view .library-metric { padding-top: 6px; padding-bottom: 6px; }
  #list-view .library-metric strong { font-size: 19px; }
  #list-view .collection-heading .eyebrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #list-view .hero-copy::after, #list-view .create-report-trigger::after { animation: none !important; opacity: 0; }
}
@media screen and (min-width: 1024px) and (min-height: 460px) {
  /* Página da obra: o caminho e a faixa já dizem onde se está; tipos numa linha que rola para o lado */
  #list-view #work-reports > .collection-heading { display: none; }
  #list-view #work-reports .report-types { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; margin: 12px -10px 6px; padding: 6px 10px 8px; scrollbar-width: thin; scrollbar-color: #c9d3e0 transparent; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 28px), transparent 100%); }
  #list-view #work-reports .report-types::-webkit-scrollbar { height: 4px; }
  #list-view #work-reports .report-type { flex: none; }
}
/* Luz e inclinação do mouse: variáveis que NÃO passam para os filhos (só o cartão recalcula a cada movimento)
   e a luz desenhada no fundo do próprio cartão, em vez de um pseudo-elemento que dependia da herança. */
@property --mx { syntax: '<percentage>'; inherits: false; initial-value: 50%; }
@property --my { syntax: '<percentage>'; inherits: false; initial-value: 50%; }
@property --rx { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --ry { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@media screen {
  #list-view :is(.work-card, .document-card, .library-metric)::after { content: none; }
  @media (hover: hover) {
    #list-view :is(.work-card, .document-card, .library-metric:not(:first-child)):hover {
      background: radial-gradient(240px circle at var(--mx) var(--my), rgba(0, 200, 215, .1), transparent 60%), #fff;
    }
    #list-view .library-metric:first-child:hover {
      background: radial-gradient(220px circle at var(--mx) var(--my), rgba(255, 255, 255, .16), transparent 60%), linear-gradient(120deg, var(--rm-navy), var(--rm-navy2) 60%, #0d5a8f);
    }
    #list-view :is(.work-card-body, .document-body) { background: transparent; }
  }
}

@media screen {
  /* Luz do mouse: um elemento só, movido por transform (app-polish.js) */
  #list-view :is(.work-card, .document-card, .library-metric:not(:first-child)):hover { background: #fff; }
  #list-view .library-metric:first-child:hover { background: linear-gradient(120deg, var(--rm-navy), var(--rm-navy2) 60%, #0d5a8f); }
  #list-view :is(.work-card, .document-card):hover { transform: translateY(-4px); }
  .rm-luz { position: absolute; left: 0; top: 0; z-index: 1; width: 320px; height: 320px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(0, 200, 215, .13), rgba(0, 200, 215, 0) 62%); will-change: transform; animation: rm-aparece .3s ease both; }
  .rm-luz.clara { background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 62%); }
  #list-view .rm-com-luz { transition: transform .12s linear, box-shadow .35s, border-color .3s; }
}
@media screen {
  /* Desempenho no hover: só transform/opacity animam; sombra, borda e fundo mudam na hora (sem repintar a cada quadro) */
  #list-view :is(.work-card, .document-card, .library-metric, .report-type, .work-menu-item, .portfolio-link, .document-sheet, .work-card-arrow, .metric-icon) {
    transition-property: transform, opacity; transition-duration: .35s; transition-timing-function: var(--rm-suave);
  }
  #list-view .rm-com-luz { transition: transform .12s linear; }
  #list-view :is(.open-button, .back-button, .rm-acao, .rm-abrir-menu, .chip) { transition-property: transform, opacity; transition-duration: .2s; }
}

@media screen {
  /* A revelação ao rolar não desloca os cartões (deslocar criava rolagem extra de poucos pixels) */
  @supports (animation-timeline: view()) {
    @keyframes rm-revela { from { opacity: 0; transform: scale(.96); } }
  }
}
/* Janelas baixas (notebook com as barras do navegador): tudo mais compacto para continuar sem rolagem */
@media screen and (min-width: 1024px) and (min-height: 460px) and (max-height: 660px) {
  #list-view .library-toolbar.toolbar { padding-bottom: 8px; }
  body.library-active:has(#list-view:not([hidden])) .shell { padding-top: 8px; padding-bottom: 8px; }
  #list-view .library-hero { padding: 10px 20px; }
  #list-view .library-hero .eyebrow { display: none; }
  #list-view .library-hero h1 { margin: 0; font-size: 20px; }
  #list-view .hero-blueprint { display: none; }
  #list-view .library-metrics { margin: 8px 0; gap: 6px; }
  #list-view .library-metric { padding-top: 4px; padding-bottom: 4px; }
  #list-view .library-metric strong { font-size: 17px; }
  #list-view .library-metric small { font-size: 9.5px; }
  #list-view #portfolio-view .collection-heading { margin-bottom: 6px; }
  #list-view #portfolio-view .collection-heading h2 { font-size: 16px; }
  #list-view #work-reports .report-types { margin-top: 6px; }
  #list-view .library-layout:not(.sidebar-collapsed) .portfolio-link { min-height: 50px; padding: 4px; }
  #list-view .work-sidebar .sidebar-note { display: none; }
  #list-view .work-sidebar { padding: 10px 12px; }
  #list-view .sidebar-label { margin-top: 6px; }
  #list-view .work-menu-item { min-height: 46px; padding: 6px 8px; }
}
/* "Explore suas obras" sem rolagem: colunas e altura das linhas vêm do app-polish.js (--rm-cols, --rm-linha);
   o cartão encolhe por dentro conforme a altura (container queries). */
@media screen and (min-width: 1024px) and (min-height: 460px) {
  #list-view #work-grid.rm-encaixe {
    overflow: hidden; grid-template-columns: repeat(var(--rm-cols), minmax(0, 1fr)); grid-auto-rows: var(--rm-linha);
    -webkit-mask-image: none; mask-image: none; padding-bottom: 6px;
  }
  #list-view #work-grid.rm-encaixe .work-card { height: 100%; display: flex; flex-direction: column; container-type: size; animation: rm-sobe .5s var(--rm-suave) both; }
  #list-view #work-grid.rm-encaixe .work-card-visual { flex: 1 1 auto; height: auto; min-height: 0; }
  #list-view #work-grid.rm-encaixe .work-card-visual > .library-work-logo { top: 32px; height: calc(100% - 40px); max-height: 64px; top: max(30px, calc(50% - 26px)); }
  #list-view #work-grid.rm-encaixe .work-card-visual > svg { max-height: 100%; }
  #list-view #work-grid.rm-encaixe .work-card-body { flex: none; padding: 10px 14px 12px; }
  #list-view #work-grid.rm-encaixe .work-card-body h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #list-view #work-grid.rm-encaixe .work-type-counts { flex-wrap: nowrap; overflow: hidden; margin: 6px 0; min-height: 0; }
  #list-view #work-grid.rm-encaixe .work-type-counts span { flex: none; }
  #list-view #work-grid.rm-encaixe .work-card-bottom { padding-top: 8px; }
  @container (max-height: 235px) { #list-view #work-grid.rm-encaixe .work-card-bottom { display: none; } }
  @container (max-height: 185px) { #list-view #work-grid.rm-encaixe .work-type-counts { display: none; } }
  @container (max-height: 140px) {
    #list-view #work-grid.rm-encaixe .work-client { display: none; }
    #list-view #work-grid.rm-encaixe .work-card-body { padding: 8px 12px; }
    #list-view #work-grid.rm-encaixe .work-card-body h3 { font-size: 13.5px; }
    #list-view #work-grid.rm-encaixe :is(.work-code, .work-card-arrow) { display: none; }
    #list-view #work-grid.rm-encaixe .work-card-visual > .library-work-logo { top: 8px; height: calc(100% - 14px); max-height: none; width: calc(100% - 24px); }
  }
}
@media screen and (min-width: 1024px) and (min-height: 460px) {
  /* Cartões baixos: o logo ocupa a faixa inteira; código e seta saem (o código continua no menu lateral) */
  @container (max-height: 235px) {
    #list-view #work-grid.rm-encaixe :is(.work-code, .work-card-arrow) { display: none; }
    #list-view #work-grid.rm-encaixe .work-card-visual > .library-work-logo { top: 8px; height: calc(100% - 16px); max-height: 72px; width: min(150px, calc(100% - 24px)); }
  }
}
