:root{--bg: #f4f6f8;--surface: #ffffff;--border: #dde2e7;--text: #1f2a37;--text-muted: #667085;--primary: #0f5c9c;--primary-dark: #0b4677;--danger: #c0362c;--success: #1c7c4c;--radius: 6px}*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px}button{font-family:inherit;cursor:pointer}input,select,textarea{font-family:inherit;font-size:14px}.app-shell{display:flex;height:100vh}.sidebar{width:220px;background:#10233a;color:#cfe0f2;display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto}.brand{padding:20px;display:flex;justify-content:center}.brand-logo{max-width:100%;height:auto;border-radius:4px}.sidebar nav{display:flex;flex-direction:column;gap:4px;padding:8px;flex:1}.sidebar-footer{flex-shrink:0;padding:10px 16px;font-size:11px;color:#ffffff73;text-align:center;border-top:1px solid rgba(255,255,255,.1)}.nav-grupo{display:flex;flex-direction:column}.nav-grupo-titulo{display:flex;align-items:center;justify-content:space-between;text-align:left;background:#ffffff1a;border:none;border-left:3px solid var(--primary);color:#fff;font-size:12px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase;padding:10px 12px;border-radius:4px;cursor:pointer}.nav-grupo-titulo:hover{background:#ffffff2e}.nav-grupo-seta{display:inline-block;transition:transform .15s ease}.nav-grupo-seta.aberta{transform:rotate(90deg)}.nav-grupo-itens{display:flex;flex-direction:column;gap:3px;padding:4px 0 4px 10px}.nav-link{background:#ffffffeb;color:#1f2a37;text-decoration:none;padding:9px 14px;border-radius:var(--radius);font-weight:500}.nav-link:hover{background:#fff}.nav-link.active{background:var(--primary);color:#fff;font-weight:600}.main-area{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}.topbar{background:var(--surface);border-bottom:1px solid var(--border);padding:12px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px;flex-shrink:0}.content{flex:1;min-height:0;padding:24px;overflow:auto}.content>div{height:100%;min-height:0;display:flex;flex-direction:column}.content>div>*:not(.table-wrap){flex-shrink:0}.login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0f5c9c,#10233a)}.login-card{background:var(--surface);padding:32px;border-radius:8px;width:340px;box-shadow:0 10px 30px #0003}.login-logo-wrap{display:flex;justify-content:center;margin-bottom:20px}.login-logo{max-width:220px;height:auto;background:#fff;border-radius:6px}.login-card h1{margin:0 0 4px;font-size:22px;text-align:center}.login-card p{margin:0 0 20px;color:var(--text-muted);text-align:center}.field{display:flex;flex-direction:column;gap:4px;margin-bottom:14px}.field label{font-weight:600;font-size:13px}.field input,.field select,.field textarea{padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius);background:#fff}.combobox-lista{position:absolute;top:calc(100% + 2px);left:0;right:0;z-index:20;max-width:100%;max-height:260px;overflow-x:hidden;overflow-y:auto;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 8px 20px #0000001f}.combobox-item{padding:8px 10px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.combobox-item:hover{background:#eef2f6}.combobox-vazio{color:var(--text-muted);cursor:default}.combobox-vazio:hover{background:none}.field-count{padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;font-weight:700;text-align:center;min-width:56px}.btn{background:var(--primary);color:#fff;border:none;padding:9px 16px;border-radius:var(--radius);font-weight:600}.btn:hover{background:var(--primary-dark)}.btn:disabled{opacity:.6;cursor:not-allowed}.btn-secondary{background:#fff;color:var(--primary);border:1px solid var(--primary)}.btn-danger{background:var(--danger)}.btn-small{padding:4px 10px;font-size:12px}.btn-link{background:none;border:none;color:var(--primary);font-weight:600}.btn-historico{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:#fff;border:1px solid var(--border);border-radius:50%;color:var(--text-muted);flex-shrink:0}.btn-historico:hover{background:#eef2f6;color:var(--primary);border-color:var(--primary)}.error-msg{background:#fdeceb;color:var(--danger);padding:8px 12px;border-radius:var(--radius);margin-bottom:12px;font-size:13px}.presenca-indicador{position:fixed;right:16px;bottom:16px;display:inline-block;background:#eef2f6;color:var(--text-muted);padding:4px 10px;border-radius:12px;font-size:12px;box-shadow:0 1px 4px #0f172a26;z-index:30;cursor:pointer}.presenca-popover{position:absolute;right:0;min-width:140px;max-width:220px;background:var(--surface);border-radius:10px;box-shadow:0 4px 16px #0f172a2e;padding:10px 12px;z-index:31;cursor:default}.presenca-popover--abaixo{top:calc(100% + 8px)}.presenca-popover--acima{bottom:calc(100% + 8px)}.presenca-popover-item{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--text);word-break:break-word}.presenca-popover-item+.presenca-popover-item{margin-top:8px}.presenca-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;flex-shrink:0}.success-msg{background:#eaf7ef;color:var(--success);padding:8px 12px;border-radius:var(--radius);margin-bottom:12px;font-size:13px}.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-wrap:wrap;gap:10px}.page-header h2{margin:0}.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:16px}.card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:16px}table{width:100%;border-collapse:collapse;background:var(--surface)}th,td{padding:8px 10px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap}th{position:sticky;top:0;z-index:2;background:#eef2f6;font-size:12px;text-transform:uppercase;color:var(--text-muted)}tbody tr:hover{background:#f8fafc}.table-wrap{flex:1;min-height:0;overflow-x:auto;overflow-y:auto;border:1px solid var(--border);border-radius:8px}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;z-index:50}.modal{background:#fff;border-radius:8px;width:520px;max-width:92vw;max-height:88vh;overflow:auto;padding:24px}.modal h3{margin-top:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.form-grid .field.full{grid-column:1 / -1}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.badge{display:inline-block;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;background:#eef2f6;color:var(--text-muted)}.badge.ativo{background:#eaf7ef;color:var(--success)}.badge.demitido{background:#fdeceb;color:var(--danger)}.badge.afastado{background:#fdf6e3;color:#9a6b00}.empty-state{text-align:center;color:var(--text-muted);padding:40px}.import-report ul{max-height:200px;overflow:auto;padding-left:18px}.histograma-table{border-collapse:separate;border-spacing:0}.histograma-table td,.histograma-table th{white-space:nowrap;font-size:12px;padding:4px 6px}.histograma-table td.celula{cursor:pointer;min-width:60px}.histograma-table td.celula.vazia{background:#fdeceb}.histograma-table td.celula:hover{outline:2px solid var(--primary);outline-offset:-2px}.histograma-table td.celula.fora-periodo{background:#eef0f2;color:var(--text-muted);font-style:italic;cursor:default}.histograma-table td.celula.fora-periodo:hover{outline:none}.celula-badges{display:flex;flex-wrap:wrap;gap:3px}.badge-ss{display:inline-block;padding:1px 5px;border-radius:4px;font-size:11px;line-height:1.5}.badge-ss.principal{background:#fff3cd;color:#7a5b00;font-weight:700}.badge-ss.paralela{background:#eef2f6;color:var(--text-muted);cursor:pointer}.badge-ss.paralela:hover{background:#dde7f0;color:var(--primary-dark)}.histograma-table th.freeze,.histograma-table td.freeze{position:sticky;z-index:1;background:var(--surface)}.histograma-table th.freeze{background:#eef2f6;z-index:3}.histograma-table .freeze-base{left:0}.histograma-table .freeze-funcao{box-shadow:3px 0 4px -2px #00000026}.perm-matrix td,.perm-matrix th{text-align:center}.perm-matrix td:first-child,.perm-matrix th:first-child{text-align:left}
