.form-catalog{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px}
.template-card{padding:18px;display:flex;flex-direction:column;gap:10px}
.template-card p{font-size:14px;line-height:1.7;margin:0;flex:1}
.template-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.template-field{border:1px solid var(--l,#ddd);padding:14px;margin-bottom:12px;border-radius:10px}
.employee-search,.hr-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:end}
.field label{line-height:1.5}
.field input,.field select,.field textarea{max-width:100%;box-sizing:border-box}
dialog{max-height:88vh;overflow-y:auto;max-width:min(960px,calc(100vw - 28px))}
#dlg{width:min(960px,94vw);max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);padding:0;overflow:hidden}
#dlg[open]{display:flex;flex-direction:column}
#dlg .dialog-header,#dlg .dialog-actions{display:flex;align-items:center;gap:12px;flex-shrink:0;background:#fff;padding:14px 20px}
#dlg .dialog-header{border-bottom:1px solid var(--l);justify-content:space-between}
#dlg .dialog-header h3{margin:0;font-size:18px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
#dlg .dialog-header h3:focus{outline:none}
#dlg .dialog-close{min-width:42px;min-height:42px;font-size:23px;flex-shrink:0}
#dlg #db{min-height:0;overflow-y:auto;overscroll-behavior:contain;flex:1 1 auto;padding:16px 20px;scrollbar-gutter:stable}
#dlg .dialog-actions{border-top:1px solid var(--l);padding-bottom:max(14px,env(safe-area-inset-bottom))}
#dlg .dialog-actions button{min-height:44px;min-width:110px}
#dlg .dialog-error{flex-shrink:0;background:#fff1ee;color:#7b2d23;border:1px solid #dfb2a9;border-radius:8px;padding:10px 14px;margin:10px 20px 0;overflow-wrap:anywhere}
#dlg .dialog-error[hidden]{display:none}
#dlg[aria-busy=true]{cursor:progress}
.employee-view-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
@media(max-width:600px){#dlg{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}#dlg .dialog-header,#dlg .dialog-actions{padding-inline:14px}#dlg #db{padding:14px}#dlg .dialog-actions button{flex:1;min-width:0}#dlg .dialog-header h3{font-size:16px}.employee-view-note .btn{width:100%}}
@media(max-width:600px){.form-catalog{grid-template-columns:1fr}.template-actions .btn,.template-actions .btn2{flex:1}.template-field{grid-template-columns:1fr}}

.shift-days{border:1px solid #d7c9b1;border-radius:10px;padding:12px;display:flex;flex-wrap:wrap;gap:12px}.shift-days legend{padding:0 6px}.shift-days label{display:flex;align-items:center;gap:6px;min-height:44px}.shift-days .sub{flex-basis:100%}#workSchedules{margin-bottom:28px}#workSchedules .panel{overflow-x:auto}

[hidden]{display:none!important}
.attendance-policy{border-block-start:1px solid #ddd;margin-top:16px;padding-top:12px}
