/* Shared popup chrome for Bootstrap and native dialogs. Local content grids and widths remain intact. */
:root{--popup-radius:18px;--popup-space:22px;--popup-font-size:14px;--popup-title-size:16px}
@keyframes popupReveal{from{opacity:0;transform:translate3d(0,10px,0) scale(.975)}to{opacity:1;transform:translate3d(0,0,0) scale(1)}}
html body :is(dialog,.modal-content){border:1px solid var(--ui-border,#e5edf8)!important;border-radius:var(--popup-radius)!important;background:var(--bg-card,#fff)!important;color:var(--text-primary,#1e293b)!important;font-family:var(--app-font,inherit)!important;font-size:var(--popup-font-size)!important;line-height:1.5;box-shadow:0 24px 64px rgba(15,23,42,.2),0 6px 18px rgba(15,23,42,.08)!important}
html body dialog{box-sizing:border-box;max-width:calc(100vw - 24px)!important;max-height:90dvh!important;overflow:auto}
html body dialog[open]{animation:popupReveal .24s var(--ui-ease,cubic-bezier(.22,1,.36,1)) both}
html body .modal.show .modal-dialog{animation:popupReveal .24s var(--ui-ease,cubic-bezier(.22,1,.36,1)) both}
html body dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
html body .modal-backdrop{background:#0f172a}
html body .modal-backdrop.show{opacity:.48}
html body :is(dialog,.modal-content) :is(.modal-header,.profile-picture-heading,.action-confirmation-heading),html body dialog>header,html body #employee-account-dialog>.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--ui-border,#e5edf8)!important;background:linear-gradient(110deg,rgba(var(--primary-rgb),.07),rgba(var(--primary-rgb),.015)),var(--bg-card,#fff)!important;color:var(--text-primary,#0f172a)!important;padding:16px var(--popup-space)!important;border-radius:var(--popup-radius) var(--popup-radius) 0 0;z-index:5}
html body :is(dialog,.modal-content) :is(.modal-title,h2),html body dialog>header>strong{font-family:inherit!important;font-size:var(--popup-title-size)!important;font-weight:700!important;line-height:1.4!important;margin:0;color:var(--text-primary,#0f172a)!important}
html body :is(dialog,.modal-content) :is(.modal-body){padding:var(--popup-space)}
html body :is(dialog,.modal-content) :is(.modal-footer,.action-confirmation-buttons,.cell-save-footer){display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;border-top:1px solid var(--ui-border,#e5edf8);padding:14px var(--popup-space);background:var(--ui-surface-subtle,#fafcff)!important;border-radius:0 0 var(--popup-radius) var(--popup-radius);z-index:4}
html body :is(dialog,.modal-content) :is(label,.form-label){font-family:inherit;font-size:13px;font-weight:600;color:var(--text-secondary,#475569)}
html body :is(dialog,.modal-content) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){font-family:inherit;font-size:13.5px;line-height:1.5;border:1px solid var(--ui-border-input,#d9e3f0);border-radius:10px;color:var(--text-primary,#0f172a);transition:border-color .16s ease,box-shadow .16s ease}
html body :is(dialog,.modal-content) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea):focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-ring,rgba(var(--primary-rgb),.14))}
html body :is(dialog,.modal-content) :is(.btn,.cell-primary,.secondary,.action-confirmation-buttons button){font-family:inherit!important;font-size:13px!important;font-weight:600;line-height:1.5;border-radius:10px;transition:transform .18s var(--ui-ease,ease),box-shadow .18s ease,background-color .16s ease}
html body :is(dialog,.modal-content) :is(.btn-primary,.cell-primary,[data-confirmation-accept]){background:var(--primary-gradient,var(--primary))!important;color:var(--brand-on-primary,#fff)!important;border-color:transparent!important}
html body :is(dialog,.modal-content) :is(.btn-close,[aria-label^="Close"]){box-sizing:border-box;flex:none;width:32px!important;height:32px!important;padding:6px!important;margin:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border,#e5edf8)!important;border-radius:9px!important;color:var(--text-secondary,#64748b)!important;background-color:rgba(var(--primary-rgb),.05)!important;box-shadow:none!important;opacity:1;filter:none;transition:background-color .16s ease,border-color .16s ease,transform .16s ease}
html body :is(dialog,.modal-content) :is(.btn-close,[aria-label^="Close"]):hover{background-color:rgba(var(--primary-rgb),.11)!important;border-color:var(--primary-border)!important;transform:scale(1.04)}
html body dialog [aria-label^="Close"]{font-size:22px!important;line-height:1!important}
html body :is(dialog,.modal-content) :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--primary);outline-offset:2px}
@media(max-width:575px){:root{--popup-space:15px;--popup-title-size:15px;--popup-radius:14px}html body .modal-dialog{margin:12px}html body :is(dialog,.modal-content) :is(input,select,textarea){max-width:100%}}
@media(prefers-reduced-motion:reduce){html body dialog[open],html body .modal.show .modal-dialog{animation:none!important}}
/* Attendance content uses the same avatar and status components as the sheet. */
.attendance-person-summary{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--ui-border,#e5edf8);border-radius:12px;background:rgba(var(--primary-rgb),.04);margin-bottom:16px}
.attendance-person-summary .profile-avatar{width:44px;height:44px;flex:none}
.attendance-person-summary h3{font-size:16px!important;margin:0!important}.attendance-person-summary p{margin:4px 0 0}
.attendance-person-status{margin-left:auto;border-left:1px solid var(--ui-border,#e5edf8);padding-left:18px}.attendance-person-status small{display:block;margin-bottom:5px}
html body .attendance-dialog .cell-comment{border-color:var(--primary);background:rgba(var(--primary-rgb),.04)}
@media(max-width:480px){.attendance-person-summary{flex-wrap:wrap}.attendance-person-status{margin-left:0;padding:8px 0 0;border-left:0;width:100%}}
