/* Communication and employee-management surfaces. Loaded last by design. */
:root {
  --people-ink: #17313f;
  --people-muted: #657784;
  --people-line: #c9d4da;
  --people-surface: #f8fafb;
  --people-panel: #ffffff;
  --people-navy: #263f4b;
  --people-navy-strong: #18313e;
  --people-accent: #238a9a;
  --people-gold: #c5912f;
  --people-danger: #b83d39;
}

/* Quick Chat */
html body#strongholdApp:not(.login-active) .chat-launcher-root {
  position: fixed !important;
  top: auto !important;
  right: 18px !important;
  bottom: 18px !important;
  left: auto !important;
  z-index: 2450 !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-root[hidden] {
  display: none !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-panel {
  display: grid !important;
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
  gap: 0 !important;
  width: min(410px, calc(100vw - 32px)) !important;
  max-height: min(680px, calc(100dvh - 116px)) !important;
  overflow: hidden !important;
  border: 1px solid #9eacb5 !important;
  border-radius: 8px !important;
  padding: 0 !important;
  background: var(--people-panel) !important;
  box-shadow: 0 24px 60px rgba(14, 34, 45, 0.28), 0 4px 14px rgba(14, 34, 45, 0.13) !important;
  color: var(--people-ink) !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-head {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 36px !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 64px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 10px 12px !important;
  background: linear-gradient(135deg, var(--people-navy-strong), #36515e) !important;
  color: #fff !important;
}

.chat-head-mark,
html body#strongholdApp:not(.login-active) .chat-head-back {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  border-radius: 7px !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.chat-head-mark img {
  width: 19px;
  height: 19px;
  filter: brightness(0) invert(1);
}

html body#strongholdApp:not(.login-active) .chat-head-back span {
  margin-top: -2px;
  font-family: Arial, sans-serif;
  font-size: 30px;
  font-weight: 400;
}

.chat-head-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

html body#strongholdApp:not(.login-active) .chat-head-copy strong {
  overflow: hidden;
  color: #fff !important;
  font-size: 1rem !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body#strongholdApp:not(.login-active) .chat-head-copy small {
  overflow: hidden;
  color: #d4e1e6 !important;
  font-size: 0.72rem !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-close {
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: #e9f0f3 !important;
  box-shadow: none !important;
  transform: none !important;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-close span {
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-close:hover,
html body#strongholdApp:not(.login-active) button.chat-launcher-close:focus-visible {
  border-color: rgba(255, 255, 255, 0.26) !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  border-bottom: 1px solid var(--people-line) !important;
  padding: 7px !important;
  background: #edf2f4 !important;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-tab {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 38px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
  background: transparent !important;
  background-image: none !important;
  color: #53656f !important;
  font-size: 0.72rem !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-tab img {
  width: 15px !important;
  height: 15px !important;
  opacity: 0.76;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-tab small {
  color: inherit !important;
  font-size: 0.64rem !important;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-tab.active {
  border-color: #afbec6 !important;
  background: #fff !important;
  color: var(--people-navy-strong) !important;
  box-shadow: 0 2px 5px rgba(24, 49, 62, 0.1) !important;
}

.chat-tab-presence,
.chat-online-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #32a465;
  box-shadow: 0 0 0 3px rgba(50, 164, 101, 0.14);
}

.chat-launcher-tab-badge,
.chat-conversation-unread {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  background: #c84842 !important;
  color: #fff !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
}

.chat-launcher-search {
  position: relative;
  display: block;
  border-bottom: 1px solid #dde4e8;
  padding: 10px 12px;
  background: #f8fafb;
}

.chat-launcher-search img {
  position: absolute;
  top: 50%;
  left: 23px;
  width: 15px;
  height: 15px;
  opacity: 0.54;
  transform: translateY(-50%);
}

html body#strongholdApp:not(.login-active) .chat-launcher-search input {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid #c8d3d9 !important;
  border-radius: 6px !important;
  padding: 0 12px 0 36px !important;
  background: #fff !important;
  color: var(--people-ink) !important;
  font-size: 0.78rem !important;
  box-shadow: none !important;
}

html body#strongholdApp:not(.login-active) .chat-launcher-body {
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: #fff !important;
  font-size: 1rem !important;
}

.chat-launcher-list {
  display: grid !important;
  gap: 0 !important;
  max-height: min(440px, calc(100dvh - 315px)) !important;
  overflow-y: auto !important;
  padding: 4px 0 !important;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-item {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 62px !important;
  border: 0 !important;
  border-bottom: 1px solid #e3e9ec !important;
  border-radius: 0 !important;
  padding: 9px 13px !important;
  background: #fff !important;
  background-image: none !important;
  color: var(--people-ink) !important;
  text-align: left !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
}

html body#strongholdApp:not(.login-active) button.chat-launcher-item:hover,
html body#strongholdApp:not(.login-active) button.chat-launcher-item:focus-visible {
  background: #f1f5f7 !important;
}

.chat-person-avatar {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  border: 1px solid #9eafb8 !important;
  border-radius: 50% !important;
  background: #e9eef1 !important;
  color: #28434f !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
}

.employee-profile-photo-frame {
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.employee-profile-photo-frame > .employee-profile-photo-image {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: inherit !important;
}

.chat-person-avatar.employee-profile-photo-frame,
.email-notification-employee-avatar.employee-profile-photo-frame {
  border-radius: 50% !important;
}

.role-avatar {
  border-radius: 8px !important;
  background: #e7edf0 !important;
}

.chat-person-copy {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.chat-person-copy strong,
.chat-conversation-head strong {
  overflow: hidden !important;
  color: var(--people-ink) !important;
  font-size: 0.82rem !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.chat-person-copy small {
  overflow: hidden !important;
  color: var(--people-muted) !important;
  font-size: 0.69rem !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.chat-row-arrow {
  color: #91a0a9;
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
}

.chat-conversation-head {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.chat-conversation-time {
  flex: 0 0 auto;
  color: #82919a;
  font-size: 0.61rem;
  font-weight: 700;
}

.chat-launcher-subhead {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 42px !important;
  border-bottom: 1px solid #dce4e8 !important;
  padding: 6px 12px !important;
  background: #f7f9fa !important;
}

html body#strongholdApp:not(.login-active) button.chat-directory-back {
  min-height: 30px !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: #3d6375 !important;
  font-size: 0.72rem !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.chat-launcher-subhead > span {
  color: var(--people-muted) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
}

.chat-thread-panel {
  display: grid !important;
  grid-template-rows: minmax(180px, 1fr) auto !important;
  min-height: min(520px, calc(100dvh - 205px)) !important;
}

.chat-thread-messages {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 14px 12px !important;
  background: #f2f5f6 !important;
}

html body#strongholdApp:not(.login-active) .chat-thread-message {
  display: grid !important;
  gap: 3px !important;
  width: fit-content !important;
  max-width: 78% !important;
  min-width: 54px !important;
  border: 1px solid #d1dade !important;
  border-radius: 8px !important;
  padding: 7px 9px 5px !important;
  background: #fff !important;
  color: var(--people-ink) !important;
  box-shadow: 0 2px 5px rgba(20, 45, 57, 0.06) !important;
}

html body#strongholdApp:not(.login-active) .chat-thread-message.outgoing {
  align-self: flex-end !important;
  border-color: #a9bec8 !important;
  background: #e8eff2 !important;
}

html body#strongholdApp:not(.login-active) .chat-thread-message.incoming {
  align-self: flex-start !important;
}

.chat-thread-message-body p {
  margin: 0 !important;
  color: inherit !important;
  font-size: 0.77rem !important;
  line-height: 1.35 !important;
}

.chat-thread-message > small {
  justify-self: end;
  margin-top: 1px;
  color: #788891 !important;
  font-size: 0.56rem !important;
  line-height: 1 !important;
}

.chat-thread-compose {
  display: grid !important;
  gap: 8px !important;
  border-top: 1px solid var(--people-line) !important;
  padding: 10px !important;
  background: #fff !important;
}

html body#strongholdApp:not(.login-active) .chat-thread-compose textarea {
  width: 100% !important;
  min-height: 56px !important;
  max-height: 120px !important;
  resize: vertical !important;
  border: 1px solid #b9c6cd !important;
  border-radius: 7px !important;
  padding: 9px 10px !important;
  background: #fbfcfc !important;
  color: var(--people-ink) !important;
  font-size: 0.78rem !important;
  line-height: 1.35 !important;
  box-shadow: none !important;
}

.chat-thread-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.chat-thread-upload-group {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}

html body#strongholdApp:not(.login-active) .chat-thread-upload-btn {
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  cursor: pointer !important;
  border: 1px solid #b9c6cd !important;
  border-radius: 6px !important;
  background: #f3f6f7 !important;
  color: #405965 !important;
  font-size: 0.9rem !important;
}

.chat-thread-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.chat-thread-file-name {
  max-width: 190px;
  overflow: hidden;
  color: #6e7f88 !important;
  font-size: 0.64rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body#strongholdApp:not(.login-active) button.chat-thread-send {
  min-width: 74px !important;
  min-height: 34px !important;
  border: 1px solid #183a49 !important;
  border-radius: 6px !important;
  padding: 0 14px !important;
  background: var(--people-navy) !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Employee Directory */
html body#strongholdApp:not(.login-active) #employeesView {
  --employee-card-width: auto !important;
  gap: 14px !important;
}

#employeesView > .section-heading {
  align-items: center !important;
  min-height: 74px !important;
  border: 1px solid #b8c7ce !important;
  border-left: 5px solid var(--people-accent) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  background: linear-gradient(110deg, #fff, #eef3f5) !important;
  width: 100% !important;
  max-width: none !important;
}

#employeesView > .section-heading > div {
  display: grid;
  gap: 3px;
}

.employee-directory-eyebrow {
  color: #397184;
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#employeesView > .section-heading h2 {
  margin: 0 !important;
  color: var(--people-ink) !important;
  font-size: 1.3rem !important;
}

#employeesView > .section-heading p {
  margin: 0 !important;
  color: var(--people-muted) !important;
  font-size: 0.76rem !important;
}

html body#strongholdApp:not(.login-active) #openEmployeeBtn {
  min-width: 126px !important;
  min-height: 36px !important;
  border: 1px solid #294652 !important;
  border-radius: 7px !important;
  padding: 0 14px !important;
  background: var(--people-navy) !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 0.73rem !important;
  box-shadow: 0 5px 12px rgba(26, 53, 66, 0.16) !important;
}

#openEmployeeBtn span {
  margin-right: 5px;
  font-family: Arial, sans-serif;
  font-size: 1rem;
}

#employeesView .employee-directory-panel {
  width: 100% !important;
  margin: 0 !important;
  border: 1px solid #c4d0d6 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  background: #f3f6f7 !important;
}

#employeesView .employee-filter-bar {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) auto auto !important;
  align-items: end !important;
  gap: 12px !important;
  width: 100% !important;
}

#employeesView .employee-directory-search {
  grid-column: 1 !important;
  grid-row: 1 !important;
  gap: 4px !important;
  color: #5e707a !important;
  font-size: 0.61rem !important;
  letter-spacing: 0.08em !important;
}

#employeesView .employee-directory-search input {
  height: 36px !important;
  min-height: 36px !important;
  border: 1px solid #b8c6cd !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--people-ink) !important;
  font-size: 0.76rem !important;
  box-shadow: none !important;
}

#employeesView .tabs {
  display: flex !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
  overflow: visible !important;
}

#employeesView #employeeTabs {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

#employeesView #employeeTypeTabs {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

html body#strongholdApp:not(.login-active) #employeesView .tabs button.tab {
  width: auto !important;
  min-width: 0 !important;
  min-height: 36px !important;
  border: 1px solid #bdc9cf !important;
  border-radius: 6px !important;
  padding: 5px 10px !important;
  background: #fff !important;
  background-image: none !important;
  color: #52646f !important;
  font-size: 0.67rem !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
}

html body#strongholdApp:not(.login-active) #employeesView .tabs button.tab.active {
  border-color: var(--people-navy) !important;
  background: var(--people-navy) !important;
  color: #fff !important;
}

#employeesView .employee-directory-summary {
  display: flex !important;
  gap: 7px !important;
  margin-top: 8px !important;
}

#employeesView .employee-directory-summary span {
  min-height: 28px !important;
  border: 1px solid #c6d2d8 !important;
  border-radius: 5px !important;
  padding: 3px 8px !important;
  background: #fff !important;
  color: var(--people-ink) !important;
}

#employeesView .employee-directory-summary small {
  color: #6d7d86 !important;
  font-size: 0.57rem !important;
}

html body#strongholdApp:not(.login-active) #employeeList.employee-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) !important;
  gap: 10px !important;
  align-items: start !important;
  width: 100% !important;
}

html body#strongholdApp:not(.login-active) #employeeList .employee-roster-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "identity"
    "workload"
    "actions"
    "expanded" !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  cursor: default !important;
  border: 1px solid #bdc9cf !important;
  border-radius: 8px !important;
  padding: 11px !important;
  background: #fff !important;
  color: var(--people-ink) !important;
  box-shadow: 0 6px 15px rgba(22, 49, 62, 0.08) !important;
}

html body#strongholdApp:not(.login-active) #employeeList .employee-roster-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--people-accent), #6e8792);
}

html body#strongholdApp:not(.login-active) #employeeList .employee-roster-card.is-expanded {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 10px !important;
  padding: 12px !important;
}

#employeeList .employee-card-header {
  grid-area: identity;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
}

#employeeList .employee-card-avatar {
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  overflow: hidden !important;
  border: 1px solid #b8c6cd !important;
  border-radius: 7px !important;
  background: #edf2f4 !important;
}

#employeeList .employee-card-avatar .employee-avatar,
#employeeList .employee-card-avatar .employee-avatar-fallback {
  width: 100% !important;
  height: 100% !important;
  border-radius: 6px !important;
}

#employeeList .employee-card-title-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 7px !important;
}

#employeeList .employee-card h3 {
  overflow: hidden !important;
  margin: 0 !important;
  color: var(--people-ink) !important;
  font-size: 0.88rem !important;
  line-height: 1.12 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#employeeList .employee-status-chip {
  flex: 0 0 auto !important;
  min-width: 48px !important;
  border: 1px solid #a9c9b9 !important;
  border-radius: 999px !important;
  padding: 3px 6px !important;
  background: #edf8f2 !important;
  color: #2b6b4c !important;
  font-size: 0.55rem !important;
}

#employeeList .employee-status-chip.prior {
  border-color: #d8bf8d !important;
  background: #fff7e8 !important;
  color: #7a5819 !important;
}

#employeeList .employee-card-job-title {
  margin-top: 1px;
  color: #526875 !important;
  font-size: 0.67rem !important;
}

.employee-role-preview {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
  min-width: 0;
}

.employee-role-preview span,
.employee-role-preview small {
  overflow: hidden;
  border: 1px solid #ccd6db;
  border-radius: 4px;
  padding: 2px 5px;
  background: #f2f5f6;
  color: #52656f;
  font-size: 0.52rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-roster-workload small {
  color: #71818a;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.employee-contact-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 4px;
  color: #5b6f79;
  font-size: 0.58rem;
  line-height: 1.2;
}

.employee-contact-preview span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-contact-preview span:first-child {
  flex: 1 1 auto;
}

.employee-contact-preview span + span {
  flex: 0 1 auto;
  border-left: 1px solid #ced8dd;
  padding-left: 6px;
}

.employee-roster-workload {
  grid-area: workload;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d3dce1;
  border-radius: 6px;
  background: #f6f8f9;
}

.employee-roster-workload > span {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 5px 7px;
}

.employee-roster-workload > span + span {
  border-left: 1px solid #d3dce1;
}

.employee-roster-workload b {
  overflow: hidden;
  color: #29434f;
  font-size: 0.7rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-roster-workload small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-card-primary-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

html body#strongholdApp:not(.login-active) #employeeList button.employee-action {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 30px !important;
  border: 1px solid #bdc8ce !important;
  border-radius: 6px !important;
  padding: 4px 7px !important;
  background: #f7f9fa !important;
  background-image: none !important;
  color: #354f5b !important;
  font-size: 0.61rem !important;
  font-weight: 900 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
}

#employeeList button.employee-action img {
  width: 13px;
  height: 13px;
  opacity: 0.74;
}

html body#strongholdApp:not(.login-active) #employeeList button.employee-action.manage {
  border-color: #8fa6b1 !important;
  background: #e9eff2 !important;
  color: #203c49 !important;
}

#employeeList .employee-card-expanded {
  grid-area: expanded;
  display: grid !important;
  gap: 11px !important;
  min-width: 0 !important;
  border-top: 1px solid #d7e0e4;
  padding-top: 12px;
}

.employee-detail-heading {
  display: grid;
  gap: 2px;
}

.employee-detail-heading strong {
  color: var(--people-ink);
  font-size: 0.8rem;
}

.employee-detail-heading small {
  color: var(--people-muted);
  font-size: 0.64rem;
}

#employeeList .employee-card-contact,
#employeeList .employee-card-employment {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

#employeeList .employee-card-contact span,
#employeeList .employee-card-employment span {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2px !important;
  border: 1px solid #d3dce1 !important;
  border-radius: 6px !important;
  padding: 7px 8px !important;
  background: #f8fafb !important;
}

#employeeList .employee-card-contact strong,
#employeeList .employee-card-employment strong {
  white-space: normal !important;
}

#employeeList .employee-card-actions {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  justify-content: flex-end !important;
}

html body#strongholdApp:not(.login-active) #employeeList .employee-card-actions button {
  width: auto !important;
  min-width: 94px !important;
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 6px !important;
  padding: 0 11px !important;
  font-size: 0.64rem !important;
}

#employeeList .employee-card-official-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#employeeList .employee-official-panel {
  border-color: #d0dade !important;
  background: #f8fafb !important;
}

@media (max-width: 1200px) {
  html body#strongholdApp:not(.login-active) #employeeList.employee-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) !important;
  }

  #employeesView .employee-filter-bar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #employeesView .employee-directory-search {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  #employeesView #employeeTabs {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  #employeesView #employeeTypeTabs {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }
}

@media (max-width: 640px) {
  html body#strongholdApp:not(.login-active) .app-header .header-tools-panel {
    position: fixed !important;
    top: 158px !important;
    right: 7px !important;
    left: 7px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 166px) !important;
    overflow-y: auto !important;
  }

  html body#strongholdApp:not(.login-active) .chat-launcher-root {
    top: auto !important;
    right: 6px !important;
    bottom: max(6px, env(safe-area-inset-bottom)) !important;
    left: 6px !important;
  }

  html body#strongholdApp:not(.login-active) .chat-launcher-panel {
    width: 100% !important;
    max-height: calc(100dvh - 82px) !important;
    border-radius: 8px !important;
  }

  .chat-thread-panel {
    min-height: calc(100dvh - 205px) !important;
  }

  .chat-launcher-list {
    max-height: calc(100dvh - 286px) !important;
  }

  #employeesView > .section-heading {
    align-items: stretch !important;
    min-height: 0 !important;
    padding: 13px !important;
  }

  #employeesView > .section-heading p {
    font-size: 0.7rem !important;
  }

  html body#strongholdApp:not(.login-active) #openEmployeeBtn {
    width: 100% !important;
  }

  #employeesView .employee-filter-bar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #employeesView .employee-directory-search {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  #employeesView #employeeTabs {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  #employeesView #employeeTypeTabs {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  #employeesView .tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #employeesView #employeeTypeTabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html body#strongholdApp:not(.login-active) #employeesView .tabs button.tab {
    white-space: normal !important;
  }

  #employeesView .employee-directory-summary {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #employeesView .employee-directory-summary span {
    justify-content: center !important;
  }

  html body#strongholdApp:not(.login-active) #employeeList .employee-roster-card,
  html body#strongholdApp:not(.login-active) #employeeList .employee-roster-card.is-expanded {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "identity"
      "contact"
      "workload"
      "actions"
      "expanded" !important;
    padding: 10px !important;
  }

  #employeeList .employee-card-contact,
  #employeeList .employee-card-employment,
  #employeeList .employee-card-official-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .employee-card-primary-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html body#strongholdApp:not(.login-active) #employeeList button.employee-action {
    padding: 5px 4px !important;
    font-size: 0.6rem !important;
  }
}

@media (max-width: 390px) {
  .employee-contact-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .employee-roster-workload > span {
    padding: 6px;
  }

  .employee-roster-workload small {
    font-size: 0.49rem;
  }
}

/* Release audit corrections: keep these component-scoped and independent of legacy themes. */
html body #taskDialog {
  width: min(652px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
}

html body #taskDialog .task-dialog-panel {
  width: 100% !important;
  max-width: 100% !important;
}

html body:not(.login-active) .app-shell button.section-add-photo-button {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 10px !important;
  align-items: center !important;
  align-content: center !important;
  padding: 9px 14px !important;
}

html body:not(.login-active) .app-shell button.section-add-photo-button::before {
  position: static !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  transform: none !important;
}

html body:not(.login-active) .app-shell button.section-add-photo-button > span {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}

html body:not(.login-active) .app-shell button.section-add-photo-button > small {
  grid-column: 2 !important;
  grid-row: 2 !important;
  min-width: 0 !important;
}

html body:not(.login-active) .service-generated-invoices .folder-item.media-item.file-media-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 48px !important;
  height: auto !important;
  max-height: none !important;
}

html body:not(.login-active) .service-generated-invoices .compact-file-title-link {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html body:not(.login-active) .service-generated-invoices .folder-items {
  display: grid !important;
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 600px) {
  html body:not(.login-active) .service-generated-invoices .folder-item.media-item.file-media-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
    min-height: 64px !important;
    height: auto !important;
    max-height: none !important;
    padding: 7px 9px !important;
  }

  html body:not(.login-active) .service-generated-invoices .compact-file-title-link {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  html body:not(.login-active) .service-generated-invoices .media-card-actions {
    width: 100% !important;
    justify-content: flex-start !important;
  }
}

html body#strongholdApp:not(.login-active) .employee-cursor-setting {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 218px minmax(320px, 360px);
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #c6d2d8;
  border-radius: 8px;
  background: #f8fafb;
}

html body#strongholdApp:not(.login-active) .employee-cursor-setting-copy {
  display: grid;
  gap: 4px;
}

html body#strongholdApp:not(.login-active) .employee-cursor-setting-copy strong {
  color: #17313f;
  font-size: 0.94rem;
}

html body#strongholdApp:not(.login-active) .employee-cursor-setting-copy small {
  max-width: 620px;
  color: #657784;
  font-size: 0.76rem;
  line-height: 1.38;
}

html body#strongholdApp:not(.login-active) .employee-cursor-preview {
  display: grid;
  place-items: center;
  width: 218px;
  max-width: 100%;
  min-height: 90px;
  overflow: hidden;
  border: 1px solid #d0dade;
  border-radius: 7px;
  background: #ffffff;
}

html body#strongholdApp:not(.login-active) .employee-cursor-preview-states {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 200px;
  max-width: 100%;
}

html body#strongholdApp:not(.login-active) .employee-cursor-preview-pointer {
  display: block;
  width: 64px;
  height: 64px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 64px 64px;
  transition: opacity 120ms ease;
}

html body#strongholdApp:not(.login-active) .employee-cursor-preview.is-rendering .employee-cursor-preview-pointer {
  opacity: 0.42;
}

html body#strongholdApp:not(.login-active) .employee-cursor-color-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
  min-width: 0;
}

html body#strongholdApp:not(.login-active) .employee-cursor-color-control {
  display: grid;
  grid-template-columns: 1fr 46px;
  align-items: center;
  gap: 7px 10px;
  margin: 0;
  color: #29434f;
  font-size: 0.76rem;
  font-weight: 700;
}

html body#strongholdApp:not(.login-active) .employee-cursor-color-control input[type="color"] {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 46px;
  height: 40px;
  padding: 3px;
  border: 1px solid #9eacb5;
  border-radius: 6px;
  background: #ffffff;
}

html body#strongholdApp:not(.login-active) .employee-cursor-color-control output {
  color: #657784;
  font-family: Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
}

@media (max-width: 1180px) {
  html body#strongholdApp:not(.login-active) .employee-cursor-setting {
    grid-template-columns: minmax(0, 1fr) 218px;
  }

  html body#strongholdApp:not(.login-active) .employee-cursor-color-controls {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  html body#strongholdApp:not(.login-active) .employee-cursor-setting {
    grid-template-columns: 1fr;
  }

  html body#strongholdApp:not(.login-active) .employee-cursor-preview {
    width: 100%;
  }

  html body#strongholdApp:not(.login-active) .employee-cursor-color-controls {
    grid-template-columns: 1fr;
  }
}
.email-notification-settings-card {
  display: grid;
  gap: 16px;
}

.email-notification-settings-heading {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.email-notification-settings-heading h3,
.email-notification-settings-heading p {
  margin: 0;
}

.email-notification-settings-heading > div {
  display: grid;
  gap: 4px;
}

.email-notification-settings-heading > div > p:last-child {
  color: #607174;
  max-width: 680px;
}

.email-notification-master-toggle {
  align-items: center;
  background: #eef7f6;
  border: 1px solid #bfd8d5;
  border-radius: 10px;
  display: flex;
  flex: 0 0 min(410px, 42%);
  gap: 18px;
  justify-content: space-between;
  margin: 0;
  padding: 12px 14px;
}

.email-notification-master-toggle > span {
  display: grid;
  gap: 3px;
}

.email-notification-master-toggle strong {
  color: #193c3e;
  font-size: .9rem;
}

.email-notification-master-toggle small {
  color: #26736e;
}

.email-notification-master-toggle small.is-disabled {
  color: #9a4a31;
}

.email-notification-master-toggle input,
.email-notification-employee-row input {
  appearance: none;
  accent-color: #0f766e;
  background: #aebabb;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  height: 22px;
  margin: 0;
  padding: 0;
  position: relative;
  transition: background .16s ease;
  width: 42px;
}

.email-notification-master-toggle input::after,
.email-notification-employee-row input::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(20, 40, 42, .25);
  content: "";
  height: 16px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform .16s ease;
  width: 16px;
}

.email-notification-master-toggle input:checked,
.email-notification-employee-row input:checked {
  background: #0f766e;
}

.email-notification-master-toggle input:checked::after,
.email-notification-employee-row input:checked::after {
  transform: translateX(20px);
}

.email-notification-master-toggle input:focus-visible,
.email-notification-employee-row input:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .25);
  outline-offset: 2px;
}

.email-notification-employee-heading,
.email-notification-settings-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.email-notification-employee-heading span {
  color: #263c3e;
  font-weight: 800;
}

.email-notification-employee-heading small,
.email-notification-settings-actions small {
  color: #687779;
}

.email-notification-employee-list {
  border: 1px solid #d7e0e1;
  border-radius: 9px;
  display: grid;
  max-height: 420px;
  overflow: auto;
}

.email-notification-employee-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e4eaeb;
  display: grid;
  gap: 10px;
  grid-template-columns: 36px minmax(180px, 1fr) minmax(145px, auto) auto;
  margin: 0;
  padding: 10px 12px;
}

.email-notification-employee-row:last-child {
  border-bottom: 0;
}

.email-notification-employee-row:hover {
  background: #f7faf9;
}

.email-notification-employee-row.is-disabled {
  background: #fbf8f6;
}

.email-notification-employee-avatar {
  align-items: center;
  background: #dcefed;
  border-radius: 50%;
  color: #0e625c;
  display: inline-flex;
  font-size: .7rem;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.email-notification-employee-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.email-notification-employee-copy strong,
.email-notification-employee-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-notification-employee-copy strong {
  color: #23383a;
}

.email-notification-employee-copy small {
  color: #6a7779;
}

.email-notification-employee-state {
  color: #27736d;
  font-size: .72rem;
  font-weight: 700;
  text-align: right;
}

.email-notification-employee-row.is-disabled .email-notification-employee-state {
  color: #a04c32;
}

.email-notification-settings-actions {
  border-top: 1px solid #e2e8e9;
  padding-top: 14px;
}

.email-notification-settings-actions button {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .email-notification-settings-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .email-notification-master-toggle {
    flex-basis: auto;
  }

  .email-notification-employee-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .email-notification-employee-state {
    display: none;
  }
}

@media (max-width: 600px) {
  .email-notification-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .email-notification-settings-actions button {
    width: 100%;
  }
}
