/* Auditoria de horas (visão geral + detalhe da pessoa). Cores só da paleta do tema,
   exceto as séries do gráfico/linha do tempo (azul jornada digital, laranja ponto sem
   jornada digital), que são cores de série e valem nos dois modos. */
.ah-page { --ah-digital: #2348C4; --ah-gap: #F2B38F; --ah-above: rgba(242, 179, 143, .35); }

.ah-page .ah-h2 { margin: 0; font-size: 17px; font-weight: 600; color: var(--rksam-text-primary); }
.ah-page .ah-h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--rksam-text-primary); }
.ah-page .ah-label { font-size: 12px; font-weight: 600; color: var(--rksam-text-secondary); }
.ah-page .ah-muted { color: var(--rksam-text-muted); font-size: 12.5px; }
.ah-page .ah-small { font-size: 12px; margin: 0; line-height: 1.5; }
.ah-page .ah-strong { font-weight: 600; color: var(--rksam-text-primary); }
.ah-page .ah-num { font-variant-numeric: tabular-nums; }
.ah-page .ah-big { font-weight: 700; font-size: 14px; color: var(--rksam-text-primary); }
.ah-page .ah-right { text-align: right; }
.ah-page .ah-r { text-align: right; }
.ah-page .ah-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ah-page .ah-row--between { justify-content: space-between; }
.ah-page .ah-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ah-page .ah-pad { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* filtros */
.ah-filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding: 16px; margin-bottom: 16px; }
/* The card clips (.rksam-card overflow:hidden); the period calendar must open over the box below. */
.rksam-card.ah-filters { overflow: visible; }
.ah-picktrig { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer;
               color: var(--rksam-text-primary); background: var(--rksam-surface); border: 0.5px solid var(--rksam-border-strong); border-radius: 8px; text-align: left; }
.ah-picktrig:hover { border-color: var(--rksam-accent); }
.ah-group { display: flex; flex-direction: column; gap: 6px; }
.ah-group__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--rksam-text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.ah-whole { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--rksam-accent); background: var(--rksam-accent-soft, var(--rksam-surface-2)); border-radius: 999px; padding: 1px 8px; margin-left: 6px; text-transform: none; }
.ah-field { display: flex; flex-direction: column; gap: 6px; }
.ah-input { font: inherit; font-size: 14px; color: var(--rksam-text-primary); height: 40px; box-sizing: border-box; padding: 0 14px;
            border: 0.5px solid var(--rksam-border-strong); border-radius: 8px; background: var(--rksam-surface); width: 100%; }
.ah-input:focus { outline: none; border-color: var(--rksam-accent); box-shadow: var(--rksam-shadow-focus); }
.ah-input--short { width: 110px; }
.ah-textarea { height: auto; padding: 10px 12px; resize: vertical; }
.ah-hint { font-size: 12px; color: var(--rksam-text-muted); padding-bottom: 11px; }

/* seleção */
.ah-select { display: flex; flex-wrap: wrap; margin-bottom: 16px; }
.ah-select__col { flex: 1 1 420px; min-width: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.ah-select__col + .ah-select__col { border-left: 1px solid var(--rksam-border); }
@media (max-width: 900px) { .ah-select__col + .ah-select__col { border-left: 0; border-top: 1px solid var(--rksam-border); } }
.ah-results { display: flex; flex-direction: column; border: 1px solid var(--rksam-border-subtle); border-radius: 8px; overflow: hidden; }
.ah-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: 13px; }
.ah-result + .ah-result { border-top: 1px solid var(--rksam-border-subtle); }
.ah-result__txt { min-width: 0; }
.ah-btn { font: inherit; font-size: 13px; font-weight: 500; min-height: 36px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
          border: 1px solid var(--rksam-border-strong); background: var(--rksam-surface); color: var(--rksam-text-primary); }
.ah-btn:hover:not(:disabled) { background: var(--rksam-surface-hover); }
.ah-btn:disabled { opacity: .55; cursor: default; }
.ah-btn--add { color: var(--rksam-accent); font-weight: 600; white-space: nowrap; }
.ah-btn--primary { background: var(--rksam-accent); border-color: var(--rksam-accent); color: var(--rksam-accent-fg); font-weight: 600; }
.ah-btn--primary:hover:not(:disabled) { background: var(--rksam-accent-hover); }
.ah-link { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 13px; color: var(--rksam-accent); cursor: pointer; }
.ah-link:disabled { color: var(--rksam-text-muted); cursor: default; }
.ah-shortcuts { display: flex; flex-direction: column; gap: 8px; }
.ah-import { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px dashed var(--rksam-border-strong); border-radius: 8px; }
.ah-file { font-size: 12.5px; color: var(--rksam-text-secondary); }
.ah-warn { font-size: 12.5px; color: var(--rksam-warning); background: var(--rksam-warning-subtle); border: 1px solid var(--rksam-warning-border); border-radius: 8px; padding: 8px 10px; }
.ah-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ah-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 2px 2px 2px 12px; border-radius: 999px;
           background: var(--rksam-accent-subtle); border: 1px solid var(--rksam-accent-border); color: var(--rksam-accent-ink); }
.ah-chip .ah-strong { color: var(--rksam-accent-ink); }
.ah-chip__x { width: 28px; height: 28px; border-radius: 999px; border: 0; background: transparent; color: var(--rksam-accent-ink);
              cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ah-chip__x:hover { background: var(--rksam-surface-hover); }
.ah-auto { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--rksam-success);
           background: var(--rksam-success-subtle); border: 1px solid var(--rksam-success-border); border-radius: 999px; padding: 2px 8px; }
.ah-team { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; border-radius: 8px;
           border: 1px solid var(--rksam-border-subtle); background: var(--rksam-bg-subtle); font-size: 13px; }
.ah-team--none { background: var(--rksam-warning-subtle); border-color: var(--rksam-warning-border); }

/* indicadores */
.ah-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ah-kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ah-kpi__l { font-size: 13px; color: var(--rksam-text-secondary); }
.ah-kpi__v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--rksam-text-primary); }
.ah-kpi__s { font-size: 12px; color: var(--rksam-text-muted); }
.ah-bad { color: var(--rksam-danger); }
.ah-ok { color: var(--rksam-success); }
.ah-warn-t { color: var(--rksam-warning); }

/* tabela */
.ah-tablehead { padding: 16px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
                border-bottom: 1px solid var(--rksam-border); }
.ah-pillbtn { font: inherit; font-size: 13px; font-weight: 500; min-height: 36px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
              border: 1px solid var(--rksam-border-strong); background: var(--rksam-surface); color: var(--rksam-text-primary); }
.ah-pillbtn.is-on { background: var(--rksam-text-primary); border-color: var(--rksam-text-primary); color: var(--rksam-surface); }
.ah-tbl { overflow-x: auto; }
.ah-table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 13px; }
.ah-table--small { min-width: 560px; }
.ah-table th { text-align: left; font-size: 12px; color: var(--rksam-text-secondary); font-weight: 600; padding: 10px 12px; background: var(--rksam-bg-subtle); }
.ah-table th.ah-r { text-align: right; }
.ah-table td { padding: 12px; border-top: 1px solid var(--rksam-border-subtle); vertical-align: top; color: var(--rksam-text-primary); }
.ah-table--small td, .ah-table--small th { padding: 8px 6px; }
.ah-covcol { width: 190px; }
.ah-bar { position: relative; height: 8px; background: var(--rksam-border-subtle); border-radius: 4px; margin-top: 6px; }
.ah-bar__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--ah-digital); }
.ah-bar__fill--low { background: var(--rksam-warning); }
.ah-bar__tick { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--rksam-text-primary); }
.ah-signals { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
.ah-sig { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--rksam-bg-subtle); color: var(--rksam-text-secondary); border: 1px solid var(--rksam-border); }
.ah-status { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.ah-status--sem-respaldo { background: var(--rksam-danger-subtle); color: var(--rksam-danger); border-color: var(--rksam-danger-border); }
.ah-status--nao-verificavel, .ah-status--sem-comparacao { background: var(--rksam-bg-subtle); color: var(--rksam-text-secondary); border-color: var(--rksam-border); }
.ah-status--parcial, .ah-status--ressalva { background: var(--rksam-warning-subtle); color: var(--rksam-warning); border-color: var(--rksam-warning-border); }
.ah-status--plausivel { background: var(--rksam-info-subtle); color: var(--rksam-info); border-color: var(--rksam-info-border); }
.ah-status--confirmado { background: var(--rksam-success-subtle); color: var(--rksam-success); border-color: var(--rksam-success-border); }
.ah-status--ressalva { font-size: 11.5px; padding: 3px 8px; }
.ah-empty { padding: 24px 18px; color: var(--rksam-text-muted); font-size: 14px; text-align: center; }

.ah-teamcmp { margin-top: 16px; }
.ah-foot { font-size: 12px; color: var(--rksam-text-muted); line-height: 1.5; max-width: 1100px; margin: 16px 2px 0; }

/* detalhe */
.ah-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.ah-head__titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ah-h1 { margin: 0; font-size: 26px; font-weight: 700; color: var(--rksam-text-primary); }
.ah-split { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.ah-split__main { flex: 999 1 640px; min-width: 0; }
.ah-split__side { flex: 1 1 320px; min-width: 0; }
.ah-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--rksam-text-secondary); align-items: center; }
.ah-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ah-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.ah-sw--digital { background: var(--ah-digital); }
.ah-sw--gap { background: var(--ah-gap); }
.ah-sw--line { width: 12px; height: 2px; background: var(--rksam-text-primary); border-radius: 0; }
.ah-sw--box { width: 14px; height: 10px; border: 2px solid var(--rksam-text-primary); box-sizing: border-box; }
.ah-sw--above { width: 14px; height: 10px; background: var(--ah-above); }
.ah-months { display: grid; gap: 12px; align-items: end; height: 220px; border-bottom: 1px solid var(--rksam-border-strong); padding-top: 8px; }
.ah-month { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.ah-month__total { font-size: 12px; font-weight: 600; margin-bottom: 4px; font-variant-numeric: tabular-nums; color: var(--rksam-text-primary); }
.ah-month__off { width: 60%; background: var(--ah-gap); border-radius: 4px 4px 0 0; }
.ah-month__on { width: 60%; background: var(--ah-digital); }
.ah-month__line { position: absolute; left: 8%; right: 8%; height: 2px; background: var(--rksam-text-primary); }
.ah-monthlabels { display: grid; gap: 12px; font-size: 12px; color: var(--rksam-text-muted); text-align: center; }
.ah-signal { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--rksam-bg-subtle); border: 1px solid var(--rksam-border-subtle); }
.ah-signal__t { font-size: 13px; font-weight: 600; color: var(--rksam-text-primary); }
.ah-signal__b { font-size: 12px; color: var(--rksam-text-muted); line-height: 1.45; }
.ah-origin { display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px; gap: 8px; align-items: center; font-size: 12px; color: var(--rksam-text-secondary); }
.ah-origin .ah-bar { margin-top: 0; }
.ah-week { min-width: 960px; display: flex; flex-direction: column; gap: 6px; }
.ah-week__row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 36px 198px; gap: 12px; align-items: center; font-size: 13px; color: var(--rksam-text-primary); }
.ah-week__axis { font-size: 11px; color: var(--rksam-text-muted); }
.ah-week__ticks { display: flex; justify-content: space-between; }
/* Ponto 60 px, Digital 60 px, Ponto justificado 78 px (+30% só entre Digital e Ponto justificado). */
.ah-week__cols { display: grid; grid-template-columns: 60px 60px 78px; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ah-week__cols--head { align-items: end; }
.ah-lupa { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--rksam-border-strong); background: var(--rksam-surface);
           color: var(--rksam-accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ah-lupa:hover { background: var(--rksam-surface-hover); }
.ah-lupa:focus-visible { outline: 2px solid var(--rksam-accent); outline-offset: 2px; }
.ah-pending { color: var(--rksam-warning); font-size: 11px; font-weight: 600; }
.ah-notice { font-size: 13px; color: var(--rksam-warning); background: var(--rksam-warning-subtle); border: 1px solid var(--rksam-warning-border);
             border-radius: 8px; padding: 8px 12px; }
.ah-track { position: relative; height: 34px; background: var(--rksam-bg-subtle); border-radius: 6px; border: 1px solid var(--rksam-border-subtle); }
.ah-track__above { position: absolute; top: 0; bottom: 0; background: var(--ah-above); }
.ah-track__punch { position: absolute; top: 3px; bottom: 3px; border: 2px solid var(--rksam-text-primary); border-radius: 5px; box-sizing: border-box; }
.ah-track__punch--dashed { border-style: dashed; border-color: var(--rksam-text-muted); }
.ah-track__loose { position: absolute; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--rksam-warning); }
.ah-track__act { position: absolute; top: 13px; height: 8px; background: var(--ah-digital); border-radius: 3px; }
.ah-odd { color: var(--rksam-warning); font-weight: 600; }
.ah-low { color: var(--rksam-danger); font-weight: 600; }
.ah-select-sm { font: inherit; font-size: 14px; color: var(--rksam-text-primary); height: 40px; padding: 0 10px; border: 0.5px solid var(--rksam-border-strong);
                border-radius: 8px; background: var(--rksam-surface); }
.ah-history { font-size: 12px; color: var(--rksam-text-muted); display: flex; flex-direction: column; gap: 2px; }
