.sidebar .brand { flex-direction: column; align-items: stretch; text-align: center; gap: 10px; }
.sidebar .brand .brand-mark.uploaded-brand-mark { width: 100%; height: auto; border-radius: 0; background: transparent !important; box-shadow: none; }
.sidebar .brand .brand-mark img { display: block; width: 100%; height: auto; max-height: 180px; object-fit: contain; }
.sidebar .brand > div:last-child b { font-size: 19px; }
.sidebar .brand small { display: block; line-height: 1.5; }
.select-menu[popover] { position: fixed !important; inset: auto; right: auto !important; bottom: auto !important; margin: 0 !important; padding: 0; z-index: 1000; border: 1px solid #d9cbe9; background: #fff; color: #40314e; border-radius: 11px; box-shadow: 0 14px 40px #28183d30; transform: none !important; opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; max-width: calc(100vw - 16px); }
.searchable-select > .select-menu { display: none; }
.searchable-select.is-open > .select-menu { display: flex; flex-direction: column; }
.select-menu[popover] .select-menu-search { flex: none; min-height: 41px; padding: 7px 10px; }
.select-menu[popover] .select-options { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.select-menu[popover] .select-option { width: 100%; white-space: normal; text-align: left; }
.select-menu[popover] .select-option[hidden], .select-empty[hidden] { display: none !important; }
.select-empty { padding: 12px; margin: 0; color: #8d7c9e; font-size: 12px; }
.select-trigger .select-current { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body:has(#modal-root .modal) { overflow: hidden; }
.modal.form-modal { width: min(720px, 100%); height: auto; max-height: calc(100dvh - 20px); }
.form-modal .modal-body { flex: 0 1 auto; overflow: auto; padding: 17px 20px; }
.form-modal #modal-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.form-modal #form-error:empty { display: none; }
.form-modal .form-grid { gap: 11px 16px; }
.form-modal .field { margin: 0; gap: 5px; }
.form-modal .field input, .form-modal .select-trigger { min-height: 37px; padding: 8px 10px; }
.form-modal .modal-foot { position: static; margin: 0; padding: 12px 0 0; flex: none; background: transparent; }
.form-modal .notice { margin: 0; }
.form-modal .modal-error { padding: 8px 11px; margin: 0; }
.boot { gap: 13px; text-align: center; padding: 24px; }
.boot-brand { width: min(220px, 60vw); height: 130px; display: flex; align-items: center; justify-content: center; }
.boot-brand img { width: 100%; height: 100%; object-fit: contain; animation: brand-breathe 1.8s ease-in-out infinite; }
.boot h2 { font-size: 22px; }
.boot p { color: #8b7c9a; font-size: 13px; }
.loading-track { width: 150px; height: 4px; overflow: hidden; background: #e9e1f3; border-radius: 5px; }
.loading-track:after { content: ''; display: block; width: 45%; height: 100%; background: linear-gradient(90deg,#8a62d4,#f47b56); border-radius: 5px; animation: loading-slide 1.2s ease-in-out infinite; }
.workspace-loading { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; align-items: center; gap: 10px; padding: 8px 16px; border: 1px solid #e4d9ef; border-radius: 12px; background: #ffffffed; box-shadow: 0 7px 26px #30184020; font-size: 12px; color: #655076; pointer-events: none; }
.workspace-loading[hidden] { display: none; }
.workspace-loading img { width: 34px; height: 32px; object-fit: contain; }
.loading-dot { width: 15px; height: 15px; border: 2px solid #e7dfee; border-top-color: #8057c9; border-radius: 50%; animation: loading-spin .65s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@keyframes loading-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(340%); } }
@keyframes brand-breathe { 50% { opacity: .6; transform: scale(.98); } }
@media (max-width: 700px) {
    .form-modal .modal-body { padding: 12px; }
    .form-modal .modal-head { padding: 12px 14px; }
    .form-modal .modal-head h2 { font-size: 17px; }
    .form-modal #modal-form { gap: 9px; }
    .form-modal .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .form-modal .field input, .form-modal .select-trigger { min-height: 35px; font-size: 13px; }
    .form-modal .modal-foot .btn { flex: 1; }
    .select-menu[popover] .select-menu-input { font-size: 16px !important; }
    .workspace-loading { max-width: calc(100vw - 20px); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .boot-brand img, .loading-track:after, .loading-dot { animation: none; } }
@media print { .workspace-loading { display: none !important; } }
.employee-detail-modal.modal { width: min(980px, 100%); }
.employee-detail-modal .modal-body { display: block; min-width: 0; overflow: auto; }
#employee-profile { display: grid; gap: 12px; min-width: 0; }
#employee-profile .profile-loading { min-height: 160px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #6e5a80; }
.employee-identity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: center; gap: 14px; padding: 14px; border: 1px solid #e5d9f1; border-radius: 13px; background: linear-gradient(115deg, #f1e9fa, #f9f5ff 70%, #fff3ed); }
.employee-identity h3 { color: #35224b; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.employee-identity p { color: #6e5980; font-size: 12px; margin-top: 3px; }
.employee-identity dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; margin: 0; }
.employee-identity dt { color: #6d5a7e; font-size: 11px; }
.employee-identity dd { margin: 1px 0 0; color: #433054; font-weight: 650; font-size: 12px; overflow-wrap: anywhere; }
.profile-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)) auto; justify-content: start; gap: 8px; align-items: end; }
.profile-filters label { display: grid; gap: 3px; min-width: 0; color: #6d5a7e; font-size: 11px; font-weight: 650; }
.profile-filters input { width: 100%; min-width: 0; min-height: 38px; padding: 6px 8px; border: 1px solid #e2d5ed; border-radius: 8px; background: #fff; color: #45314f; font-size: 13px; }
.profile-filters .btn { min-height: 38px; padding: 6px 10px; }
#employee-profile .tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 3px; border: 1px solid #e9def3; border-radius: 10px; background: #f3edf9; }
#employee-profile .tab { justify-content: center; min-height: 36px; min-width: 0; padding: 5px; border: 0; background: transparent; color: #69537e; box-shadow: none; text-align: center; white-space: normal; }
#employee-profile .tab.active { background: #643f9a; color: #fff; font-weight: 700; }
.profile-content { min-width: 0; }
.employee-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.employee-metrics > div { min-width: 0; padding: 10px 12px; border: 1px solid #e8def2; border-radius: 10px; background: #fff; }
.employee-metrics span { display: block; color: #6e5b7f; font-size: 11px; line-height: 1.3; }
.employee-metrics b { display: block; margin-top: 4px; color: #4d316b; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .employee-detail-modal .modal-body { padding: 10px; }
    #employee-profile { gap: 9px; }
    .employee-identity { padding: 10px; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .employee-identity h3 { font-size: 18px; }
    .employee-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .employee-metrics > div { padding: 8px; }
    .employee-metrics b { font-size: 15px; }
    .profile-filters { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
    .profile-filters input { font-size: 16px; }
}
@media (max-width: 479px) {
    .employee-identity dl, .employee-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
    .profile-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
    .profile-filters .btn { grid-column: 1 / -1; min-height: 34px; }
}
