body[data-screen="panel"] .employee-editor-dialog{width:min(1060px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #cfdbea;border-radius:18px;color:#173e75;background:#f5f7fb;box-shadow:0 20px 90px #071b3b55;overflow:auto}
.employee-editor-dialog::backdrop{background:#06182b99;backdrop-filter:blur(2px)}
.employee-editor-heading{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:20px 24px;background:#fff;border-bottom:1px solid #dce5f0}
.employee-editor-heading>div>span{font-size:10px;letter-spacing:1.5px;text-transform:uppercase;color:#7387a6}.employee-editor-heading h2{margin:6px 0;font-size:23px;color:#173e75}.employee-editor-heading p{font-size:12px;margin:0;color:#647b9d}.employee-editor-heading>button{padding:7px 12px;min-height:34px;font-size:22px;line-height:1}
.employee-editor-body{padding:20px 24px}.employee-editor-feedback{padding:13px 16px;margin-bottom:18px;background:#eaf6ee;border:1px solid #b9d8c4;border-radius:10px;color:#185938;font-size:13px;line-height:1.5;white-space:pre-wrap}.employee-editor-feedback[data-tone="error"]{background:#fff0ef;border-color:#ebc5c0;color:#95372e}.employee-editor-feedback[data-tone="warning"]{background:#fff7e8;border-color:#ebd5aa;color:#805b18}.employee-editor-feedback[data-tone="pending"]{background:#edf3fc;border-color:#cbdcf5;color:#173e75}
.employee-editor-management{padding:16px 18px;margin-bottom:20px;border:1px solid #d9e4f0;border-radius:12px;background:#fff}.employee-editor-management h3{margin:0;font-size:14px}.employee-editor-management p{font-size:11px;margin:6px 0 12px;color:#687f9e}.employee-editor-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.employee-editor-actions button{font-size:11px;min-height:34px;padding:9px 12px}
.employee-editor-form{max-width:none}.employee-editor-form>fieldset{min-width:0;padding:0;border:0;margin:0}.employee-editor-identity{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.employee-editor-dialog label{font-size:12px}.employee-editor-dialog input,.employee-editor-dialog select{padding:10px 12px}.employee-editor-dialog small{font-size:11px;line-height:1.6}.employee-editor-dialog .toolbar{gap:8px;margin:12px 0}.employee-editor-dialog .toolbar button{min-height:36px;padding:10px 14px;font-size:12px}.employee-editor-photo{padding-top:18px;margin-top:18px;border-top:1px solid #dce5f0}.employee-editor-photo h3{font-size:15px;margin:0 0 13px}.employee-editor-photo video,.employee-editor-photo .preview{max-height:300px;width:auto;max-width:100%;object-fit:contain}.employee-editor-photo p{font-size:12px;color:#657d9f}
.employee-editor-footer{position:sticky;bottom:-20px;display:flex;justify-content:flex-end;gap:10px;margin:20px -24px -20px;padding:15px 24px;border-top:1px solid #dce5f0;background:#fff;z-index:4}.employee-editor-footer button{font-size:12px;min-height:40px;padding:11px 18px}.employee-editor-recognition{margin-top:22px;padding:18px;background:#fff;border:1px solid #d9e4f0;border-radius:12px}.employee-editor-recognition h3{margin-top:0;font-size:16px}
@media(max-width:700px){body[data-screen="panel"] .employee-editor-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:13px}.employee-editor-heading{padding:16px}.employee-editor-body{padding:16px}.employee-editor-identity{grid-template-columns:1fr;gap:0}.employee-editor-heading h2{font-size:20px}.employee-editor-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.employee-editor-actions button{white-space:normal;text-align:center}.employee-editor-footer{bottom:-16px;margin:18px -16px -16px;padding:12px 16px}.employee-editor-form .grid{grid-template-columns:1fr}}
/* v88: Both tabs share one form, preserving drafts and the existing schedule controls. */
body[data-screen="panel"] .employee-editor-form .employee-editor-tabs{display:flex;flex-wrap:wrap;gap:6px;padding:0 0 12px;margin:0 0 16px;border-bottom:1px solid var(--line,#cfdbea)}
body[data-screen="panel"] .employee-editor-form .employee-editor-tabs>button[role="tab"]{flex:0 1 auto;min-height:40px;padding:9px 16px;background:var(--surface,#fff);border:1px solid var(--line,#cfdbea);border-radius:7px;color:var(--ink,#20313b);font-weight:600}
body[data-screen="panel"] .employee-editor-form .employee-editor-tabs>button[role="tab"][aria-selected="true"]{background:var(--accent-soft,#eef8f9);border-color:var(--theme-link,#058194);color:var(--theme-link,#058194)}
body[data-screen="panel"] .employee-editor-form .employee-editor-tabs>button[role="tab"]:hover:not(:disabled){background:var(--accent-soft,#eef8f9);border-color:var(--theme-link,#058194);color:var(--theme-link,#058194)}
body[data-screen="panel"] .employee-editor-form [role="tabpanel"][hidden]{display:none!important}
body[data-screen="panel"] .employee-editor-form .employee-editor-personal-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.52fr);gap:22px;align-items:start}
body[data-screen="panel"] .employee-editor-form .employee-editor-identity{min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
body[data-screen="panel"] .employee-editor-identity>label{min-width:0;margin:0}
body[data-screen="panel"] .employee-editor-identity>label>input,body[data-screen="panel"] .employee-editor-identity>label>select{margin-top:5px;min-width:0}
body[data-screen="panel"] .employee-editor-form .employee-editor-personal-layout .employee-editor-photo{min-width:0;padding:0 0 0 20px;margin:0;border-top:0;border-left:1px solid var(--line,#cfdbea)}
body[data-screen="panel"] .employee-editor-personal-layout .employee-editor-photo .preview{width:100%;max-height:260px;object-fit:contain;margin:12px 0;background:var(--surface-alt,#f5f7fb)}
body[data-screen="panel"] .employee-editor-personal-layout .employee-editor-photo video{width:100%;max-height:260px}
body[data-screen="panel"] .employee-editor-personal-layout .employee-editor-photo input[type="file"]{width:100%;font-size:calc(10px * var(--font-scale,1));overflow:hidden}
body[data-screen="panel"] .employee-editor-personal-layout .employee-editor-photo label{margin-top:0}
body[data-screen="panel"] .employee-editor-personal-layout .employee-editor-photo .toolbar{flex-wrap:wrap}
body[data-screen="panel"] .employee-editor-personal-layout small{display:block;margin-top:9px}
body[data-screen="panel"] .employee-editor-form .employee-editor-active{margin:12px 0 0}
body[data-screen="panel"] .employee-editor-form .employee-editor-management{margin:18px 0 0}
body[data-screen="panel"] .employee-editor-load{margin:0 0 16px;padding:12px 14px;border:1px solid var(--line,#cfdbea);border-radius:8px;background:var(--surface-alt,#f5f7fb)}
body[data-screen="panel"] .employee-editor-load>p{margin:0;color:var(--muted,#647b9d)}
body[data-screen="panel"] .employee-editor-load>button{margin-top:10px}
body[data-screen="panel"] .employee-editor-archive-history{margin-top:18px;padding:15px 18px;border:1px solid var(--line,#cfdbea);border-radius:9px;background:var(--surface,#fff)}
body[data-screen="panel"] .employee-editor-archive-history>h3{margin:0 0 12px}
body[data-screen="panel"] .employee-editor-archive-history ol{list-style:none;margin:0;padding:0}
body[data-screen="panel"] .employee-editor-archive-history li{padding:12px 0;border-top:1px solid var(--line,#cfdbea)}
body[data-screen="panel"] .employee-editor-archive-history li:first-child{border-top:0;padding-top:0}
body[data-screen="panel"] .employee-editor-archive-history li:last-child{padding-bottom:0}
body[data-screen="panel"] .employee-editor-archive-history li>div{display:flex;flex-wrap:wrap;gap:4px 12px;justify-content:space-between}
body[data-screen="panel"] .employee-editor-archive-history li p{margin:7px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
body[data-screen="panel"] .employee-editor-history-warning{color:var(--ui-warning-text,#805b18)}
@media(max-width:820px){body[data-screen="panel"] .employee-editor-form .employee-editor-personal-layout{grid-template-columns:1fr}body[data-screen="panel"] .employee-editor-form .employee-editor-personal-layout .employee-editor-photo{padding:18px 0 0;border-left:0;border-top:1px solid var(--line,#cfdbea)}body[data-screen="panel"] .employee-editor-personal-layout .employee-editor-photo .preview,body[data-screen="panel"] .employee-editor-personal-layout .employee-editor-photo video{width:auto;max-width:100%}}
@media(max-width:560px){body[data-screen="panel"] .employee-editor-form .employee-editor-identity{grid-template-columns:1fr}body[data-screen="panel"] .employee-editor-form .employee-editor-tabs>button[role="tab"]{flex:1 1 0;padding:9px 8px;min-width:0}body[data-screen="panel"] .employee-editor-archive-history{padding:13px}}
/* Keep both footer actions inside the visible dialog on long personal forms. */
body[data-screen="panel"] .employee-editor-dialog .employee-editor-footer{bottom:0}

body[data-screen="panel"] .employee-registration{margin:18px 0 0;padding:16px 18px;border:1px solid var(--line,#cfdbea);border-radius:9px;background:var(--surface,#fff)}
.employee-registration h3{font-size:14px;margin:0 0 8px}.employee-registration p{font-size:12px;overflow-wrap:anywhere}.employee-registration [data-error="true"]{color:var(--ui-danger-text,#b4232f)}
body[data-screen="panel"] .employee-registration-viewer{width:min(1100px,calc(100vw - 24px));height:min(900px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--line,#cfdbea);border-radius:12px;background:var(--surface,#fff);color:var(--ink,#20313b)}
.employee-registration-viewer::backdrop{background:#06182baa;backdrop-filter:blur(2px)}.employee-registration-viewer[open]{display:flex;flex-direction:column}.employee-registration-viewer header{padding:15px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line,#cfdbea)}.employee-registration-viewer header h2{font-size:18px;margin:0 0 5px}.employee-registration-viewer header p{font-size:12px;margin:0 0 4px}.employee-registration-viewer header small{font-size:11px;overflow-wrap:anywhere}.employee-registration-viewer iframe{width:100%;flex:1;min-height:200px;border:0;background:#e7e7e7}.employee-registration-viewer [data-pdf-status]{margin:0;padding:12px 20px;font-size:12px}.employee-registration-viewer [data-pdf-status]:empty{display:none}.employee-registration-viewer footer{padding:12px 20px;display:flex;justify-content:flex-end;align-items:center;gap:16px;border-top:1px solid var(--line,#cfdbea)}.employee-registration-viewer footer a{font-size:12px}.employee-registration-viewer [hidden]{display:none!important}
body[data-screen="panel"] .employee-registration-viewer>header{background:var(--surface,#fff);color:var(--ink,#20313b)}body[data-screen="panel"] .employee-registration-viewer>header h2{color:var(--ink,#20313b)}body[data-screen="panel"] .employee-registration-viewer>footer{background:var(--surface,#fff);color:var(--ink,#20313b)}
