/* Escala de leitura e navegação. Não reduzir fontes nos breakpoints móveis. */
:root { --sidebar: 288px; --muted: #52665a; }
body { font-size: 15px; }
.sidebar { height: 100vh; height: 100dvh; padding: 24px 14px 0; overflow: hidden; color: #edf5ef; }
.sidebar > .brand, .workspace-label, .workspace, .tenant-switch, .sidebar-bottom { flex-shrink: 0; }
.sidebar .brand { padding: 0 10px; }
.sidebar .brand > span { font-size: 30px; }
.sidebar .workspace-label { margin: 27px 12px 10px; font-size: 11px; color: #bfd4c7; letter-spacing: 1px; }
.sidebar .workspace { margin: 0 4px; padding: 12px; min-width: 0; gap: 10px; }
.workspace > div:nth-child(2) { min-width: 0; }
.workspace-icon, .workspace-dot { flex-shrink: 0; }
.sidebar .workspace strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.sidebar .workspace span:not(.workspace-dot) { font-size: 12px; color: #c4d8cb; }
.sidebar .tenant-switch { margin: 7px 10px 3px; font-size: 13px; max-height: 160px; overflow-y: auto; }
.sidebar .tenant-switch summary { min-height: 40px; align-items: center; color: #e2eee6; padding: 8px 2px; }
.sidebar .tenant-switch button { font-size: 13px; min-height: 40px; }
.sidebar nav { width: 100%; min-width: 0; min-height: 0; flex: 1 1 0; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; padding: 4px 6px 8px 0; overscroll-behavior: contain; scrollbar-color: #78988a transparent; }
.sidebar .nav-label { margin: 22px 12px 11px; font-size: 11px; color: #bfd4c7; letter-spacing: 1px; }
.sidebar .nav-item { width: 100%; min-width: 0; margin: 4px 0; padding: 12px; gap: 11px; min-height: 48px; font-size: 15px; line-height: 1.4; color: #edf5ef; border-radius: 8px; }
.sidebar .nav-item > span:first-of-type { min-width: 0; flex: 1 1 0; white-space: normal; overflow-wrap: anywhere; }
.sidebar .nav-item .icon { width: 20px; height: 20px; flex-shrink: 0; color: #c8ddcf; opacity: 1; }
.sidebar .nav-item:hover { background: #ffffff13; }
.sidebar .nav-item.active { background: var(--lime); color: #11352d; font-weight: 650; }
.sidebar .nav-item.active .icon { color: #11352d; }
.sidebar .nav-item:focus-visible { outline: 2px solid #f5f9ec; outline-offset: -3px; }
.sidebar .nav-item.active:focus-visible { outline-color: #11352d; }
.sidebar .nav-mini, .sidebar .master-pill { flex: 0 0 auto; font-size: 11px; color: #d2e3d7; }
.sidebar .nav-item.active .nav-mini { color: #244b32; }
/* Contadores mantêm a largura do número; o rótulo ocupa o espaço restante. */
.sidebar .nav-item .master-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; width: auto; padding: 3px 7px; border: 1px solid #d6ed8a; border-radius: 6px; background: #d6ed8a; color: #11352d; font-size: 12px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sidebar .nav-item.active .master-pill { background: #11352d; border-color: #11352d; color: #f5f9ec; }
.sidebar-bottom { width: 100%; min-width: 0; padding-top: 13px; }
.sidebar .sidebar-note { margin: 0 10px 12px; font-size: 12px; color: #cee0d2; }
.sidebar .note-tag { font-size: 11px; color: #bfd4c7; }
.sidebar .sidebar-user { margin: 0 -14px; padding: 15px 14px; gap: 9px; }
.sidebar-user > div:nth-child(2) { min-width: 0; flex: 1; }
.sidebar .sidebar-user strong { font-size: 13px; color: #f6faf7; overflow-wrap: anywhere; }
.sidebar .sidebar-user a { display: inline-block; font-size: 12px; color: #cedfd3; line-height: 1.4; }
.sidebar .sidebar-user > form { flex-shrink: 0; margin-left: 0; }
.sidebar .icon-button { min-width: 36px; min-height: 40px; }
.app-shell, .main, .card, .form-field, .two-column > * { min-width: 0; }
.page-heading p, .empty-state p, .auth-form > p, .password-card p { font-size: 14px; color: #52665a; }
.button, .small-button { font-size: 14px; min-height: 44px; }
.text-link, .text-button, .card-heading > .text-link, .section-links a { font-size: 13px; }
.breadcrumb, .breadcrumb strong { font-size: 13px; color: #435c4c; }
.local-indicator { font-size: 12px; color: #52665a; }
.eyebrow, .card-kicker { font-size: 11px; color: #506a57; }
.demo-label, .demo-label > span:last-child { font-size: 12px; color: #536443; }
.card-heading h2 { font-size: 18px; }
.card-heading p { font-size: 13px; color: #52665a; }
.stat > div { font-size: 13px; color: #52665a; }
.stat small { font-size: 12px; color: #52665a; white-space: normal; }
.person strong, .person small { font-size: 14px; }
.person small { font-size: 12px; color: #52665a; }
th, .portal-table th { font-size: 12px; color: #435b4a; }
td, .portal-table td { font-size: 14px; color: #334f3c; }
.table-scroll { max-width: 100%; }
.table-wrap { max-width: 100%; overflow-x: auto; }
label, .form-field label, .auth-form label { font-size: 14px; color: #344f3c; }
input, select, textarea { font-size: 15px; color: #233e35; min-width: 0; border-color: #9eafa3; }
input::placeholder { font-size: 14px; color: #627064; }
.filter-form input, .filter-form select { font-size: 14px; min-height: 42px; height: auto; }
.helptext, .form-help, .password-card ul { font-size: 12px; color: #52665a; }
.notice, .message, .amount-list > div { font-size: 14px; }
.notice { color: #465b35; }
.tag { font-size: 12px; line-height: 1.4; }
.timeline-step strong { font-size: 14px; color: #344f3c; }
.timeline-step small, .timeline-step p, .month-card > .text-link { font-size: 12px; color: #52665a; }
.activity-item strong, .attention-card strong, .distribution-item > div:first-child { font-size: 14px; }
.activity-item small, .attention-card p { font-size: 12px; color: #52665a; }
.hero-inner p { font-size: 13px; color: #d6e5da; }
.hero-period, .hero-pill, .hero-bottom { font-size: 11px; color: #d6e5da; }
.hero-inner .button { font-size: 14px; }
.footer { font-size: 12px; color: #52665a; }
.portal-account { font-size: 14px; }
.portal-account small { color: #d2e3d7; }
.portal-nav a { font-size: 14px; min-height: 44px; color: #355a42; }
.portal-hero p { font-size: 14px; color: #d6e5da; }
.portal-note, .portal-month small { font-size: 12px; color: #52665a; }
.portal-month { font-size: 14px; }
.portal-month.empty { color: #63705d; }
.portal-detail, .document-text { font-size: 15px; color: #334f3c; }
.portal-detail dt { color: #52665a; }
.portal-main .portal-footer { font-size: 12px; color: #52665a; }
.auth-hint { font-size: 12px; color: #52665a; }
.auth-form-footer { font-size: 11px; color: #52665a; }
.auth-form .reveal { font-size: 12px; color: #435b4a; }
.auth-form .button { font-size: 14px; }
@media (max-width: 1250px) { :root { --sidebar: 278px; } }
@media (max-width: 1050px) {
  .hero-inner p { max-width: 65%; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 800px) {
  .sidebar { width: min(304px, calc(100vw - 40px)); }
  .menu-open { overflow: hidden; }
  .menu-toggle { min-width: 40px; min-height: 44px; }
  .app-shell { margin-left: 0; }
  .portal-nav a { font-size: 14px; }
  .portal-months { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .row-actions .button, .page-heading > .button { font-size: 13px; min-height: 44px; white-space: normal; }
}
@media (max-width: 560px) {
  .local-indicator { display: none; }
  .demo-label { font-size: 12px; }
  .page-heading h1 { font-size: 28px; }
  .hero-inner h2 { max-width: 80%; }
  .hero-inner p { font-size: 13px; max-width: 70%; }
  .hero-illustration { opacity: .5; right: -35px; }
  .hero-bottom { font-size: 11px; }
  .card-heading { flex-wrap: wrap; }
  .portal-months { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .portal-month small { font-size: 11px; }
  input, select, textarea { font-size: 16px; }
}
@media (max-height: 620px) {
  .sidebar { padding-top: 14px; }
  .sidebar .workspace-label { margin-top: 18px; }
  .sidebar .sidebar-note { display: none; }
  .sidebar .sidebar-user { padding-top: 10px; padding-bottom: 10px; }
}

/* ===== Frente F (22/10/2026): contraste das etiquetas (U-13), checklist de admissão (U-08), busca (U-09/U-11), diálogo e cartões ===== */
/* Etiquetas medidas (WCAG): neutra #4f5a48/#f0f2e9 = 6,43:1; alerta #6a5118/#f8f0da = 6,59:1; sucesso #3f5a2c/#edf4e2 = 7,2:1. */
.tag.neutral { color: #4f5a48; }
.tag.warning { color: #6a5118; }
.tag.success { color: #3f5a2c; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Menu em grupos recolhíveis */
.sidebar .nav-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.sidebar .nav-group > summary::-webkit-details-marker { display: none; }
.sidebar .nav-group > summary:focus-visible { outline: 2px solid #f5f9ec; outline-offset: -2px; border-radius: 6px; }
.sidebar .nav-caret { transition: transform .15s; font-size: 14px; }
.sidebar .nav-group:not([open]) .nav-caret { transform: rotate(-90deg); }
/* Busca global no topo */
.global-search { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 320px; max-width: 460px; }
.global-search .icon { width: 18px; height: 18px; color: #52665a; flex-shrink: 0; }
.global-search input { width: 100%; min-height: 40px; border: 1px solid #c9d3cb; border-radius: 9px; padding: 6px 12px; background: #fff; font-size: 14px; }
.global-search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; max-height: 70vh; overflow: auto; padding: 6px; border: 1px solid #94aaa1; border-radius: 10px; background: #fff; box-shadow: 0 10px 26px #143e3526; }
.global-search-results[hidden] { display: none; }
.global-search-group { padding: 8px 10px 4px; font-size: 11px; letter-spacing: 1px; color: #506a57; font-weight: 650; text-transform: uppercase; }
.global-search-results [role=option] { display: block; padding: 10px 12px; border-radius: 6px; color: #173f35; font-size: 14px; line-height: 1.4; }
.global-search-results [role=option] small { display: block; color: #52665a; font-size: 12px; }
.global-search-results [role=option]:hover, .global-search-results [aria-selected=true] { background: #e9f2c9; }
.topbar-right { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
/* Seletor de pessoa (U-09) */
.person-picker { position: relative; min-width: 0; }
.person-picker input { width: 100%; }
.person-options { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; max-height: 260px; overflow: auto; margin-top: 5px; padding: 5px; border: 1px solid #94aaa1; border-radius: 10px; background: #fff; box-shadow: 0 10px 26px #143e3526; }
.person-options[hidden] { display: none; }
.person-options [role=option] { padding: 10px 12px; min-height: 44px; cursor: pointer; border-radius: 6px; color: #173f35; font-size: 15px; line-height: 1.4; }
.person-options [role=option] small { display: block; color: #52665a; font-size: 12px; }
.person-options [role=option]:hover, .person-options [aria-selected=true] { background: #e9f2c9; }
.person-search-status, .cep-status { display: block; margin: 6px 0 0; color: #435e53; font-size: 13px; line-height: 1.5; }
/* Formulário de admissão (U-08) */
.required-field > label::after { content: " *"; color: #9c4f41; font-weight: 700; }
.required-mark { color: #9c4f41; font-weight: 700; }
.form-legend { font-size: 12px; color: #52665a; margin: 8px 0 0; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: #9c4f41; }
.form-field .errorlist { margin: 6px 0 0; padding: 0; list-style: none; color: #8a3f32; font-size: 13px; }
.message.error ul { margin: 8px 0 0 18px; padding: 0; }
.message.error a { text-decoration: underline; }
.employee-form .form-field[hidden] { display: none; }
.admission-checklist { margin-bottom: 24px; }
.checklist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e3e9dd; border-radius: 10px; background: #fff; }
.checklist li.done { background: #f3f7ea; border-color: #d7e5c0; }
.checklist li > div { flex: 1 1 auto; min-width: 0; }
.checklist li small { color: #52665a; }
.checklist .check-mark { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; flex-shrink: 0; background: #edf1e6; color: #52665a; }
.checklist li.done .check-mark { background: #d6ed8a; color: #11352d; }
/* Diálogo de confirmação (U-13) */
.confirm-dialog { width: min(480px, calc(100vw - 36px)); padding: 26px; border: 1px solid #ccd7c4; border-radius: 18px; color: #233e35; background: #fff; box-shadow: 0 24px 80px #102b3040; }
.confirm-dialog::backdrop { background: #102b3066; }
.confirm-dialog h2 { font-size: 19px; margin-bottom: 8px; }
.confirm-dialog p { font-size: 15px; color: #52665a; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
/* Prévia da importação (U-10) */
.diff-list { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; }
.diff-list del { color: #8a3f32; }
.diff-list ins { color: #2e6c48; text-decoration: none; font-weight: 600; }
/* Tabelas viram cartões abaixo de 800 px (U-13) */
@media (max-width: 800px) {
  .table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border: 1px solid #e3e9dd; border-radius: 12px; background: #fff; margin: 0 0 12px; padding: 6px 0; }
  .table-cards td { display: flex; justify-content: space-between; gap: 12px; align-items: start; padding: 8px 14px; border: 0; text-align: right; }
  .table-cards td::before { content: attr(data-label); font-size: 12px; color: #52665a; font-weight: 600; text-align: left; flex: 0 0 38%; }
  .table-cards td[colspan] { display: block; text-align: left; }
  .table-cards td[colspan]::before { content: none; }
  .table-cards td[data-label="Ações"], .table-cards td[data-label="Conferência"], .table-cards td:last-child { justify-content: flex-end; }
  .table-cards .person { text-align: left; }
  .global-search { max-width: none; }
  .topbar { height: auto; min-height: 62px; flex-wrap: wrap; gap: 8px; padding: 8px 18px; }
}
@media (max-width: 560px) { .global-search input { font-size: 14px; } }

/* Protocolos completos preservam o UUID e quebram no resultado estreito. */
.global-search-results [role=option]{overflow-wrap:anywhere}

.auth-alt { margin: 18px 0 0; font-size: 12px; }
.auth-alt a { color: #4a6d43; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.admission-checklist .checklist li{flex-wrap:wrap}.admission-checklist .checklist li>.admission-actions{flex:0 0 auto;display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}.admission-checklist>details>summary{cursor:pointer;line-height:1.6}.admission-checklist>details[open]>summary{margin-bottom:1rem}
@media(max-width:640px){.admission-checklist .checklist li>.admission-actions{margin-left:38px;flex-basis:calc(100% - 38px)}.admission-checklist .checklist li>div:not(.admission-actions){flex:1 1 0}.admission-checklist .checklist li>.admission-actions:empty{display:none}}

/* Paginação compartilhada: os módulos não dependem da folha de estilo do ponto. */
.clock-pager{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:16px 0;font-size:14px}
.clock-pager>span{min-width:0;margin-right:auto;color:var(--muted,#61746f);line-height:1.5}
.clock-pager>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid var(--line,#dfe9e5);border-radius:8px;text-decoration:none;background:var(--white,#fff)}
.clock-pager>a:hover{background:var(--soft,#f1f6f3)}
.clock-pager>a:focus-visible{outline:3px solid var(--lime,#cfe789);outline-offset:2px}
@media(max-width:560px){.clock-pager>span{flex:1 0 100%}}
@media print{.clock-pager{display:none}}
@media(max-width:800px){.table-cards th,.table-cards td{white-space:normal;overflow-wrap:anywhere}}
