/* 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 { background: rgba(0,0,0,0.04); }
.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 { background: rgba(0,0,0,0.04); color: var(--rx-text-primary); }
.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 { background: rgba(108, 92, 231, 0.04); }
.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 { border-color: var(--rx-accent); color: var(--rx-accent); }
.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 { background: rgba(0,0,0,0.04); }
.rx-period-btn-apply {
    border: none;
    background: var(--rx-accent);
    color: #fff;
    font-weight: 600;
}
.rx-period-btn-apply:hover { opacity: 0.88; }

.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 .rx-tt-bubble,
.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; }
.rx-vg-yaxis {
    display: flex; flex-direction: column-reverse;
    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; }
.rx-vg-bar:hover { opacity: 0.7; }
.rx-vg-avg-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #888; 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 { border-color: var(--rx-text-tertiary); }
.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 { border-color: var(--rx-text-tertiary); }
.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; }

/* 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: 180px; font-size: 11px; left: auto; right: -20px; transform: none; }
    .rx-tt-bubble::after { left: auto; right: 30px; transform: none; }
}

/* 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;
    }
}

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