.employee-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px;
}

.employee-photo {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--ink);
  font-weight: 900;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

.employee-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.user-avatar,
.avatar.shadow-avatar {
  position: relative;
  overflow: hidden;
}

.employee-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.employee-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.employee-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.department-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.department-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.department-card h3 {
  margin: 0;
  font-size: 17px;
}

.department-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.department-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.department-stats div {
  border-radius: 8px;
  background: var(--surface-alt);
  padding: 12px;
}

.department-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.department-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

@media (max-width: 1040px) {
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }
}

/* Premium employee and department cards */
.employee-card,
.department-card {
  border-color: #dfe7f2;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-soft);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.employee-card:hover,
.department-card:hover {
  border-color: rgba(13, 139, 120, 0.24);
  box-shadow: 0 22px 50px rgba(24, 35, 54, 0.11);
  transform: translateY(-2px);
}

.employee-photo {
  background: linear-gradient(135deg, var(--accent-soft), #fff4dc);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(13, 139, 120, 0.12);
}

.employee-photo.shadow-avatar,
.avatar.shadow-avatar {
  background: linear-gradient(145deg, #f5f8fb 0%, #e7edf4 100%);
  box-shadow: inset 0 0 0 1px rgba(107, 119, 140, 0.15);
}

.employee-photo.shadow-avatar::before,
.employee-photo.shadow-avatar::after,
.avatar.shadow-avatar::before,
.avatar.shadow-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(87, 101, 123, 0.48);
}

.employee-photo.shadow-avatar::before,
.avatar.shadow-avatar::before {
  top: 19%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 999px;
}

.employee-photo.shadow-avatar::after,
.avatar.shadow-avatar::after {
  bottom: 11%;
  width: 68%;
  height: 34%;
  border-radius: 999px 999px 18px 18px;
}

.employee-photo.shadow-avatar.man,
.avatar.shadow-avatar.man {
  background: linear-gradient(145deg, #eef6fb 0%, #d8e8f3 100%);
}

.employee-photo.shadow-avatar.man::before,
.employee-photo.shadow-avatar.man::after,
.avatar.shadow-avatar.man::before,
.avatar.shadow-avatar.man::after {
  background: rgba(49, 93, 126, 0.5);
}

.employee-photo.shadow-avatar.woman,
.avatar.shadow-avatar.woman {
  background: linear-gradient(145deg, #fff4f1 0%, #f4dfe5 100%);
}

.employee-photo.shadow-avatar.woman::before,
.employee-photo.shadow-avatar.woman::after,
.avatar.shadow-avatar.woman::before,
.avatar.shadow-avatar.woman::after {
  background: rgba(145, 78, 98, 0.48);
}

.employee-photo.shadow-avatar.others,
.avatar.shadow-avatar.others {
  background: linear-gradient(145deg, #f4f1ff 0%, #e3e8ef 100%);
}

.employee-photo.shadow-avatar.others::before,
.employee-photo.shadow-avatar.others::after,
.avatar.shadow-avatar.others::before,
.avatar.shadow-avatar.others::after {
  background: rgba(94, 83, 126, 0.48);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.profile-identity strong,
.profile-identity span {
  display: block;
}

.profile-identity strong {
  color: var(--ink);
  font-size: 17px;
}

.profile-identity span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.profile-photo-large {
  width: 54px;
  height: 68px;
  border-radius: 6px;
}

.dashboard-profile-card {
  margin: 0;
}

.profile-id-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 143, 120, 0.08), rgba(211, 154, 42, 0.08)),
    #ffffff;
  padding: 12px;
  box-shadow: var(--shadow-tight);
}

.profile-id-media {
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #f4f7fb;
  padding: 6px;
}

.profile-id-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.profile-id-copy > strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.profile-id-copy > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.profile-id-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.profile-id-meta small {
  display: grid;
  min-width: 0;
  gap: 2px;
  border: 1px solid #dfe7f2;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 800;
}

.profile-id-meta b {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .profile-id-card {
    align-items: flex-start;
  }

  .profile-id-meta {
    grid-template-columns: 1fr;
  }
}

.profile-request-row {
  justify-content: flex-start;
}

.profile-request-copy {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.profile-change-list {
  display: grid;
  gap: 6px;
}

.profile-change-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.profile-change-item b {
  color: var(--ink);
  text-transform: capitalize;
}

.profile-change-current {
  color: var(--muted);
}

.profile-change-arrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-change-new {
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  padding: 2px 6px;
  font-weight: 850;
}

.profile-request-photo {
  display: inline-block;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  flex: 0 0 auto;
}

.profile-request-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-card h3,
.department-card h3 {
  color: #172033;
  font-weight: 850;
}

.employee-meta {
  gap: 7px;
}

.department-card header {
  border-bottom: 1px solid #eef3f8;
  padding-bottom: 12px;
}

.department-stats div {
  border: 1px solid #e4ebf4;
  background: #f8fbfd;
}

.department-stats strong {
  color: #111827;
  font-weight: 900;
}

/* Tighter directory density */
.employee-card,
.department-card {
  gap: 10px;
  padding: 13px;
}

.employee-photo {
  width: 46px;
  height: 46px;
}

.employee-card h3,
.department-card h3 {
  font-size: 16px;
}

.employee-meta,
.directory-grid,
.department-stats {
  gap: 8px;
}

.department-card header {
  padding-bottom: 9px;
}

.department-stats div {
  padding: 10px;
}

.department-stats strong {
  font-size: 18px;
}
