/* RaioXProdutividade — CSS global do produto.
   Extraído de /mnt/dados/telas/raioxprodutividade-mockupv3_3.html (2026-05-19).
   Prefixo .rx-* em tudo pra não colidir com Manager/MudBlazor.
   Não converter pra BEM/utility — mockup é a fonte de verdade. */

:root {
    --rx-bg-primary: #ffffff;
    --rx-bg-secondary: #f5f5f3;
    --rx-bg-tertiary: #eeedeb;
    --rx-text-primary: #1a1a1a;
    --rx-text-secondary: #6b6b6b;
    --rx-text-tertiary: #9a9a9a;
    --rx-border: rgba(0,0,0,0.1);
    --rx-accent: #6C5CE7;
    --rx-radius: 8px;
    --rx-radius-lg: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --rx-bg-primary: #1e1e1e;
        --rx-bg-secondary: #2a2a2a;
        --rx-bg-tertiary: #181818;
        --rx-text-primary: #e8e8e8;
        --rx-text-secondary: #a0a0a0;
        --rx-text-tertiary: #707070;
        --rx-border: rgba(255,255,255,0.12);
    }
}

/* Reset escopado ao body de páginas /rx/* — não vamos zerar o body
   inteiro porque o mesmo asset pode ser carregado quando o usuário
   navegar via SPA pra rotas Manager. Só os elementos dentro de
   .rx-app. */
.rx-app *,
.rx-app *::before,
.rx-app *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.rx-app button,
.rx-app .rx-emp-row,
.rx-app .rx-ds-card,
.rx-app .rx-menu-item,
.rx-app select,
.rx-app input,
.rx-app [role="button"] {
    touch-action: manipulation;
}

.rx-app button,
.rx-app .rx-menu-item {
    -webkit-appearance: none;
    appearance: none;
    user-select: none;
    -webkit-user-select: none;
}

.rx-app input,
.rx-app select,
.rx-app textarea {
    font-size: 16px;
}
@media (min-width: 601px) {
    .rx-app input,
    .rx-app select,
    .rx-app textarea { font-size: 13px; }
}

/* App container — body do produto. Usa background tertiary pra dar o
   "frame" que envolve o card branco do .rx-app. */
.rx-body-frame {
    background: var(--rx-bg-tertiary);
    min-height: 100vh;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: var(--rx-text-primary);
}

.rx-app {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: var(--rx-bg-primary);
    border-radius: var(--rx-radius-lg);
    border: 0.5px solid var(--rx-border);
    /* No overflow:hidden — would clip the period dropdown / bottom-sheet
       and the slide-in menu. The fixed-position overlays handle their own
       stacking via z-index. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.rx-header {
    padding: 12px 16px;
    border-bottom: 0.5px solid var(--rx-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.rx-header-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rx-header-text  { display: flex; flex-direction: column; min-width: 0; }
.rx-header-title {
    font-size: 18px; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rx-header-sub {
    font-size: 11px; color: var(--rx-text-tertiary); letter-spacing: 0.5px;
}

/* Layout v4 — hamburger button + slide-in menu + global selector +
   period dropdown. Source: /mnt/dados/telas/raioxprodutividade-mockupv4.html */

.rx-hamburger {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: none; cursor: pointer;
    color: var(--rx-text-primary);
    border-radius: var(--rx-radius);
}
/* .rx-hamburger:hover — moved to end-of-file capability block (hover:hover + pointer:fine) */
.rx-hamburger svg { width: 22px; height: 22px; }

.rx-menu-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}

.rx-menu {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 200px;
    background: var(--rx-bg-primary);
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 1000;
    overflow-y: auto;
    outline: none;
}

/* Current tenant info row — shown at top of the menu when known.
   Not a clickable item; uses same indentation as menu items. */
.rx-menu-tenant {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    margin: 8px 12px 0;
    font-size: 13px; color: var(--rx-text-secondary);
    border-bottom: 0.5px solid var(--rx-border);
}
.rx-menu-tenant svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--rx-text-tertiary); }
.rx-menu-tenant span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}

.rx-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--rx-border);
}
.rx-menu-header > span {
    font-size: 15px; font-weight: 600; color: var(--rx-text-primary);
}
.rx-menu-close {
    border: none; background: none; cursor: pointer;
    color: var(--rx-text-secondary);
    padding: 4px;
    display: flex; align-items: center; justify-content: center;
}
.rx-menu-close svg { width: 20px; height: 20px; }

.rx-menu-items { padding: 8px 12px; }

/* !important defends against MudBlazor global button resets that center
   button text — saw it in homolog 2026-05-20. */
.rx-menu-item,
button.rx-menu-item {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: none; background: none; cursor: pointer;
    font-size: 15px; font-weight: 400; font-family: inherit;
    color: var(--rx-text-secondary);
    border-radius: var(--rx-radius);
    transition: background 0.15s, color 0.15s;
    text-align: left !important;
}
/* .rx-menu-item:hover — moved to end-of-file capability block */
.rx-menu-item.active {
    background: rgba(108, 92, 231, 0.08);
    color: var(--rx-accent);
    font-weight: 500;
}
.rx-menu-icon { width: 20px; height: 20px; flex-shrink: 0; pointer-events: none; }

/* Global selector bar (person + period) under the header.
   On narrow screens (handled by @media below) the bar wraps and the
   period trigger right-aligns to the second row. */
.rx-global-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    flex-wrap: wrap; gap: 10px;
    border-bottom: 0.5px solid var(--rx-border);
    flex-shrink: 0;
}
.rx-global-person {
    display: flex; align-items: center; gap: 10px;
    flex: 1; min-width: 0;     /* min-width:0 allows the select to shrink */
}
.rx-global-person select {
    flex: 1; min-width: 0; max-width: 280px;
    font-size: 14px; font-weight: 500;
    padding: 8px 12px;
    border: 0.5px solid var(--rx-border);
    border-radius: var(--rx-radius);
    background: var(--rx-bg-primary);
    color: var(--rx-text-primary);
    overflow: hidden; text-overflow: ellipsis;
}

/* Period selector — trigger pill */
.rx-period-wrap { position: relative; margin-left: auto; max-width: 100%; }
.rx-period-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border: 1.5px solid var(--rx-accent);
    border-radius: var(--rx-radius);
    background: var(--rx-bg-primary);
    cursor: pointer; font-family: inherit;
    white-space: nowrap;
    max-width: 100%; overflow: hidden;
}
/* .rx-period-trigger:hover — moved to end-of-file capability block */
.rx-period-icon { width: 16px; height: 16px; color: var(--rx-accent); }
.rx-period-chevron { width: 14px; height: 14px; color: var(--rx-text-tertiary); }
.rx-period-label { font-size: 13px; font-weight: 600; color: var(--rx-text-primary); }
.rx-period-range { font-size: 12px; color: var(--rx-text-tertiary); }

/* Period selector — dropdown */
.rx-period-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 499;
}
.rx-period-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0;
    width: 380px;
    max-width: calc(100vw - 32px);  /* desktop safety net */
    background: var(--rx-bg-primary);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border: 0.5px solid var(--rx-border);
    z-index: 500;
    padding: 20px;
}
.rx-period-title {
    font-size: 15px; font-weight: 600;
    color: var(--rx-text-primary); margin-bottom: 16px;
}
.rx-period-section-label {
    font-size: 11px; font-weight: 600;
    color: var(--rx-text-tertiary);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.rx-period-chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rx-period-chip {
    padding: 8px 16px;
    border: 1px solid var(--rx-border);
    border-radius: 20px;
    background: var(--rx-bg-primary);
    color: var(--rx-text-secondary);
    font-size: 13px; font-weight: 500;
    cursor: pointer; font-family: inherit;
    transition: all 0.15s;
}
/* .rx-period-chip:hover — moved to end-of-file capability block */
.rx-period-chip.active {
    background: var(--rx-accent);
    color: #fff;
    border-color: var(--rx-accent);
}

.rx-period-month {
    width: 100%;
    padding: 10px 12px;
    border: 0.5px solid var(--rx-border);
    border-radius: var(--rx-radius);
    background: var(--rx-bg-primary);
    color: var(--rx-text-primary);
    font-size: 14px; margin-bottom: 16px;
    font-family: inherit;
}

.rx-period-custom { display: flex; gap: 12px; margin-bottom: 16px; }
.rx-period-field { flex: 1; }
.rx-period-field label {
    display: block;
    font-size: 12px; color: var(--rx-text-secondary);
    margin-bottom: 4px;
}
.rx-period-field input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 0.5px solid var(--rx-border);
    border-radius: var(--rx-radius);
    background: var(--rx-bg-primary);
    color: var(--rx-text-primary);
    font-size: 14px; font-family: inherit;
}

.rx-period-info {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 12px;
    background: var(--rx-bg-secondary);
    border-radius: var(--rx-radius);
    margin-bottom: 16px;
}
.rx-period-info svg {
    width: 16px; height: 16px; color: var(--rx-accent);
    flex-shrink: 0; margin-top: 1px;
}
.rx-period-info span {
    font-size: 12px; color: var(--rx-text-secondary); line-height: 1.4;
}

.rx-period-actions {
    display: flex; justify-content: flex-end; gap: 10px;
}
.rx-period-btn-cancel,
.rx-period-btn-apply {
    border-radius: var(--rx-radius);
    padding: 10px 20px;
    font-family: inherit;
    cursor: pointer;
    font-size: 14px;
}
.rx-period-btn-cancel {
    border: 1px solid var(--rx-border);
    background: var(--rx-bg-primary);
    color: var(--rx-text-primary);
    font-weight: 500;
}
/* .rx-period-btn-cancel:hover — moved to end-of-file capability block */
.rx-period-btn-apply {
    border: none;
    background: var(--rx-accent);
    color: #fff;
    font-weight: 600;
}
/* .rx-period-btn-apply:hover — moved to end-of-file capability block */

.rx-content {
    padding: 20px 24px 24px;
    flex: 1;                         /* fills space between header/global-bar and footer */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.rx-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 500; font-size: 14px;
}

.rx-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.rx-metrics.cols4 { grid-template-columns: repeat(4, 1fr); }

.rx-metric {
    background: var(--rx-bg-secondary);
    border-radius: var(--rx-radius);
    padding: 14px 16px;
}
.rx-metric-label {
    font-size: 12px;
    color: var(--rx-text-tertiary);
    margin-bottom: 4px;
    display: flex; align-items: center; gap: 4px;
}
.rx-metric-value { font-size: 24px; font-weight: 500; }
.rx-metric-delta { font-size: 11px; margin-top: 2px; color: var(--rx-text-tertiary); }
.rx-metric-delta.up { color: #0F6E56; }
.rx-metric-delta.down { color: #A32D2D; }

.rx-tt { position: relative; display: inline-flex; align-items: center; cursor: help; }
.rx-tt-icon { font-size: 12px; color: var(--rx-text-tertiary); }
.rx-tt-bubble {
    position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a; color: #fff;
    padding: 8px 12px; border-radius: 6px;
    font-size: 11px; line-height: 1.5;
    width: 200px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.15s;
    z-index: 20; text-align: left; font-weight: 400;
}
.rx-tt-bubble::after {
    content: ''; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
}
/* .rx-tt:hover counterpart moved to end-of-file capability block.
   :focus stays global so touch users (tabindex="0") keep tap-to-show. */
.rx-tt:focus .rx-tt-bubble { opacity: 1; }

.rx-section-label {
    font-size: 12px;
    color: var(--rx-text-tertiary);
    font-weight: 500;
    margin-bottom: 10px;
}

.rx-activity-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rx-activity-label { font-size: 13px; color: var(--rx-text-secondary); width: 110px; flex-shrink: 0; }
.rx-activity-bar-bg { flex: 1; height: 22px; background: var(--rx-bg-secondary); border-radius: 4px; overflow: hidden; }
.rx-activity-bar-fill { height: 100%; border-radius: 4px; }
.rx-activity-time { font-size: 12px; color: var(--rx-text-secondary); min-width: 44px; text-align: right; }

.rx-ds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rx-ds-card {
    display: flex; gap: 12px;
    padding: 10px 12px;
    background: var(--rx-bg-primary);
    border: 0.5px solid var(--rx-border);
    border-radius: var(--rx-radius);
    align-items: center;
}
.rx-ds-icon {
    width: 42px; height: 42px;
    border-radius: var(--rx-radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.rx-ds-icon.alerta { background: #FCEBEB; color: #A32D2D; }
.rx-ds-icon.atencao { background: #FAEEDA; color: #BA7517; }
.rx-ds-icon.ok { background: var(--rx-bg-secondary); color: var(--rx-text-tertiary); }
.rx-ds-body { flex: 1; min-width: 0; }
.rx-ds-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.rx-ds-status { font-size: 11px; color: var(--rx-text-tertiary); line-height: 1.4; }
.rx-ds-status.alerta { color: #A32D2D; font-weight: 500; }
.rx-ds-status.atencao { color: #BA7517; font-weight: 500; }

.rx-stacked-bar { display: flex; height: 32px; border-radius: 6px; overflow: hidden; gap: 2px; margin-bottom: 10px; }
.rx-stacked-seg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; }

.rx-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: var(--rx-text-secondary); }
.rx-legend-item { display: flex; align-items: center; gap: 5px; }
.rx-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

.rx-process-card {
    background: var(--rx-bg-primary);
    border: 0.5px solid var(--rx-border);
    border-radius: var(--rx-radius);
    padding: 14px 18px;
    margin-bottom: 8px;
}
.rx-process-card.uncategorized { border-style: dashed; }
.rx-process-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rx-process-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.rx-process-hours { font-size: 14px; font-weight: 500; }
.rx-process-meta { display: flex; gap: 16px; font-size: 12px; color: var(--rx-text-tertiary); }

.rx-disclaimer {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 10px 12px;
    background: var(--rx-bg-secondary);
    border-radius: var(--rx-radius);
    font-size: 12px; color: var(--rx-text-secondary);
    margin-bottom: 16px; line-height: 1.5;
}

/* Matrix de dias do mês — sinais */
.rx-matrix { font-size: 12px; }
.rx-matrix-row { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; padding: 5px 0; gap: 10px; }
.rx-matrix-row.rx-matrix-header { padding-bottom: 6px; }
.rx-matrix-label { display: flex; align-items: center; gap: 8px; color: var(--rx-text-primary); font-size: 13px; }
.rx-matrix-label svg { width: 16px; height: 16px; color: var(--rx-text-tertiary); flex-shrink: 0; }
.rx-matrix-cells { display: flex; gap: 3px; }
.rx-day-cell { width: 16px; height: 16px; border-radius: 3px; background: #F1EFE8; cursor: help; }
.rx-day-cell.atencao { background: #EF9F27; }
.rx-day-cell.alerta { background: #E24B4A; }
.rx-day-num { width: 16px; text-align: center; font-size: 9px; color: var(--rx-text-tertiary); font-variant-numeric: tabular-nums; }
.rx-day-num.weekend { opacity: 0.5; }
.rx-matrix-total { text-align: right; font-size: 11px; color: var(--rx-text-tertiary); }
.rx-matrix-total.alerta { color: #791F1F; font-weight: 500; }
.rx-matrix-total.atencao { color: #BA7517; font-weight: 500; }

/* Visão geral — gráfico temporal */
.rx-vg-area { display: flex; gap: 10px; margin: 16px 0 4px; }
/* Y-axis renders labels top → bottom directly: the @for in
   RxVisaoGeral.razor iterates i=4 down to 0, emitting <span> 8h, 6h,
   4h, 2h, 0 in that order. Natural `flex-direction: column` puts 8h
   at the top — matches the bars (anchored at the bottom) and the
   avg/prev SVG (y = (1 - val/yMax) * 100, smaller y = higher).
   `column-reverse` had silently flipped only the labels, leaving the
   bars/lines correct but reading inverted. Reported in
   /mnt/dados/telas/graficox.png (2026-05-30). */
.rx-vg-yaxis {
    display: flex; flex-direction: column;
    justify-content: space-between;
    height: 220px; font-size: 10px;
    color: var(--rx-text-tertiary);
    text-align: right; min-width: 36px;
    font-variant-numeric: tabular-nums;
}
.rx-vg-chart-wrap { flex: 1; position: relative; }
.rx-vg-chart {
    height: 220px;
    display: flex; align-items: flex-end;
    gap: 3px;
    border-left: 0.5px solid var(--rx-border);
    border-bottom: 0.5px solid var(--rx-border);
    padding: 0 6px;
    position: relative;
}
.rx-vg-gridline { position: absolute; left: 0; right: 0; border-top: 0.5px dashed #ebebe8; pointer-events: none; }
.rx-vg-bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 1px; transition: opacity 0.15s; cursor: help; position: relative; z-index: 1; }
/* Tooltip touch-friendly da barra. Substituiu o `title=` HTML que
   era invisível em touch (browser só mostra title em hover real).
   Mostrado via :hover (desktop, bloco 3 no fim do arquivo) ou
   :focus (touch — barra tem tabindex="0"). */
.rx-vg-bar-bubble {
    position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a; color: #fff;
    padding: 6px 10px; border-radius: 6px;
    font-size: 11px; line-height: 1.4;
    white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity 0.15s;
    z-index: 20; font-weight: 500;
}
.rx-vg-bar-bubble::after {
    content: ''; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
}
/* :focus stays global pra touch (tap dá focus → bubble aparece).
   :hover está no bloco capability no fim do arquivo. */
.rx-vg-bar:focus { outline: none; }
.rx-vg-bar:focus .rx-vg-bar-bubble { opacity: 1; }
/* .rx-vg-bar:hover (incluindo o bubble) — bloco 3 fim do arquivo */
/* Average-of-period line: deep blue, dashed, ~2.5x thicker than the
   original 1px gray. Stands out against the green bars and the
   grayscale "previous month" curve so the operator can read the
   reference at a glance. Tone (#1e3a8a, Tailwind blue-900-ish) chosen
   to read on white without competing with the green Active palette. */
.rx-vg-avg-line { position: absolute; left: 0; right: 0; border-top: 2.5px dashed #1e3a8a; pointer-events: none; z-index: 3; }
.rx-vg-avg-label {
    position: absolute; right: 2px;
    background: rgba(255,255,255,0.9);
    padding: 1px 5px; font-size: 9px;
    color: var(--rx-text-secondary);
    border-radius: 3px;
    transform: translateY(-50%);
    z-index: 4;
}
.rx-vg-prev-svg { position: absolute; left: 6px; right: 6px; top: 0; bottom: 0; pointer-events: none; z-index: 2; width: calc(100% - 12px); height: 100%; }
.rx-vg-xaxis { display: flex; gap: 3px; padding: 6px 6px 0 6px; margin-left: 46px; }
.rx-vg-xlabel { flex: 1; text-align: center; font-size: 9px; color: var(--rx-text-tertiary); font-variant-numeric: tabular-nums; }

/* Funcionários */
.rx-emp-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.rx-emp-search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.rx-emp-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--rx-text-tertiary); pointer-events: none; }
.rx-emp-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 0.5px solid var(--rx-border);
    border-radius: var(--rx-radius);
    background: var(--rx-bg-primary);
    color: var(--rx-text-primary);
    font-size: 13px; font-family: inherit;
}
.rx-emp-sync { font-size: 11px; color: var(--rx-text-tertiary); display: flex; align-items: center; gap: 6px; }
.rx-emp-row {
    display: grid;
    grid-template-columns: 36px 1fr auto auto;
    align-items: center; gap: 12px;
    padding: 10px 14px;
    background: var(--rx-bg-primary);
    border: 0.5px solid var(--rx-border);
    border-radius: var(--rx-radius);
    cursor: pointer;
    margin-bottom: 4px;
    transition: border-color 0.15s;
}
/* .rx-emp-row:hover — moved to end-of-file capability block */
.rx-emp-row.divergent { background: rgba(250, 238, 218, 0.45); border-color: #FAC775; }
.rx-emp-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 13px; }
.rx-emp-info { min-width: 0; }
.rx-emp-name { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.rx-emp-meta { font-size: 11px; color: var(--rx-text-tertiary); margin-top: 2px; }
.rx-emp-meta .div-msg { color: #BA7517; font-weight: 500; }
.rx-emp-punch { text-align: right; min-width: 96px; }
.rx-emp-punch-label { font-size: 10px; color: var(--rx-text-tertiary); }
.rx-emp-punch-value { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rx-emp-status { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 10px; white-space: nowrap; min-width: 72px; text-align: center; }
.rx-emp-status.ok { background: #E1F5EE; color: #085041; }
.rx-emp-status.ferias { background: #E6F1FB; color: #0C447C; }
.rx-emp-status.afastado { background: #FAEEDA; color: #633806; }
.rx-emp-status.ausente { background: var(--rx-bg-secondary); color: var(--rx-text-secondary); }

.rx-warn-banner {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 14px;
    background: #FAEEDA;
    border: 0.5px solid #FAC775;
    border-radius: var(--rx-radius);
    font-size: 12px; color: #633806;
    margin-bottom: 16px; line-height: 1.5;
}

.rx-footer {
    padding: 16px 24px;
    border-top: 0.5px solid var(--rx-border);
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--rx-text-tertiary);
}

/* Atividades — accordion cards */
.rx-act-card {
    border: 0.5px solid var(--rx-border);
    border-radius: var(--rx-radius);
    margin-bottom: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}
/* .rx-act-card:hover — moved to end-of-file capability block */
.rx-act-card.uncategorized { border-style: dashed; }
.rx-act-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; cursor: pointer;
    user-select: none; -webkit-user-select: none;
    background: none; border: none; width: 100%; font-family: inherit;
    color: inherit; text-align: left;
}
.rx-act-header:active { background: rgba(0,0,0,0.02); }
.rx-act-left { display: flex; align-items: center; gap: 10px; }
.rx-act-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.rx-act-name { font-size: 14px; font-weight: 500; }
.rx-act-right { display: flex; align-items: center; gap: 12px; }
.rx-act-hours { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--rx-text-primary); }
.rx-act-pct { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.rx-act-arrow { font-size: 18px; color: var(--rx-text-tertiary); transition: transform 0.2s; }
.rx-act-card.open .rx-act-arrow { transform: rotate(180deg); }
.rx-act-detail { display: none; padding: 0 18px 16px; border-top: 0.5px solid var(--rx-border); }
.rx-act-card.open .rx-act-detail { display: block; }
.rx-act-detail-title { font-size: 12px; color: var(--rx-text-secondary); font-weight: 500; margin: 14px 0 10px; }
.rx-act-detail-header { display: grid; grid-template-columns: 200px 1fr 54px 64px; align-items: center; gap: 8px; padding-bottom: 6px; font-size: 11px; color: var(--rx-text-tertiary); font-weight: 500; }
.rx-act-sub-row { display: grid; grid-template-columns: 200px 1fr 54px 64px; align-items: center; gap: 8px; padding: 8px 0; }
.rx-act-sub-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--rx-text-primary); }
.rx-act-sub-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.rx-act-sub-bar-bg { height: 8px; background: var(--rx-bg-secondary); border-radius: 4px; overflow: hidden; }
.rx-act-sub-bar-fill { height: 100%; border-radius: 4px; }
.rx-act-sub-hours { font-size: 13px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.rx-act-sub-pct { font-size: 12px; color: var(--rx-text-tertiary); text-align: right; font-variant-numeric: tabular-nums; }
.rx-act-total { font-size: 12px; color: var(--rx-text-tertiary); padding: 10px 0 0; border-top: 0.5px solid var(--rx-border); margin-top: 6px; }

/* ─── RxSinais accordion: events table + summary text ───
   Renderizado dentro de .rx-act-detail. Tipografia 12-13px, sem
   bordas pesadas (linhas horizontais leves entre rows). Mockup-fiel:
   /mnt/dados/telas/raioxprodutividade-mockupv4.html screen 2. */
.rx-signal-summary {
    font-size: 13px;
    color: var(--rx-text-secondary);
    line-height: 1.5;
    padding: 12px 0 4px;
    margin: 0;
}
.rx-signal-summary.rx-signal-error { color: var(--rx-danger, #b91c1c); }

/* Generic table — Columns/Rows são dinâmicos por sinal (sinal-processo,
   jornada_abaixo, atividade_fora_janela). Sem table-layout:fixed pra
   deixar o browser distribuir width; tabular-nums universal alinha
   números (HH:MM:SS, datas, contagens) sem precisar de classe per-col. */
.rx-signal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}
.rx-signal-table thead tr {
    font-size: 11px;
    color: var(--rx-text-tertiary);
    text-align: left;
    font-weight: 500;
}
.rx-signal-table th {
    padding: 6px 8px 6px 0;
    font-weight: 500;
    border-bottom: 0.5px solid var(--rx-border);
    white-space: nowrap;
}
.rx-signal-table tbody tr { border-top: 0.5px solid var(--rx-border); }
.rx-signal-table td {
    padding: 10px 8px 10px 0;
    color: var(--rx-text-secondary);
    vertical-align: top;
    word-break: break-word;
    font-variant-numeric: tabular-nums;
}

.rx-signal-loadmore {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--rx-accent, #5c6bc0);
    background: transparent;
    border: 1px solid var(--rx-accent, #5c6bc0);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background 100ms;
}
/* .rx-signal-loadmore:hover — moved to end-of-file capability block */

/* Atividade fora da janela — render dedicada (2 linhas por dia).
   Substituiu a tabela + botão de ação por linha. Não vai pra tabela
   genérica .rx-signal-table porque o layout é vertical, com data e
   janela na linha 1 e atividades + olho na linha 2. */
.rx-afj-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.rx-afj-day {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
    border-top: 0.5px solid var(--rx-border);
}
.rx-afj-day:first-child { border-top: none; padding-top: 8px; }

.rx-afj-row1 {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.rx-afj-row2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.rx-afj-field { display: flex; flex-direction: column; min-width: 0; }
.rx-afj-activity { flex: 1; min-width: 0; }
.rx-afj-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--rx-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}
.rx-afj-value {
    font-size: 14px;
    color: var(--rx-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Olho — área tocável 44×44px (Apple HIG / WCAG 2.5.5). Contorno em
   accent pra ficar visível no dark sem encher de fundo. */
.rx-afj-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border: 1px solid var(--rx-accent, #5c6bc0);
    border-radius: 8px;
    background: transparent;
    color: var(--rx-accent, #5c6bc0);
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    font-size: 18px;
    transition: background 100ms, color 100ms;
}
.rx-afj-eye:active { background: var(--rx-accent, #5c6bc0); color: #fff; }

/* Modal "Ver Atividades" — header de metadata + lista empilhada
   de eventos (3 campos: Hora, Duração, Log). Cada evento é um
   bloco empilhado pra evitar quebra letra-a-letra na coluna Log
   no celular (Severo 2026-06-01: nomes longos de processo
   espremiam a tabela 5-col em "Cha/xa/de/En/tra..."). */
.rx-modal-meta {
    display: flex; flex-direction: column; gap: 4px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 0.5px solid var(--rx-border);
    font-size: 13px;
}
.rx-modal-meta-row { display: flex; gap: 8px; flex-wrap: wrap; }
/* Rótulo em secondary (cinza médio) — antes era tertiary, somia no
   fundo claro. Continua claramente abaixo do valor pra preservar a
   hierarquia label/value. */
.rx-modal-meta-label { color: var(--rx-text-secondary); min-width: 110px; }
/* Valor em primary + 700: era 500 e parecia "lavado" ao lado da
   duração (Severo 2026-06-01). Token do tema (var(--rx-text-primary))
   pra não cravar #000 e funcionar em dark mode. */
.rx-modal-meta-value { color: var(--rx-text-primary); font-weight: 700; }
.rx-modal-summary {
    font-size: 12px;
    color: var(--rx-text-secondary);
    margin-bottom: 8px;
}

/* Header de grupo "Antes da entrada" / "Depois da saída" — não é
   coluna, é divisor cronológico. Cor laranja (atenção) pra "antes",
   verde (ativo) pra "depois", batendo com a convenção das pílulas
   removidas. */
.rx-modal-group-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 14px 0 6px;
    color: var(--rx-text-secondary);
}
.rx-modal-group-header:first-of-type { margin-top: 4px; }
.rx-modal-group-count {
    font-weight: 400;
    color: var(--rx-text-tertiary);
    margin-left: 4px;
}

/* Lista de eventos do dia (cada item = bloco empilhado).
   Sem table-layout: cada Log respira em largura total. */
.rx-modal-eventlist {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.rx-modal-event {
    padding: 8px 0;
    border-top: 0.5px solid var(--rx-border);
}
.rx-modal-event:first-child { border-top: none; padding-top: 4px; }
.rx-modal-event-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}
/* Horário em primary + 700: era 500 e ficava menos legível que a
   duração à direita (escura por contraste de variável). Foco visual
   é a hora do evento, então sobe pra bold. */
.rx-modal-event-time {
    font-size: 13px;
    font-weight: 700;
    color: var(--rx-text-primary);
    font-variant-numeric: tabular-nums;
}
.rx-modal-event-dur {
    font-size: 12px;
    color: var(--rx-text-tertiary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.rx-modal-event-log {
    font-size: 13px;
    color: var(--rx-text-secondary);
    line-height: 1.4;
    /* word-break:break-word permite que palavras longas (URLs, nomes
       de janela do Chrome) quebrem na borda da palavra, NUNCA letra-a-letra.
       overflow-wrap:anywhere é fallback pro caso da palavra ser maior
       que a linha — quebra em qualquer ponto, mas só quando necessário. */
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Modal afj — ponte de tema RaioX ↔ MudBlazor.
   ────────────────────────────────────────────
   Bug Severo 2026-06-01: no celular em system dark mode (prefers-color-
   scheme: dark), o token --rx-text-primary resolve pra #e8e8e8 (cor
   clara da paleta RaioX dark). MAS o <MudDialog> não tem IsDarkMode
   bindado ao sistema — surface fica branco sempre. Texto branco em
   bg branco = invisível ("Lucas Demo", horários, app names tudo lavado).

   Fix: dentro do .rx-modal-afj, força os tokens --rx-text-* a seguirem
   a paleta do MudBlazor (sempre coerente com o surface do dialog).
   Hoje (MudBlazor light): rgba(0,0,0,0.87) primary, 0.54 secondary,
   0.38 disabled — todos legíveis em bg branco. Amanhã, se o app
   ligar IsDarkMode, os mesmos vars seguem MudBlazor pro dark sem
   precisar tocar este CSS. Sem #000 cravado. */
.rx-modal-afj.mud-dialog {
    --rx-text-primary:   var(--mud-palette-text-primary);
    --rx-text-secondary: var(--mud-palette-text-secondary);
    --rx-text-tertiary:  var(--mud-palette-text-disabled);
}

/* Título do modal — "Atividades fora da janela — 27/04/2026". Por
   padrão herda --mud-palette-text-primary com weight do body (400),
   que ficava menos prominente que os valores dentro do conteúdo.
   Mantém weight 600 pra hierarquia. Cor agora já vem certa via a
   override de --rx-text-primary acima. */
.rx-modal-afj.mud-dialog .mud-dialog-title {
    color: var(--rx-text-primary);
    font-weight: 600;
}

/* Estado placeholder (PR 3) — usado pelos /rx/* enquanto conteúdo real
   não chega (PRs 4-6). */
.rx-placeholder {
    text-align: center;
    padding: 64px 24px;
    color: var(--rx-text-secondary);
}
.rx-placeholder-icon { font-size: 40px; margin-bottom: 14px; }
.rx-placeholder-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--rx-text-primary); }
.rx-placeholder-body { font-size: 13px; line-height: 1.5; max-width: 420px; margin: 0 auto; }

/* Mobile */
@media (max-width: 600px) {
    .rx-act-detail-header { grid-template-columns: 1fr 50px 50px; }
    .rx-act-detail-header > :nth-child(2) { display: none; }
    .rx-act-sub-row { grid-template-columns: 1fr 50px 50px; }
    .rx-act-sub-row > :nth-child(2) { display: none; }
}

@media (max-width: 600px) {
    .rx-body-frame { padding: 0; }
    .rx-app { border-radius: 0; border: none; }
    .rx-header { padding: 12px 16px; gap: 12px; }
    /* Keep the menu at 200px on mobile too — matches spec v4. */
    .rx-global-bar { padding: 10px 12px; }
    .rx-period-trigger { padding: 8px 12px; }
    .rx-period-range { display: none; } /* drop the absolute range on the trigger — saves width */

    .rx-metrics, .rx-metrics.cols4 { grid-template-columns: 1fr 1fr; }
    .rx-ds-grid { grid-template-columns: 1fr; }
    .rx-content { padding: 16px; }
    .rx-matrix-row { grid-template-columns: 110px 1fr 50px; gap: 6px; }
    .rx-matrix-label { font-size: 12px; }
    .rx-matrix-label svg { width: 14px; height: 14px; }
    .rx-day-cell { width: 14px; height: 14px; }
    .rx-day-num { width: 14px; font-size: 8px; }
    .rx-emp-row { padding: 12px; min-height: 56px; grid-template-columns: 36px 1fr auto; }
    .rx-emp-punch { display: none; }
    .rx-emp-toolbar { flex-direction: column; align-items: stretch; }
    .rx-emp-search { max-width: 100%; }
    .rx-vg-area { gap: 6px; }
    .rx-vg-yaxis { min-width: 28px; font-size: 9px; }
    .rx-vg-xaxis { margin-left: 34px; }
    .rx-warn-banner { font-size: 12px; }
    /* .rx-tt-bubble width/side-align removidos — substituídos pelo
       toast fixed do bloco @media (max-width: 768px) abaixo. A versão
       antiga mantinha position:absolute, então continuava sendo clipada
       pelo overflow do .rx-content (overflow-x:hidden → overflow-y:auto
       por spec). PR fix/raiox-tooltip-mobile 2026-05-31. */
}

/* Narrow phone viewport — stack the global bar (person on row 1, period
   right-aligned on row 2) and turn the period dropdown into a bottom
   sheet so it can never be clipped by parent overflow. */
@media (max-width: 420px) {
    .rx-global-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .rx-global-person { width: 100%; }
    .rx-global-person select { max-width: none; }
    .rx-period-wrap {
        align-self: flex-end;
        margin-left: 0;
    }

    .rx-period-overlay {
        background: rgba(0,0,0,0.4);
        z-index: 1099;
    }
    .rx-period-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 16px 16px 0 0;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.25);
        z-index: 1100;
    }
}

/* Tooltip vira toast fixo no rodapé em telas pequenas (≤768px =
   celular + tablet portrait). .rx-content tem overflow-x: hidden,
   que por spec força overflow-y a auto e clipa o topo do balão dos
   cards da 1ª linha. position:fixed escapa do containing block
   clipante; sem ancestral transformado no caminho, ancora na
   viewport direto (não precisa de portal Blazor). z-index 1500 fica
   acima de menu/period-dropdown (1100).

   Breakpoint 768px confirmado por Playwright: aos 600/768 o balão
   absoluto ficava com top fora do .rx-content (43px/39px acima).
   Aos 390 já estava clipando muito mais. Acima de 768 (desktop) o
   balão volta ao layout absoluto da declaração base (linha 399). */
@media (max-width: 768px) {
    .rx-tt-bubble {
        position: fixed;
        top: auto; bottom: 16px; left: 16px; right: 16px;
        width: auto; max-width: none;
        transform: none;
        font-size: 12px;
        padding: 12px 14px;
        z-index: 1500;
    }
    .rx-tt-bubble::after { display: none; }      /* seta não faz sentido no toast */
    .rx-tt:active .rx-tt-bubble { opacity: 1; }  /* iOS tap-and-hold reforço (touch sem hover) */
}

.rx-app input[type="date"],
.rx-app select,
.rx-app input[type="text"] { font-family: inherit; }

/* ═══════════════════════════════════════════════════════════════
   CAPABILITY-DRIVEN RULES — pointer / hover media features
   ═══════════════════════════════════════════════════════════════

   Hoje o resto deste CSS usa só `max-width` pra decidir mobile vs
   desktop. Isso classifica errado vários casos reais (celular
   landscape com viewport > 600px, iPad portrait, foldable aberto,
   janela estreita de desktop). Os 3 blocos abaixo adicionam regras
   ortogonais por **capacidade de input**:

     • viewport (existente)        → quanto espaço cabe (grid, colunas)
     • pointer / hover (este aqui) → como o usuário toca/aponta

   Aditivos, não substitutivos. Decisões e auditoria documentadas
   na PR que introduziu este bloco (2026-05-31).

   ─── Limitações conhecidas ───────────────────────────────────
   • pointer/hover NÃO re-avalia ao parear mouse no meio da sessão.
     Edge case raro: sessão Blazor é longa e o usuário não troca
     de input no meio do uso.
   • iPad com trackpad (Magic Keyboard) continua reportando
     pointer:coarse — iPadOS mantém touch como primário, conforme
     bug WebKit 205754. Falha graciosa aceitável: tap targets
     maiores e tooltips via :focus continuam funcionais.
   • Suporte: Chrome 41+, Firefox 64+, Safari 9+, Edge 12+. IE não.
   ─────────────────────────────────────────────────────────────── */

/* ─── Bloco 2: interação touch (input impreciso, sem hover) ───
   Aciona quando o input primário é dedo. Tap targets ≥44px
   (piso Apple HIG / WCAG 2.5.5). Não esconde tooltips: `.rx-tt`
   já é touch-friendly via `tabindex="0"` + `:focus`. */
@media (pointer: coarse) and (hover: none) {
    .rx-hamburger        { min-height: 44px; min-width: 44px; }
    .rx-period-trigger   { min-height: 44px; padding: 10px 14px; }
    .rx-period-chip      { min-height: 44px; padding: 10px 16px; }
    .rx-signal-loadmore  { min-height: 44px; padding: 10px 18px; }
}

/* ─── Bloco 3: hover só onde funciona (mouse com hover real) ───
   Move pra cá as 10 regras `:hover` que existiam em desktop.
   Em touch, browser dispara `:hover` espuriamente após o toque
   (o "hover stuck") — protegendo aqui, esse comportamento
   desaparece em mobile. Feedback de toque fica por conta do
   `:active` global mais abaixo. */
@media (hover: hover) and (pointer: fine) {
    .rx-hamburger:hover          { background: rgba(0,0,0,0.04); }
    .rx-menu-item:hover          { background: rgba(0,0,0,0.04); color: var(--rx-text-primary); }
    .rx-period-trigger:hover     { background: rgba(108, 92, 231, 0.04); }
    .rx-period-chip:hover        { border-color: var(--rx-accent); color: var(--rx-accent); }
    .rx-period-btn-cancel:hover  { background: rgba(0,0,0,0.04); }
    .rx-period-btn-apply:hover   { opacity: 0.88; }
    .rx-tt:hover .rx-tt-bubble   { opacity: 1; }
    .rx-vg-bar:hover             { opacity: 0.7; }
    .rx-vg-bar:hover .rx-vg-bar-bubble { opacity: 1; }
    .rx-emp-row:hover            { border-color: var(--rx-text-tertiary); }
    .rx-act-card:hover           { border-color: var(--rx-text-tertiary); }
    .rx-signal-loadmore:hover    { background: rgba(92, 107, 192, 0.08); }
}

/* ─── :active global — feedback imediato de toque/click ───
   Espelha visualmente o que `:hover` faz em desktop. Disparado em
   `pointerdown`/`mousedown`, funciona em mouse E touch sem
   precisar de media query — `:active` é universal. Compensa o
   vácuo de feedback que o bloco 3 deixa em touch (sem `:hover`,
   sem `:active` seria "tocou e nada aconteceu" durante a latência
   do Blazor circuit). */
.rx-hamburger:active         { background: rgba(0,0,0,0.08); }
.rx-menu-item:active         { background: rgba(0,0,0,0.08); color: var(--rx-text-primary); }
.rx-period-trigger:active    { background: rgba(108, 92, 231, 0.08); }
.rx-period-chip:active       { border-color: var(--rx-accent); color: var(--rx-accent); background: rgba(108, 92, 231, 0.06); }
.rx-period-btn-cancel:active { background: rgba(0,0,0,0.08); }
.rx-period-btn-apply:active  { opacity: 0.78; }
.rx-vg-bar:active            { opacity: 0.55; }
.rx-emp-row:active           { border-color: var(--rx-accent); }
.rx-act-card:active          { border-color: var(--rx-accent); }
.rx-signal-loadmore:active   { background: rgba(92, 107, 192, 0.14); }
